00001 #ifndef acsexmplFilterWheelImpl_h
00002 #define acsexmplFilterWheelImpl_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 <acsexmplFilterWheelS.h>
00037
00038 #include <baciROdouble.h>
00039 #include <baciROlong.h>
00040 #include <baciROstring.h>
00041
00043 #include <baciSmartPropertyPointer.h>
00044
00051 typedef struct {
00052
00053
00054 int step;
00055
00056 char filterName[128];
00057
00058
00059 int delta;
00060 } Descriptor;
00061
00066
00071
00139 class acsexmpl_EXPORT FilterWheel: public baci::CharacteristicComponentImpl,
00140 public virtual POA_acsexmplFilterWheel::FilterWheel,
00141 public baci::ActionImplementator
00142 {
00143 public:
00151 FilterWheel(const ACE_CString& name,maci::ContainerServices * containerServices);
00152
00156 virtual ~FilterWheel();
00157
00158
00159
00187 virtual void initialize();
00188
00212 virtual void execute();
00213
00238 virtual void cleanUp();
00239
00263 virtual void aboutToAbort();
00264
00265
00289 virtual baci::ActionRequest
00290 invokeAction (int function,
00291 baci::BACIComponent *cob_p,
00292 const int &callbackID,
00293 const CBDescIn &descIn,
00294 baci::BACIValue *value_p,
00295 Completion &completion,
00296 CBDescOut &descOut);
00297
00322 virtual baci::ActionRequest
00323 moveFilterAction (baci::BACIComponent *cob_p,
00324 const int &callbackID,
00325 const CBDescIn &descIn,
00326 baci::BACIValue *value_p,
00327 Completion &completion,
00328 CBDescOut &descOut);
00329
00352 virtual baci::ActionRequest
00353 moveSlotAction (baci::BACIComponent *cob_p,
00354 const int &callbackID,
00355 const CBDescIn &descIn,
00356 baci::BACIValue *value_p,
00357 Completion &completion,
00358 CBDescOut &descOut);
00359
00382 virtual baci::ActionRequest
00383 adjustAction (baci::BACIComponent *cob_p,
00384 const int &callbackID,
00385 const CBDescIn &descIn,
00386 baci::BACIValue *value_p,
00387 Completion &completion,
00388 CBDescOut &descOut);
00389
00390
00398 virtual void moveFilterInBeam(const char* , ACS::CBvoid_ptr,
00399 const ACS::CBDescIn&);
00400
00408 virtual void moveSlotInBeam(int, ACS::CBvoid_ptr, const ACS::CBDescIn&);
00409
00415 virtual void adjust(int, ACS::CBvoid_ptr, const ACS::CBDescIn&);
00416
00425 virtual CORBA::Long calibrateFilter(const char* name);
00426
00434 virtual CORBA::Long calibrateWheel(int slot);
00435
00436
00444 virtual ACS::ROdouble_ptr position ();
00445
00453 virtual ACS::ROstring_ptr desc ();
00454
00462 virtual ACS::ROlong_ptr slots ();
00463
00464 private:
00465
00466
00467
00468 ACE_CString m_fullName;
00469
00470
00474 baci::SmartPropertyPointer<baci::ROdouble> m_position_sp;
00475
00479 baci::SmartPropertyPointer<baci::ROstring> m_desc_sp;
00480
00485 baci::SmartPropertyPointer<baci::ROlong>m_slots_sp;
00486
00493 Descriptor* m_wheelConfiguration;
00494
00501 void readConfiguration(Descriptor* descr);
00502
00509 void updateFilter(ACE_CString name, int delta);
00510
00517 void updateWheel(int slot, int step);
00518
00522 void operator=(const FilterWheel&);
00523
00524 };
00525
00526
00527
00528 #endif
00529