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

Door Class Reference
[ACS Components Examples]

Door is a simple component that utilizes just about every ACS API. More...

#include <acsexmplDoorImpl.h>

Collaboration diagram for Door:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Door (const ACE_CString &name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~Door ()
 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 openAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of asynch.
virtual baci::ActionRequest closeAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of asynch.
virtual void open (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc)
 Opens the door Implementation of IDL open() interface.
virtual void close (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc)
 Closes the door Implementation of IDL close() interface.
virtual void move (CORBA::Double pos)
 Moves the door to the given position Implementation of the IDL move(...) interface.
virtual ACS::ROdouble_ptr position ()
 Property for readback m_position_p Implementation of IDL interface for the property.
virtual ACS::RWdouble_ptr ref_position ()
 Property for reference position Implementation of IDL interface for the property.
virtual ACS::ROlong_ptr substate ()
 Property for substate Implementation of IDL interface for the property.
virtual ACS::ROstring_ptr version ()
 Property for version Implementation of IDL interface for the property.
virtual void execute ()
 Called after initialize to tell the component that it has to be ready to accept incoming functional calls any time.

Private Member Functions

virtual void checkSubstate (CompletionImpl *&error_p)
 Checks substate Checks for the device's substate.
void operator= (const Door &)
 ALMA C++ coding standards state copy operators should be disabled.

Private Attributes

baci::SmartPropertyPointer
< baci::RWdouble > 
m_ref_position_sp
 m_ref_position_sp is the position the Door should be in
baci::SmartPropertyPointer
< baci::ROdouble > 
m_position_sp
 m_position_sp is the Door's actual position
baci::SmartPropertyPointer
< baci::ROlong > 
m_substate_sp
 m_substate_sp is the state the door is currently in
baci::SmartPropertyPointer
< baci::ROstring > 
m_version_sp
 m_version_sp is the Door's current version
DoorThreadm_doorThread_p

Friends

void DoorThread::runLoop ()

Detailed Description

Door is a simple component that utilizes just about every ACS API.

This class implements an example device "Door". It provides both synchronous (move(...)) and asynchronous methods (open() and close()). A control loop thread simulates the door's movements. Error and exception handling have been included. Asynchronous calls are implemented using the callback pattern via a support class. For each xxx action defined in the IDL interface two methods are provided:

Definition at line 157 of file acsexmplDoorImpl.h.


Friends And Related Function Documentation

void DoorThread::runLoop (  )  [friend]

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