Go to the documentation of this file.00001 #ifndef baciTestClassImpl_h
00002 #define baciTestClassImpl_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
00031
00032
00033
00034
00040 #ifndef __cplusplus
00041 #error This is a C++ include file and cannot be used from plain C
00042 #endif
00043
00044 #include <acsutil.h>
00045
00046 #include <baci.h>
00047 #include <baciTestS.h>
00048
00049 #include <baciROdouble.h>
00050 #include <baciRWdouble.h>
00051 #include <baciROfloat.h>
00052 #include <baciRWfloat.h>
00053 #include <baciROlong.h>
00054 #include <baciRWlong.h>
00055 #include <baciROpattern.h>
00056 #include <baciRWpattern.h>
00057 #include <baciROstring.h>
00058 #include <baciRWstring.h>
00059
00060 #include <baciROdoubleSeq.h>
00061 #include <baciRWdoubleSeq.h>
00062 #include <baciROfloatSeq.h>
00063 #include <baciRWfloatSeq.h>
00064
00065 #include <baciROlongSeq.h>
00066 #include <baciRWlongSeq.h>
00067
00068 #include <baciCharacteristicComponentImpl.h>
00069
00070 #include <baciSmartPropertyPointer.h>
00071
00077 class BaciTestClassImpl: public baci::CharacteristicComponentImpl,
00078 public POA_BACI_TEST::BaciTestClass,
00079 public baci::ActionImplementator
00080 {
00081
00082 public:
00083
00084 BaciTestClassImpl(
00085 const ACE_CString& name,
00086 maci::ContainerServices *,
00087 bool monitoring=true);
00088
00092 virtual ~BaciTestClassImpl();
00093
00094
00095
00113 virtual baci::ActionRequest invokeAction(int function,
00114 baci::BACIComponent* component_p, const int &callbackID,
00115 const CBDescIn& descIn, baci::BACIValue* value,
00116 Completion& completion, CBDescOut& descOut);
00117
00118
00119
00120
00121 virtual baci::ActionRequest onAction(baci::BACIComponent* component_p, int callbackID,
00122 const CBDescIn& descIn, baci::BACIValue* value,
00123 Completion& completion, CBDescOut& descOut);
00124
00125
00126
00127
00128 virtual baci::ActionRequest offAction(baci::BACIComponent* component_p, int callbackID,
00129 const CBDescIn& descIn, baci::BACIValue* value,
00130 Completion& completion, CBDescOut& descOut);
00131
00132
00133
00134
00135 virtual baci::ActionRequest resetAction(baci::BACIComponent* component_p, int callbackID,
00136 const CBDescIn& descIn, baci::BACIValue* value,
00137 Completion& completion, CBDescOut& descOut);
00138
00139
00140
00141
00142
00146 virtual void shutdown ();
00147
00155 virtual void on (
00156 ACS::CBvoid_ptr cb,
00157 const ACS::CBDescIn & desc
00158 );
00159
00167 virtual void off (
00168 ACS::CBvoid_ptr cb,
00169 const ACS::CBDescIn & desc
00170 );
00171
00179 virtual void reset (
00180 ACS::CBvoid_ptr cb,
00181 const ACS::CBDescIn & desc
00182 );
00183
00187 virtual void turnOnMonitoring()
00188 {
00189 try
00190 {
00191 startPropertiesMonitoring();
00192 }
00193 catch(ACSErr::ACSbaseExImpl &ex)
00194 {
00195 ex.log();
00196 }
00197
00198 }
00199
00203 virtual void turnOffMonitoring()
00204 {
00205 try
00206 {
00207 stopPropertiesMonitoring();
00208 }
00209 catch(ACSErr::ACSbaseExImpl &ex)
00210 {
00211 ex.log();
00212 }
00213 }
00214
00218 virtual CORBA::Boolean isPropertiesMonitoringActive();
00219
00224 virtual ACS::RWdouble_ptr RWdoubleWithErrorDevIOProp ();
00225
00230 virtual ACS::RWdouble_ptr RWdoubleWithDevIOProp ();
00231
00236 virtual ACS::RWdouble_ptr RWdoubleProp ();
00237
00242 virtual ACS::ROdouble_ptr ROdoubleProp ();
00243
00248 virtual ACS::RWfloat_ptr RWfloatProp ();
00249
00254 virtual ACS::ROfloat_ptr ROfloatProp ();
00255
00260 virtual ACS::RWlong_ptr RWlongProp ();
00261
00266 virtual ACS::ROlong_ptr ROlongProp ();
00267
00272 virtual ACS::ROpattern_ptr ROpatternProp ();
00273
00278 virtual ACS::RWpattern_ptr RWpatternProp ();
00279
00283 virtual ACS::ROstring_ptr ROstringProp ();
00284
00288 virtual ACS::RWstring_ptr RWstringProp ();
00289
00290
00295 virtual ACS::RWdoubleSeq_ptr RWdoubleSeqProp ();
00296
00301 virtual ACS::ROdoubleSeq_ptr ROdoubleSeqProp ();
00302
00307 virtual ACS::RWfloatSeq_ptr RWfloatSeqProp ();
00308
00313 virtual ACS::ROfloatSeq_ptr ROfloatSeqProp ();
00314
00319 virtual ACS::RWlongSeq_ptr RWlongSeqProp ();
00320
00325 virtual ACS::ROlongSeq_ptr ROlongSeqProp ();
00326
00327
00328
00329 private:
00330
00334 typedef baci::ActionRequest (BaciTestClassImpl::*ActionFunction)(baci::BACIComponent* component_p, int callbackID,
00335 const CBDescIn& descIn, baci::BACIValue* value,
00336 Completion& completion, CBDescOut& descOut);
00337
00339 bool m_shutdown;
00340
00342 ActionFunction m_actions[3];
00343
00345 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleWithErrorDevIOProp_sp;
00346 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleWithDevIOProp_sp;
00347 baci::SmartPropertyPointer<baci::ROdouble> m_ROdoubleProp_sp;
00348 baci::SmartPropertyPointer<baci::RWdouble> m_RWdoubleProp_sp;
00349 baci::SmartPropertyPointer<baci::ROfloat> m_ROfloatProp_sp;
00350 baci::SmartPropertyPointer<baci::RWfloat> m_RWfloatProp_sp;
00351 baci::SmartPropertyPointer<baci::ROlong> m_ROlongProp_sp;
00352 baci::SmartPropertyPointer<baci::RWlong> m_RWlongProp_sp;
00353 baci::SmartPropertyPointer<baci::ROpattern> m_ROpatternProp_sp;
00354 baci::SmartPropertyPointer<baci::RWpattern> m_RWpatternProp_sp;
00355 baci::SmartPropertyPointer<baci::ROstring> m_ROstringProp_sp;
00356 baci::SmartPropertyPointer<baci::RWstring> m_RWstringProp_sp;
00357
00358 baci::SmartPropertyPointer<baci::ROdoubleSeq> m_ROdoubleSeqProp_sp;
00359 baci::SmartPropertyPointer<baci::RWdoubleSeq> m_RWdoubleSeqProp_sp;
00360 baci::SmartPropertyPointer<baci::ROfloatSeq> m_ROfloatSeqProp_sp;
00361 baci::SmartPropertyPointer<baci::RWfloatSeq> m_RWfloatSeqProp_sp;
00362 baci::SmartPropertyPointer<baci::ROlongSeq> m_ROlongSeqProp_sp;
00363 baci::SmartPropertyPointer<baci::RWlongSeq> m_RWlongSeqProp_sp;
00364
00365 };
00366
00367 #endif
00368
00369
00370
00371
00372
00373