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
00045 using namespace baci;
00046
00053 typedef struct {
00054
00055
00056 int step;
00057
00058 char filterName[128];
00059
00060
00061 int delta;
00062 } Descriptor;
00063
00132 class acsexmpl_EXPORT FilterWheel: public CharacteristicComponentImpl,
00133 public virtual POA_acsexmplFilterWheel::FilterWheel,
00134 public ActionImplementator
00135 {
00136 public:
00144 FilterWheel(const ACE_CString& name,maci::ContainerServices * containerServices);
00145
00149 virtual ~FilterWheel();
00150
00151
00152
00179 virtual void initialize()
00180 throw (ACSErr::ACSbaseExImpl);
00181
00204 virtual void execute()
00205 throw (ACSErr::ACSbaseExImpl);
00206
00231 virtual void cleanUp();
00232
00256 virtual void aboutToAbort();
00257
00258
00282 virtual ActionRequest
00283 invokeAction (int function,
00284 BACIComponent *cob_p,
00285 const int &callbackID,
00286 const CBDescIn &descIn,
00287 BACIValue *value_p,
00288 Completion &completion,
00289 CBDescOut &descOut);
00290
00315 virtual ActionRequest
00316 moveFilterAction (BACIComponent *cob_p,
00317 const int &callbackID,
00318 const CBDescIn &descIn,
00319 BACIValue *value_p,
00320 Completion &completion,
00321 CBDescOut &descOut);
00322
00345 virtual ActionRequest
00346 moveSlotAction (BACIComponent *cob_p,
00347 const int &callbackID,
00348 const CBDescIn &descIn,
00349 BACIValue *value_p,
00350 Completion &completion,
00351 CBDescOut &descOut);
00352
00375 virtual ActionRequest
00376 adjustAction (BACIComponent *cob_p,
00377 const int &callbackID,
00378 const CBDescIn &descIn,
00379 BACIValue *value_p,
00380 Completion &completion,
00381 CBDescOut &descOut);
00382
00383
00391 virtual void moveFilterInBeam(const char* , ACS::CBvoid_ptr,
00392 const ACS::CBDescIn&) throw (CORBA::SystemException);
00393
00401 virtual void moveSlotInBeam(int, ACS::CBvoid_ptr, const ACS::CBDescIn&)
00402 throw (CORBA::SystemException);
00403
00409 virtual void adjust(int, ACS::CBvoid_ptr, const ACS::CBDescIn&)
00410 throw (CORBA::SystemException);
00411
00420 virtual CORBA::Long calibrateFilter(const char* name) throw (CORBA::SystemException);
00421
00429 virtual CORBA::Long calibrateWheel(int slot) throw (CORBA::SystemException);
00430
00431
00439 virtual ACS::ROdouble_ptr position ()
00440 throw (CORBA::SystemException);
00441
00449 virtual ACS::ROstring_ptr desc ()
00450 throw (CORBA::SystemException);
00451
00459 virtual ACS::ROlong_ptr slots ()
00460 throw (CORBA::SystemException);
00461
00462 private:
00463
00464
00465
00466 ACE_CString m_fullName;
00467
00468
00472 SmartPropertyPointer<ROdouble> m_position_sp;
00473
00477 SmartPropertyPointer<ROstring> m_desc_sp;
00478
00483 SmartPropertyPointer<ROlong>m_slots_sp;
00484
00491 Descriptor* m_wheelConfiguration;
00492
00499 void readConfiguration(Descriptor* descr);
00500
00507 void updateFilter(ACE_CString name, int delta);
00508
00515 void updateWheel(int slot, int step);
00516
00520 void operator=(const FilterWheel&);
00521
00522 };
00523
00524 #endif
00525