00001 #ifndef acsexmplLampWheelImpl_h
00002 #define acsexmplLampWheelImpl_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 #ifndef __cplusplus
00031 #error This is a C++ include file and cannot be used from plain C
00032 #endif
00033
00034 #include <baciCharacteristicComponentImpl.h>
00035 #include <acsexmplExport.h>
00036 #include <acsexmplLampWheelS.h>
00037
00038 #include <baciROdouble.h>
00039 #include <baciROlong.h>
00040 #include <baciROstring.h>
00041
00043 #include <baciSmartPropertyPointer.h>
00044
00045 #include <expat.h>
00046 #include <list>
00047
00048 using namespace baci;
00049
00051 typedef struct {
00052 unsigned int num;
00053 char lampName[128];
00054 unsigned int warmUpTime;
00055 unsigned int watt;
00056 unsigned int pos;
00057 } SlotDescriptor;
00058
00113 class acsexmpl_EXPORT LampWheel: public CharacteristicComponentImpl,
00114 public virtual POA_acsexmplLampWheel::LampWheel,
00115 public ActionImplementator
00116 {
00117 public:
00124 LampWheel(
00125 const ACE_CString& name,
00126 maci::ContainerServices * containerServices);
00127
00131 virtual ~LampWheel();
00132
00133
00134
00160 virtual void initialize()
00161 throw (ACSErr::ACSbaseExImpl);
00162
00185 virtual void execute()
00186 throw (ACSErr::ACSbaseExImpl);
00187
00212 virtual void cleanUp();
00213
00237 virtual void aboutToAbort();
00238
00239
00263 virtual ActionRequest
00264 invokeAction (int function,
00265 BACIComponent *cob_p,
00266 const int &callbackID,
00267 const CBDescIn &descIn,
00268 BACIValue *value_p,
00269 Completion &completion,
00270 CBDescOut &descOut);
00271
00294 virtual ActionRequest
00295 moveAction (BACIComponent *cob_p,
00296 const int &callbackID,
00297 const CBDescIn &descIn,
00298 BACIValue *value_p,
00299 Completion &completion,
00300 CBDescOut &descOut);
00301
00302
00317 virtual void move(CORBA::Short, ACS::CBvoid_ptr,
00318 const ACS::CBDescIn&) throw (CORBA::SystemException);
00319
00327 virtual ACS::ROdouble_ptr position ()
00328 throw (CORBA::SystemException);
00329
00337 virtual ACS::ROstring_ptr desc ()
00338 throw (CORBA::SystemException);
00339
00347 virtual ACS::ROlong_ptr slots ()
00348 throw (CORBA::SystemException);
00349
00350 private:
00351
00352
00353
00354 ACE_CString m_fullName;
00355
00356
00360 SmartPropertyPointer<ROdouble> m_position_sp;
00361
00365 SmartPropertyPointer<ROstring> m_desc_sp;
00366
00371 SmartPropertyPointer<ROlong>m_slots_sp;
00372
00378 std::list<SlotDescriptor> m_lampWheelConfiguration;
00379
00383 void operator=(const LampWheel&);
00384
00392 int retrieveConfigurationFromCDB(std::list<SlotDescriptor>& config);
00393
00399 static void start_hndl(void *data, const XML_Char *el, const XML_Char **attr);
00400
00406 static void end_hndl(void *data, const XML_Char *el);
00407
00413 static void char_hndl(void *data, const XML_Char *s, int len);
00414
00415 };
00416
00417 #endif
00418
00419
00420