ALMA Computing Group
Public Member Functions | Private Types | Private Member Functions | Private Attributes

Mount Class Reference
[ACS Components Examples]

Simulates the behavior of an antenna interface. More...

#include <acsexmplMountImpl.h>

List of all members.

Public Member Functions

 Mount (ACE_CString name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~Mount ()
 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(Mount::* 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 Mount &)
 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

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:

Definition at line 121 of file acsexmplMountImpl.h.


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

Definition at line 72 of file acsexmplMountImpl.cpp.

References m_actions.


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