00001 #ifndef acsexmplCallbacks_h
00002 #define acsexmplCallbacks_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <baciS.h>
00031
00032
00033 #include <ace/SString.h>
00034
00086 class CommonCallback
00087 {
00088 public:
00092 CommonCallback() {}
00093
00094 protected:
00099 ACE_CString prop;
00100
00106 unsigned int m_count;
00107
00108 private:
00112 void operator=(const CommonCallback&);
00113 };
00115
00123 class MyAlarmdouble : public virtual POA_ACS::Alarmdouble,
00124 protected CommonCallback
00125 {
00126 public:
00131 MyAlarmdouble(ACE_CString _prop) { prop = _prop; }
00132
00136 ~MyAlarmdouble() {}
00137
00148 void
00149 alarm_raised (CORBA::Double value,
00150 const ACSErr::Completion &c,
00151 const ACS::CBDescOut &desc)
00152 throw (CORBA::SystemException);
00153
00164 void
00165 alarm_cleared (CORBA::Double value,
00166 const ACSErr::Completion &c,
00167 const ACS::CBDescOut &desc)
00168 throw (CORBA::SystemException);
00169
00183 CORBA::Boolean
00184 negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc)
00185 throw (CORBA::SystemException)
00186 {
00187 return true;
00188 }
00189
00190 };
00192
00196 class MyCBdouble : public virtual POA_ACS::CBdouble,
00197 protected CommonCallback
00198 {
00199 public:
00204 MyCBdouble(ACE_CString _prop) { prop = _prop; m_count = 0; }
00205
00209 ~MyCBdouble() {}
00210
00222 void
00223 working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00224 throw (CORBA::SystemException);
00225
00237 void
00238 done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00239 throw (CORBA::SystemException);
00240
00254 CORBA::Boolean
00255 negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc)
00256 throw (CORBA::SystemException)
00257 {
00258 return true;
00259 }
00260 };
00262
00266 class MyCBvoid: public virtual POA_ACS::CBvoid,
00267 protected CommonCallback
00268 {
00269 public:
00274 MyCBvoid(ACE_CString _prop) { prop = _prop; }
00275
00279 ~MyCBvoid() {}
00280
00292 void
00293 working (const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00294 throw (CORBA::SystemException);
00295
00306 void
00307 done (const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00308 throw (CORBA::SystemException);
00309
00324 CORBA::Boolean
00325 negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc)
00326 throw (CORBA::SystemException)
00327 {
00328 return true;
00329 }
00330 };
00332
00333 #endif
00334
00335
00336
00337