00001 #ifndef acscourseMount4Impl_h
00002 #define acscourseMount4Impl_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 #ifndef __cplusplus
00029 #error This is a C++ include file and cannot be used from plain C
00030 #endif
00031
00032 #include <baciCharacteristicComponentImpl.h>
00033 #include <baciROdouble.h>
00034 #include <baciRWdouble.h>
00035
00037 #include <baciSmartPropertyPointer.h>
00038
00044 #include <acscourseMountS.h>
00045 #include "acsThreadManager.h"
00046
00047 using namespace baci;
00048
00049
00081 class Mount4Impl;
00082
00083 class PositionControlThread :public ACS::Thread
00084 {
00085 public:
00086 PositionControlThread(const ACE_CString& name,
00087 Mount4Impl *mount_p,
00088 const ACS::TimeInterval& responseTime=ThreadBase::defaultResponseTime,
00089 const ACS::TimeInterval& sleepTime=ThreadBase::defaultSleepTime);
00090 ~PositionControlThread();
00091
00092 virtual void runLoop();
00093
00094 protected:
00095 Mount4Impl *mount_p;
00096 };
00097
00104 class Mount4Impl: public virtual CharacteristicComponentImpl,
00105 public virtual POA_ACSCOURSE_MOUNT::Mount4,
00106 public ActionImplementator
00107 {
00108 public:
00115 Mount4Impl(const ACE_CString &name, maci::ContainerServices *containerServices);
00116
00120 virtual ~Mount4Impl();
00121
00145 virtual ActionRequest
00146 invokeAction (int function,
00147 BACIComponent *cob_p,
00148 const int &callbackID,
00149 const CBDescIn &descIn,
00150 BACIValue *value_p,
00151 Completion &completion,
00152 CBDescOut &descOut);
00153
00176 virtual ActionRequest
00177 objfixAction (BACIComponent *cob_p,
00178 const int &callbackID,
00179 const CBDescIn &descIn,
00180 BACIValue *value_p,
00181 Completion &completion,
00182 CBDescOut &descOut);
00183
00197 virtual void
00198 objfix (CORBA::Double az,
00199 CORBA::Double elev)
00200 throw (CORBA::SystemException);
00201
00202 virtual void
00203 objfix_async (
00204 CORBA::Double az,
00205 CORBA::Double elev,
00206 ACS::CBvoid_ptr cb,
00207 const ACS::CBDescIn &desc)
00208 throw (CORBA::SystemException);
00209
00218 virtual ACS::ROdouble_ptr
00219 cmdAz ()
00220 throw (CORBA::SystemException);
00221
00230 virtual ACS::ROdouble_ptr
00231 cmdEl ()
00232 throw (CORBA::SystemException);
00233
00242 virtual ACS::ROdouble_ptr
00243 actAz ()
00244 throw (CORBA::SystemException);
00245
00254 virtual ACS::ROdouble_ptr
00255 actEl ()
00256 throw (CORBA::SystemException);
00257
00258
00259 protected:
00260
00261 struct __objfix_action {
00262 double az;
00263 double elev;
00264 };
00265
00269 SmartPropertyPointer<ROdouble> m_cmdAz_sp;
00270
00274 SmartPropertyPointer<ROdouble> m_cmdEl_sp;
00275
00279 SmartPropertyPointer<ROdouble> m_actAz_sp;
00280
00284 SmartPropertyPointer<ROdouble> m_actEl_sp;
00285
00289 void operator=(const Mount4Impl&);
00290
00296 friend class PositionControlThread;
00297 };
00298
00299 #endif