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

RampedPowerSupply Class Reference

#include <acsexmplRampedPowerSupplyImpl.h>

Inheritance diagram for RampedPowerSupply:

Inheritance graph
[legend]
Collaboration diagram for RampedPowerSupply:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RampedPowerSupply (const ACE_CString &name, maci::ContainerServices *containerServices)
 ~RampedPowerSupply ()
virtual ActionRequest invokeAction (int function, BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, BACIValue *value_p, Completion &completion, CBDescOut &descOut)
virtual ActionRequest startRampingAction (BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, BACIValue *value_p, Completion &completion, CBDescOut &descOut)
virtual ActionRequest stopRampingAction (BACIComponent *component_p, const int &callbackID, const CBDescIn &descIn, BACIValue *value_p, Completion &completion, CBDescOut &descOut)
virtual void startRamping (CORBA::Long rampingSteps, ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc) throw (CORBA::SystemException)
virtual void stopRamping (ACS::CBvoid_ptr cb, const ACS::CBDescIn &desc) throw (CORBA::SystemException)
virtual ACS::RWstring_ptr rampingStatus () throw (CORBA::SystemException)
virtual ACS::ROlong_ptr rampingStep () throw (CORBA::SystemException)

Private Member Functions

void operator= (const RampedPowerSupply &)

Private Attributes

SmartPropertyPointer< ROlongm_rampingStep_sp
DevIO< CORBA::Long > * m_rampingStep_devio_p
SmartPropertyPointer< RWstringm_rampingStatus_sp

Detailed Description

The class RampedPowerSupply simulates the behaviour of a ramped power supply and is derived from the PowerSupply IDL interface. This class shows how to utilize inheritance in both the C++ and IDL class/interface.

Asynchronous calls are implemented using the ...... pattern and the ..... support classes. For each xxx action defined in the IDL interface two methods are provided:

Class RampedPowerSupply also provides the properties rampingStatus and rampingSteps in addition to anything inherited from PowerSupply.

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia
Version:
"@(#) $Id: acsexmplRampedPowerSupplyImpl.h,v 1.97 2005/04/14 09:35:59 acaproni Exp $"


Constructor & Destructor Documentation

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

Constructor

Parameters:
poa poa which will activate this and also all other components
name component name

RampedPowerSupply::~RampedPowerSupply  ) 
 

Destructor


Member Function Documentation

virtual ActionRequest RampedPowerSupply::invokeAction int  function,
BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn descIn,
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 Callback::working
  • reqInvokeDone - invoke Callback::done and destroy callback
  • reqDestroy - destroy callback (callback should has been called already by function)

Reimplemented from PowerSupply.

void RampedPowerSupply::operator= const RampedPowerSupply  )  [private]
 

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

virtual ACS::RWstring_ptr RampedPowerSupply::rampingStatus  )  throw (CORBA::SystemException) [virtual]
 

Returns a reference to the rampingStatus property (status). Implementation of IDL interface for the property.

Returns:
a pointer to the BACI property

virtual ACS::ROlong_ptr RampedPowerSupply::rampingStep  )  throw (CORBA::SystemException) [virtual]
 

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

Returns:
a pointer to the BACI property

virtual void RampedPowerSupply::startRamping CORBA::Long  rampingSteps,
ACS::CBvoid_ptr  cb,
const ACS::CBDescIn desc
throw (CORBA::SystemException) [virtual]
 

Starts ramping the power supply. Implementation of IDL startRamping() interface. 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 RampedPowerSupply::startRampingAction The given callback is used to inform the caller when the action is performed.

Parameters:
cb Callback when action has finished.
desc Callback used for holding information on timeout periods

virtual ActionRequest RampedPowerSupply::startRampingAction BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn descIn,
BACIValue value_p,
Completion completion,
CBDescOut descOut
[virtual]
 

Implementation of async. startRamping() method This is the function that actually starts ramping 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 Callback::working.
  • reqInvokeDone - Invoke Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should has been called already by function).


virtual void RampedPowerSupply::stopRamping ACS::CBvoid_ptr  cb,
const ACS::CBDescIn desc
throw (CORBA::SystemException) [virtual]
 

Stops ramping the power supply. Implementation of IDL stopRamping() interface. 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 RampedPowerSupply::stopAction The given callback is used to inform the caller when the action is performed.

Parameters:
cb Callback when action has finished.
desc Callback used for holding information on timeout periods

virtual ActionRequest RampedPowerSupply::stopRampingAction BACIComponent *  component_p,
const int &  callbackID,
const CBDescIn descIn,
BACIValue value_p,
Completion completion,
CBDescOut descOut
[virtual]
 

Implementation of async. stopRamping() method This is the function that actually stops ramping 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 Callback::working.
  • reqInvokeDone - Invoke Callback::done and destroy callback.
  • reqDestroy - Destroy callback (callback should has been called already by function).



Member Data Documentation

SmartPropertyPointer<RWstring> RampedPowerSupply::m_rampingStatus_sp [private]
 

m_rampingStatus_p is the RampedPowerSupply's status in the ramping process.

DevIO<CORBA::Long>* RampedPowerSupply::m_rampingStep_devio_p [private]
 

m_rampingStep_devio_p is the DevIO subclass passed to the RampingStep property when it is created. Essentially the DevIO is used to interact with hardware directly without tying ACS to any specific hardware drivers resulting in added flexibility. Please see acsexmplLongDevIO.h to understand exactly how this is accomplished.

SmartPropertyPointer<ROlong> RampedPowerSupply::m_rampingStep_sp [private]
 

m_rampingStep_p is the RampedPowerSupply's present step in the ramping process.


The documentation for this class was generated from the following file:
Generated on Sun Oct 29 02:31:17 2006 for ACS C++ API by doxygen 1.3.6