Description
The class PowerSupply simulates the behavior of a power supply.
PowerSupply implements three asynchrounous methods (on,
off, and reset) and has three RO/RW properties. One noteworthy
item is that some extra functionality has been given to the m_current_p
property (a RWdouble). This property is set to be the
PowerSupplyCurrent object
(dervied from RWdouble) which overrides the setValue method. This
allows m_current_p to set the value of itself AND m_readback_p (the
power supply's actual current) at the same time.
What can I gain from this example?
- an example derived from the ACS::CharacteristicComponent IDL interface.
- overriding component lifecycle methods (see execute).
- an understanding of simple asynchronous method implementation accomplished by inheriting methods from the ActionImplementator class.
- read-only and read-write property usage.
- writing values to read-only baci::BACI properties by using the property's underlying DevIO instance.
- standard ACS logging macros.
- limited CORBA error handling.
- asynchronous error handling.
- classes derived from baci::BACI properties and overriding of baci::BACI property methods.
- use of smart pointers for properties
Links