Go to the documentation of this file.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
00049 typedef struct {
00050 unsigned int num;
00051 char lampName[128];
00052 unsigned int warmUpTime;
00053 unsigned int watt;
00054 unsigned int pos;
00055 } SlotDescriptor;
00056
00062
00067
00121 class acsexmpl_EXPORT LampWheel: public baci::CharacteristicComponentImpl,
00122 public virtual POA_acsexmplLampWheel::LampWheel,
00123 public baci::ActionImplementator
00124 {
00125 public:
00132 LampWheel(
00133 const ACE_CString& name,
00134 maci::ContainerServices * containerServices);
00135
00139 virtual ~LampWheel();
00140
00141
00142
00169 virtual void initialize();
00170
00194 virtual void execute();
00195
00220 virtual void cleanUp();
00221
00245 virtual void aboutToAbort();
00246
00247
00271 virtual baci::ActionRequest
00272 invokeAction (int function,
00273 baci::BACIComponent *cob_p,
00274 const int &callbackID,
00275 const CBDescIn &descIn,
00276 baci::BACIValue *value_p,
00277 Completion &completion,
00278 CBDescOut &descOut);
00279
00302 virtual baci::ActionRequest
00303 moveAction (baci::BACIComponent *cob_p,
00304 const int &callbackID,
00305 const CBDescIn &descIn,
00306 baci::BACIValue *value_p,
00307 Completion &completion,
00308 CBDescOut &descOut);
00309
00310
00325 virtual void move(CORBA::Short, ACS::CBvoid_ptr,
00326 const ACS::CBDescIn&);
00327
00335 virtual ACS::ROdouble_ptr position ();
00336
00344 virtual ACS::ROstring_ptr desc ();
00345
00353 virtual ACS::ROlong_ptr slots ();
00354
00355 private:
00356
00357
00358
00359 ACE_CString m_fullName;
00360
00361
00365 baci::SmartPropertyPointer<baci::ROdouble> m_position_sp;
00366
00370 baci::SmartPropertyPointer<baci::ROstring> m_desc_sp;
00371
00376 baci::SmartPropertyPointer<baci::ROlong>m_slots_sp;
00377
00383 std::list<SlotDescriptor> m_lampWheelConfiguration;
00384
00388 void operator=(const LampWheel&);
00389
00397 int retrieveConfigurationFromCDB(std::list<SlotDescriptor>& config);
00398
00404 static void start_hndl(void *data, const XML_Char *el, const XML_Char **attr);
00405
00411 static void end_hndl(void *data, const XML_Char *el);
00412
00418 static void char_hndl(void *data, const XML_Char *s, int len);
00419
00420 };
00421
00422
00423
00424 #endif
00425
00426
00427