ALMA Computing Group

SlowMount Class Reference
[ACS Components Examples]

Similar to Mount, but simulate the movements of the antenna in a 30 secs time interval. More...

#include <acsexmplSlowMountImpl.h>

List of all members.

Public Member Functions

 SlowMount (ACE_CString name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~SlowMount ()
 Destructor.
virtual baci::ActionRequest invokeAction (int function, baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Action dispatcher function This function is called whenever an asynchronous request has to be handled.
virtual baci::ActionRequest obstarAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of asynchronous MOUNT_ACS::Mount::obstar() method This is the function that actually runs obstar(...) and, when completed, invokes the callback installed by the client when it requested the action.
virtual baci::ActionRequest objfixAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of asynchronous MOUNT_ACS::Mount::objfix() method This is the function that actually runs objfix(...) and, when completed, invokes the callback installed by the client when it requested the action.
virtual void obstar (CORBA::Double ra, CORBA::Double dec, CORBA::Double pmRa, CORBA::Double pmDec, CORBA::Double radVel, CORBA::Double par, MOUNT_ACS::Mount::coordType type, ACS::CBvoid_ptr callBack, const ACS::CBDescIn &desc)
 (Pre)sets a new equatorial source for the antenna to track.
virtual void objfix (CORBA::Double az, CORBA::Double elev, ACS::CBvoid_ptr callBack, const ACS::CBDescIn &desc)
 (Pre)sets a new non-moving position for the antenna.
virtual ACS::ROdouble_ptr cmdAz ()
 Returns a reference to the cmdAz property Implementation of IDL interface for the property.
virtual ACS::ROdouble_ptr cmdEl ()
 Returns a reference to the cmdEl property Implementation of IDL interface for the property.
virtual ACS::ROdouble_ptr actAz ()
 Returns a reference to the actAz property Implementation of IDL interface for the property.
virtual ACS::ROdouble_ptr actEl ()
 Returns a reference to the actEl property Implementation of IDL interface for the property.

Private Types

typedef baci::ActionRequest(SlowMount::* ActionFunction )(baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Definition of ActionFunction (member function of Mount class) ActionFunction is used to run the asynchronous methods from within invokeAction(...) without actually having to specify calls to each ...Action(...) method.

Private Member Functions

void operator= (const SlowMount &)
 ALMA C++ coding standards state copy operators should be disabled.

Private Attributes

ActionFunction m_actions [2]
 Please see ActionFunction.
baci::SmartPropertyPointer<
baci::ROdouble > 
m_cmdAz_sp
 m_cmdAz_sp is the antenna's commanded azimuth
baci::SmartPropertyPointer<
baci::ROdouble > 
m_cmdEl_sp
 m_cmdEl_sp is the antenna's commanded elevation
baci::SmartPropertyPointer<
baci::ROdouble > 
m_actAz_sp
 m_actAz_sp is the antenna's actual azimuth
baci::SmartPropertyPointer<
baci::ROdouble > 
m_actEl_sp
 m_actEl_sp is the antenna's actual elevation


Detailed Description

Similar to Mount, but simulate the movements of the antenna in a 30 secs time interval.

The class Mount is a good example of a component and simulates the behaviour of an antenna interface. It provides two asynchronous methods: objstar and objfix. The methods only write the data into virtual properties instead of hardware. Asynchronous calls are implemented using the ...... pattern and the ..... support classes. For each xxx action defined in the IDL interface two methods are provided:

Definition at line 107 of file acsexmplSlowMountImpl.h.


Member Typedef Documentation

typedef baci::ActionRequest(SlowMount::* SlowMount::ActionFunction)(baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut) [private]
 

Definition of ActionFunction (member function of Mount class) ActionFunction is used to run the asynchronous methods from within invokeAction(...) without actually having to specify calls to each ...Action(...) method.

This is easily accomplished since all ...Action(...) methods return an baci::ActionRequest.

Parameters:
component_p Owner of the action.
callbackID ID of the callback to be notified.
descIn Callback descriptor (passed by client).
value_p Action data (e.g. value to be set).
completion Error handing structure.
descOut Callback descriptor which will be passed to client.
Returns:
Request to be performed by BACI.
  • reqNone - Do nothing (action will be kept in queue).
  • reqInvokeWorking - Invoke <type>Callback::working.
  • reqInvokeDone - Invoke <type>Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should has been called already by function).


Definition at line 349 of file acsexmplSlowMountImpl.h.


Constructor & Destructor Documentation

SlowMount::SlowMount ACE_CString  name,
maci::ContainerServices *  containerServices
 

Constructor.

Parameters:
poa Poa which will activate this and also all other components.
name component's name. This is also the name that will be used to find the configuration data for the component in the Configuration Database.
Definition at line 65 of file acsexmplSlowMountImpl.cpp.

References m_actions, objfixAction(), and obstarAction().

SlowMount::~SlowMount  )  [virtual]
 

Destructor.

Definition at line 81 of file acsexmplSlowMountImpl.cpp.


Member Function Documentation

ACS::ROdouble_ptr SlowMount::actAz  )  [virtual]
 

Returns a reference to the actAz property Implementation of IDL interface for the property.

Returns:
pointer to read-only double property actAz

Definition at line 304 of file acsexmplSlowMountImpl.cpp.

References m_actAz_sp.

Referenced by objfixAction().

ACS::ROdouble_ptr SlowMount::actEl  )  [virtual]
 

Returns a reference to the actEl property Implementation of IDL interface for the property.

Returns:
pointer to read-only double property actEl

Definition at line 317 of file acsexmplSlowMountImpl.cpp.

References m_actEl_sp.

Referenced by objfixAction().

ACS::ROdouble_ptr SlowMount::cmdAz  )  [virtual]
 

Returns a reference to the cmdAz property Implementation of IDL interface for the property.

Returns:
pointer to read-only double property cmdAz

Definition at line 278 of file acsexmplSlowMountImpl.cpp.

References m_cmdAz_sp.

ACS::ROdouble_ptr SlowMount::cmdEl  )  [virtual]
 

Returns a reference to the cmdEl property Implementation of IDL interface for the property.

Returns:
pointer to read-only double property cmdEl

Definition at line 291 of file acsexmplSlowMountImpl.cpp.

References m_cmdEl_sp.

ActionRequest SlowMount::invokeAction int  function,
baci::BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn &  descIn,
baci::BACIValue *  value_p,
Completion &  completion,
CBDescOut &  descOut
[virtual]
 

Action dispatcher function This function is called whenever an asynchronous request has to be handled.

It receives (as parameters) the description of the function and selects the proper implementation to call.

Parameters:
function Action funtion to be invoked.
component_p Owner of the action.
callbackID ID of the callback to be notified.
descIn Callback descriptor (passed by client).
value_p Action data (e.g. value to be set).
completion Error handing structure.
descOut Callback descriptor which will be passed to client.
Returns:
Request to be performed by BACI
  • reqNone - Do nothing (action will be kept in queue).
  • reqInvokeWorking - Invoke <type>Callback::working.
  • reqInvokeDone - Invoke <type>Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should have been called already by function).


Definition at line 89 of file acsexmplSlowMountImpl.cpp.

References m_actions.

void SlowMount::objfix CORBA::Double  az,
CORBA::Double  elev,
ACS::CBvoid_ptr  callBack,
const ACS::CBDescIn &  desc
[virtual]
 

(Pre)sets a new non-moving position for the antenna.

The position coordinates are given in azimuth and elevation. The actual az and elev values are written to the properties cmdAz, cmdEl, actAz and actEl.

This method just registers the request in the asyncronous queue, together with the associated callback and returns control immediatly. The actual action will be invoked asyncronously by the asynchonous call manager by calling Mount::objfixAction(...). The given callback is used to inform the caller when the action is performed.

Parameters:
az position azimuth (degree)
elev position elevation (degree)
callBack Callback when action has finished.
desc Callback used for holding information on timeout periods
Returns:
void

Definition at line 357 of file acsexmplSlowMountImpl.cpp.

References __objfix_action::az, and __objfix_action::elev.

ActionRequest SlowMount::objfixAction baci::BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn &  descIn,
baci::BACIValue *  value_p,
Completion &  completion,
CBDescOut &  descOut
[virtual]
 

Implementation of asynchronous MOUNT_ACS::Mount::objfix() method This is the function that actually runs objfix(...) and, when completed, invokes the callback installed by the client when it requested the action.

Parameters:
component_p Owner of the action.
callbackID ID of the callback to be notified.
descIn Callback descriptor (passed by client).
value_p Action data (e.g. value to be set).
completion Error handing structure.
descOut Callback descriptor which will be passed to client.
Returns:
Request to be performed by BACI.
  • reqNone - Do nothing (action will be kept in queue).
  • reqInvokeWorking - Invoke <type>Callback::working.
  • reqInvokeDone - Invoke <type>Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should has been called already by function).


Definition at line 163 of file acsexmplSlowMountImpl.cpp.

References actAz(), actEl(), __objfix_action::az, __objfix_action::elev, m_actAz_sp, m_actEl_sp, m_cmdAz_sp, and m_cmdEl_sp.

Referenced by SlowMount().

void SlowMount::obstar CORBA::Double  ra,
CORBA::Double  dec,
CORBA::Double  pmRa,
CORBA::Double  pmDec,
CORBA::Double  radVel,
CORBA::Double  par,
MOUNT_ACS::Mount::coordType  type,
ACS::CBvoid_ptr  callBack,
const ACS::CBDescIn &  desc
[virtual]
 

(Pre)sets a new equatorial source for the antenna to track.

The source position is given in geocentric equatorial J2000 coordinates. The actual ra and dec coordinates are written to the properties cmdAz, cmdEl, actAz and actEl.

This method just registers the request in the asyncronous queue, together with the associated callback and returns control immediatly. The actual action will be invoked asyncronously by the asynchonous call manager by calling Mount::obstarAction(...). The given callback is used to inform the caller when the action is performed.

Parameters:
ra source right ascension (hour)
dec source declination (hour)
pmRa source sky proper motion in right ascension (arc-sec/year)
pmDec source sky proper motion in declination (arc-sec/year)
radVel source radial velocity (kilometer/sec)
par source parallax correction (arc-sec)
type Apparent or Mean
callBack Callback when action has finished.
desc Callback used for holding information on timeout periods
Returns:
void

Definition at line 330 of file acsexmplSlowMountImpl.cpp.

References __obstar_action::dec, __obstar_action::par, __obstar_action::pmDec, __obstar_action::pmRa, __obstar_action::ra, __obstar_action::radVel, and __obstar_action::type.

ActionRequest SlowMount::obstarAction baci::BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn &  descIn,
baci::BACIValue *  value_p,
Completion &  completion,
CBDescOut &  descOut
[virtual]
 

Implementation of asynchronous MOUNT_ACS::Mount::obstar() method This is the function that actually runs obstar(...) and, when completed, invokes the callback installed by the client when it requested the action.

Parameters:
component_p Owner of the action.
callbackID ID of the callback to be notified.
descIn Callback descriptor (passed by client).
value_p Action data (e.g. value to be set).
completion Error handing structure.
descOut Callback descriptor which will be passed to client.
Returns:
Request to be performed by BACI.
  • reqNone - Do nothing (action will be kept in queue).
  • reqInvokeWorking - Invoke <type>Callback::working.
  • reqInvokeDone - Invoke <type>Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should has been called already by function).


Definition at line 113 of file acsexmplSlowMountImpl.cpp.

References __obstar_action::dec, m_actAz_sp, m_actEl_sp, m_cmdAz_sp, m_cmdEl_sp, and __obstar_action::ra.

Referenced by SlowMount().

void SlowMount::operator= const SlowMount  )  [private]
 

ALMA C++ coding standards state copy operators should be disabled.


Member Data Documentation

baci::SmartPropertyPointer<baci::ROdouble> SlowMount::m_actAz_sp [private]
 

m_actAz_sp is the antenna's actual azimuth

Definition at line 376 of file acsexmplSlowMountImpl.h.

Referenced by actAz(), objfixAction(), and obstarAction().

baci::SmartPropertyPointer<baci::ROdouble> SlowMount::m_actEl_sp [private]
 

m_actEl_sp is the antenna's actual elevation

Definition at line 381 of file acsexmplSlowMountImpl.h.

Referenced by actEl(), objfixAction(), and obstarAction().

ActionFunction SlowMount::m_actions[2] [private]
 

Please see ActionFunction.

m_actions[0] = obstarAction(...) m_actions[1] = objfixAction(...) Definition at line 361 of file acsexmplSlowMountImpl.h.

Referenced by invokeAction(), and SlowMount().

baci::SmartPropertyPointer<baci::ROdouble> SlowMount::m_cmdAz_sp [private]
 

m_cmdAz_sp is the antenna's commanded azimuth

Definition at line 366 of file acsexmplSlowMountImpl.h.

Referenced by cmdAz(), objfixAction(), and obstarAction().

baci::SmartPropertyPointer<baci::ROdouble> SlowMount::m_cmdEl_sp [private]
 

m_cmdEl_sp is the antenna's commanded elevation

Definition at line 371 of file acsexmplSlowMountImpl.h.

Referenced by cmdEl(), objfixAction(), and obstarAction().


The documentation for this class was generated from the following files: