#include <acsexmplLampWheelImpl.h>
Public Member Functions | |
LampWheel (const ACE_CString &name, maci::ContainerServices *containerServices) | |
virtual | ~LampWheel () |
virtual void | initialize () |
virtual void | execute () |
virtual void | cleanUp () |
virtual void | aboutToAbort () |
virtual baci::ActionRequest | invokeAction (int function, baci::BACIComponent *cob_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut) |
virtual baci::ActionRequest | moveAction (baci::BACIComponent *cob_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut) |
virtual void | move (CORBA::Short, ACS::CBvoid_ptr, const ACS::CBDescIn &) |
virtual ACS::ROdouble_ptr | position () |
virtual ACS::ROstring_ptr | desc () |
virtual ACS::ROlong_ptr | slots () |
Private Member Functions | |
void | operator= (const LampWheel &) |
int | retrieveConfigurationFromCDB (std::list< SlotDescriptor > &config) |
Static Private Member Functions | |
static void | start_hndl (void *data, const XML_Char *el, const XML_Char **attr) |
static void | end_hndl (void *data, const XML_Char *el) |
static void | char_hndl (void *data, const XML_Char *s, int len) |
Private Attributes | |
ACE_CString | m_fullName |
baci::SmartPropertyPointer < baci::ROdouble > | m_position_sp |
baci::SmartPropertyPointer < baci::ROstring > | m_desc_sp |
baci::SmartPropertyPointer < baci::ROlong > | m_slots_sp |
std::list< SlotDescriptor > | m_lampWheelConfiguration |
The class LampWheel class simulates the behavior of a very simple lamp wheel using an asynchronous method to rotate it.
The component reads the wheel data from the CDB. The lamp wheel is caracterized by a description, a number of available slots and a description of the used slots. All these data reside on the CDB. In particular, the number of defined slots is not defined a priori but is retrieved by parsing the CDB record for the component.
At startup, the component read the description of the wheel from the CDB and stores the configuration into a list. The move method moves the wheel to the position defined for the passed slot number. The position is read from the list (i.e. from the CDB). A log message inform the user about the selected lamp.
LampWheel::LampWheel | ( | const ACE_CString & | name, | |
maci::ContainerServices * | containerServices | |||
) |
Constructor
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. |