Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SlowMount Class Reference
[ACS Components Examples]

#include <acsexmplSlowMountImpl.h>

Inheritance diagram for SlowMount:

Inheritance graph
[legend]
Collaboration diagram for SlowMount:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SlowMount (ACE_CString name, maci::ContainerServices *containerServices)
virtual ~SlowMount ()
virtual baci::ActionRequest invokeAction (int function, baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
virtual baci::ActionRequest obstarAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
virtual baci::ActionRequest objfixAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
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)
virtual void objfix (CORBA::Double az, CORBA::Double elev, ACS::CBvoid_ptr callBack, const ACS::CBDescIn &desc)
virtual ACS::ROdouble_ptr cmdAz ()
virtual ACS::ROdouble_ptr cmdEl ()
virtual ACS::ROdouble_ptr actAz ()
virtual ACS::ROdouble_ptr actEl ()

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)

Private Member Functions

void operator= (const SlowMount &)

Private Attributes

ActionFunction m_actions [2]
baci::SmartPropertyPointer<
baci::ROdouble
m_cmdAz_sp
baci::SmartPropertyPointer<
baci::ROdouble
m_cmdEl_sp
baci::SmartPropertyPointer<
baci::ROdouble
m_actAz_sp
baci::SmartPropertyPointer<
baci::ROdouble
m_actEl_sp

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:


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).



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.

virtual SlowMount::~SlowMount  )  [virtual]
 

Destructor


Member Function Documentation

virtual 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

virtual 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

virtual 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

virtual 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

virtual baci::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).


Implements baci::ActionImplementator.

virtual 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

virtual baci::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).


virtual 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

virtual baci::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).


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

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

m_actEl_sp is the antenna's actual elevation

ActionFunction SlowMount::m_actions[2] [private]
 

Please see ActionFunction. m_actions[0] = obstarAction(...) m_actions[1] = objfixAction(...)

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

m_cmdAz_sp is the antenna's commanded azimuth

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

m_cmdEl_sp is the antenna's commanded elevation


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:36:54 2009 for ACS C++ API by doxygen 1.3.8