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

Mount Class Reference
[ACS Components Examples]

Contains the defintion of the standard superclass for C++ componentsCORBA generated servant stub. More...

#include <acsexmplMountImpl.h>

Inheritance diagram for Mount:

Inheritance graph
[legend]
Collaboration diagram for Mount:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Mount (ACE_CString name, maci::ContainerServices *containerServices)
virtual ~Mount ()
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 ()
 Mount (const ACE_CString &name, maci::ContainerServices *containerServices)
virtual ~Mount ()
void faultMount ()
void terminate_faultMount ()
void sendAlarm (std::string fFamily, std::string fMember, int code, bool active)

Private Types

typedef baci::ActionRequest(Mount::* 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 Mount &)

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

Contains the defintion of the standard superclass for C++ componentsCORBA generated servant stub.

Simulates the behavior of an antenna interface. 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(Mount::* Mount::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

Mount::Mount ACE_CString  name,
maci::ContainerServices containerServices
 

Constructor

Parameters:
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.
containerService The pointer to the container services

virtual Mount::~Mount  )  [virtual]
 

Destructor

Mount::Mount const ACE_CString &  name,
maci::ContainerServices containerServices
 

Constructor

virtual Mount::~Mount  )  [virtual]
 

Destructor


Member Function Documentation

virtual ACS::ROdouble_ptr Mount::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 Mount::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 Mount::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 Mount::cmdEl  )  [virtual]
 

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

Returns:
pointer to read-only double property cmdEl

void Mount::faultMount  ) 
 

virtual baci::ActionRequest Mount::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 Mount::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 Mount::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 Mount::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 Mount::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 Mount::operator= const Mount  )  [private]
 

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

void Mount::sendAlarm std::string  fFamily,
std::string  fMember,
int  code,
bool  active
 

Send an alarm active or inactive depending on the value of the parameter

void Mount::terminate_faultMount  ) 
 


Member Data Documentation

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

m_actAz_sp is the antenna's actual azimuth

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

m_actEl_sp is the antenna's actual elevation

ActionFunction Mount::m_actions[2] [private]
 

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

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

m_cmdAz_sp is the antenna's commanded azimuth

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

m_cmdEl_sp is the antenna's commanded elevation


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