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

PowerSupply Class Reference
[ACS Components Examples]

Simulates the behavior of a power supply and overwrites an ACS property. More...

#include <acsexmplPowerSupplyImpl.h>

Inheritance diagram for PowerSupply:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PowerSupply (const ACE_CString &name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~PowerSupply ()
 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 onAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of async.
virtual baci::ActionRequest offAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of async.
virtual baci::ActionRequest resetAction (baci::BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, baci::BACIValue *value_p, Completion &completion, CBDescOut &descOut)
 Implementation of async.
virtual void on (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc)
 Switches on the power supply.
virtual void off (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc)
 Switches off the power supply.
virtual void reset (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc)
 Resets the power supply.
virtual ACS::RWdouble_ptr current ()
 Returns a reference to the current_p property (commanded current).
virtual ACS::ROdouble_ptr readback ()
 Returns a reference to the readback_p property (actual current).
virtual ACS::ROpattern_ptr status ()
 Returns a reference to the status_p property (see acsexmplPowerSupplyImpl.cpp).
virtual void execute ()
 Called after initialize to tell the component that it has to be ready to accept incoming functional calls any time.

Protected Attributes

baci::SmartPropertyPointer
< baci::ROpattern > 
m_status_sp
 m_status_sp is the PowerSupply's state (values are in CDB).

Private Member Functions

void operator= (const PowerSupply &)
 ALMA C++ coding standards state copy operators should be disabled.

Private Attributes

baci::SmartPropertyPointer
< baci::ROdouble > 
m_readback_sp
 m_readback_sp is the actual value of PowerSupply's current.
baci::SmartPropertyPointer
< PowerSupplyCurrent
m_current_sp
 m_current_sp is the commanded current.

Detailed Description

Simulates the behavior of a power supply and overwrites an ACS property.

The class PowerSupply simulates the behaviour of a power supply. It provides three methods: on, off and reset. It also provides the properties current, readback and status. Asynchronous calls are implemented using the ...... pattern and the ..... support classes. For each xxx action defined in the IDL interface two methods are provided:

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia
Version:
"@(#) $Id: acsexmplPowerSupplyImpl.h,v 1.106 2008/10/09 08:41:11 cparedes Exp $"

Definition at line 138 of file acsexmplPowerSupplyImpl.h.


Constructor & Destructor Documentation

PowerSupply::PowerSupply ( const ACE_CString &  name,
maci::ContainerServices *  containerServices 
)

Constructor.

Parameters:
name component name
containerService A pointer to the container services

Definition at line 52 of file acsexmplPowerSupplyImpl.cpp.


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