00001 #ifndef acsexmplPowerSupplyImpl_h
00002 #define acsexmplPowerSupplyImpl_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
00035
00036
00037
00038
00039 #ifndef __cplusplus
00040 #error This is a C++ include file and cannot be used from plain C
00041 #endif
00042
00044 #include <baciCharacteristicComponentImpl.h>
00045 #include <acsexmplExport.h>
00046
00048 #include <acsexmplPowerSupplyS.h>
00049
00051 #include <baciROdouble.h>
00052 #include <baciRWdouble.h>
00053 #include <baciROpattern.h>
00054
00056 #include <baciSmartPropertyPointer.h>
00057
00058 #include "acsexmplPowerSupplyCurrentImpl.h"
00059
00060 using namespace baci;
00061
00068 #define ON_ACTION 0
00069 #define OFF_ACTION 1
00070 #define RESET_ACTION 2
00071
00130 class acsexmpl_EXPORT PowerSupply: public CharacteristicComponentImpl,
00131 public virtual POA_PS::PowerSupply,
00132 public ActionImplementator
00133 {
00134 public:
00141 PowerSupply(
00142 const ACE_CString &name,
00143 maci::ContainerServices * containerServices);
00144
00148 virtual ~PowerSupply();
00149
00150
00171 virtual ActionRequest
00172 invokeAction (int function,
00173 BACIComponent *component_p,
00174 const int &callbackID,
00175 const CBDescIn &descIn,
00176 BACIValue *value_p,
00177 Completion &completion,
00178 CBDescOut &descOut);
00179
00202 virtual ActionRequest
00203 onAction (BACIComponent *component_p,
00204 const int &callbackID,
00205 const CBDescIn &descIn,
00206 BACIValue *value_p,
00207 Completion &completion,
00208 CBDescOut &descOut);
00209
00232 virtual ActionRequest
00233 offAction (BACIComponent *component_p,
00234 const int &callbackID,
00235 const CBDescIn &descIn,
00236 BACIValue *value_p,
00237 Completion &completion,
00238 CBDescOut &descOut);
00239
00262 virtual ActionRequest
00263 resetAction (BACIComponent *component_p,
00264 const int &callbackID,
00265 const CBDescIn &descIn,
00266 BACIValue *value_p,
00267 Completion &completion,
00268 CBDescOut &descOut);
00269
00270
00284 virtual void
00285 on (ACS::CBvoid_ptr cb,
00286 const ACS::CBDescIn &desc)
00287 throw (CORBA::SystemException);
00288
00302 virtual void
00303 off (ACS::CBvoid_ptr cb,
00304 const ACS::CBDescIn &desc)
00305 throw (CORBA::SystemException);
00306
00320 virtual void
00321 reset (ACS::CBvoid_ptr cb,
00322 const ACS::CBDescIn &desc)
00323 throw (CORBA::SystemException);
00324
00333 virtual ACS::RWdouble_ptr
00334 current ()
00335 throw (CORBA::SystemException);
00336
00345 virtual ACS::ROdouble_ptr
00346 readback ()
00347 throw (CORBA::SystemException);
00348
00357 virtual ACS::ROpattern_ptr
00358 status ()
00359 throw (CORBA::SystemException);
00360
00361
00374 virtual void execute()
00375 throw (ACSErr::ACSbaseExImpl);
00376
00377 protected:
00381 SmartPropertyPointer<ROpattern> m_status_sp;
00382
00383
00384 private:
00388 SmartPropertyPointer<ROdouble> m_readback_sp;
00389
00393 SmartPropertyPointer<PowerSupplyCurrent> m_current_sp;
00394
00398 void operator=(const PowerSupply&);
00399 };
00400
00401 #endif
00402
00403
00404