• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acsexmplCallbacks.h

Go to the documentation of this file.
00001 #ifndef acsexmplCallbacks_h
00002 #define acsexmplCallbacks_h
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * (c) Associated Universities Inc., 2004 
00006 *
00007 *This library is free software; you can redistribute it and/or
00008 *modify it under the terms of the GNU Lesser General Public
00009 *License as published by the Free Software Foundation; either
00010 *version 2.1 of the License, or (at your option) any later version.
00011 *
00012 *This library is distributed in the hope that it will be useful,
00013 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 *Lesser General Public License for more details.
00016 *
00017 *You should have received a copy of the GNU Lesser General Public
00018 *License along with this library; if not, write to the Free Software
00019 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 *
00021 * "@(#) $Id: acsexmplCallbacks.h,v 1.8 2008/10/01 04:30:47 cparedes Exp $"
00022 *
00023 * who       when      what
00024 * --------  --------  ----------------------------------------------
00025 * dave  2004-01-13  created 
00026 */
00027 
00028 //Since this header just contains implementation of BACI classes, we must 
00029 //include the CORBA stubs for baci.idl
00030 #include <baciS.h>
00031 
00032 //ACE's string class which is supported on tons of different platforms.
00033 #include <ace/SString.h>
00034 
00041 
00046 
00088 /* @}*/
00089 /* @}*/
00090 
00099 class CommonCallback
00100 {
00101   public:
00105     CommonCallback() {}
00106     
00107   protected:
00112     ACE_CString prop;
00113     
00119     unsigned int m_count;
00120 
00121   private:
00125     void operator=(const CommonCallback&);
00126 };
00128 
00136 class MyAlarmdouble : public virtual POA_ACS::Alarmdouble,    //CORBA servant stub
00137                       protected CommonCallback
00138 {
00139   public:
00144     MyAlarmdouble(ACE_CString _prop) { prop = _prop; }
00145     
00149     ~MyAlarmdouble() {}
00150 
00161     void 
00162     alarm_raised (CORBA::Double value,
00163                   const ACSErr::Completion &c,
00164                   const ACS::CBDescOut &desc);
00165         
00176     void 
00177     alarm_cleared (CORBA::Double value,
00178                    const ACSErr::Completion &c,
00179                    const ACS::CBDescOut &desc);
00180             
00194     CORBA::Boolean 
00195     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00196         {
00197             return true;
00198         }
00199 
00200 };
00202 
00206 class MyCBdouble : public virtual POA_ACS::CBdouble,    //CORBA servant stub
00207                    protected CommonCallback
00208 {
00209   public:
00214     MyCBdouble(ACE_CString _prop)  { prop = _prop; m_count = 0; }
00215 
00219     ~MyCBdouble() {}
00220     
00232     void 
00233     working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);
00234     
00246     void 
00247     done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc);
00248     
00262     CORBA::Boolean 
00263     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00264         {
00265             return true;
00266         }
00267 };
00269 
00273 class MyCBvoid: public virtual POA_ACS::CBvoid,    //CORBA servant stub
00274                 protected CommonCallback
00275 {   
00276   public:
00281     MyCBvoid(ACE_CString _prop) { prop = _prop; }
00282     
00286     ~MyCBvoid() {}
00287 
00299     void 
00300     working (const ACSErr::Completion &c, const ACS::CBDescOut &desc); 
00301     
00312     void 
00313     done (const ACSErr::Completion &c, const ACS::CBDescOut &desc); 
00314 
00329     CORBA::Boolean 
00330     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00331         {
00332             return true;
00333         }
00334 };
00336 
00337 #endif
00338 /*___oOo___*/
00339 
00340 
00341 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0