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

FridgeControl Class Reference
[ACS Components Examples]

FridgeControl shows BACI threads as well as a notification channel supplier. More...

#include <acsexmplFridgeImpl.h>

Collaboration diagram for FridgeControl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FridgeControl (const ACE_CString &name, maci::ContainerServices *containerServices)
 Constructor.
virtual ~FridgeControl ()
 Destructor.
virtual void cleanUp ()
 Called after the last functional call to the component has finished.
void updateTemperature ()
 Updates the temperature from the physical device.
virtual void on ()
 Turn on the fridge.
virtual void off ()
 Turn off the fridge.
virtual void open ()
 Open the door.
virtual void close ()
 Close the door.
virtual ACS::RWdouble_ptr refTemperature ()
 Property refTemperature is like a thermostat for the fridge.
virtual FRIDGE::ROOnOffStates_ptr powerStatus ()
 Property powerStatus shows whether the power is on or off.
virtual FRIDGE::ROOpClStates_ptr doorStatus ()
 Property doorStatus shows the position of the door.
virtual ACS::ROdouble_ptr currTemperature ()
 Property currTemperature shows the fridge's actual temperature.

Private Member Functions

virtual void loadData ()
 Converts this devices useful data into a temperatureDataBlockEvent structure and then publishes that onto an event channel.
void operator= (const FridgeControl &)
 ALMA C++ coding standards state copy operators should be disabled.

Private Attributes

baci::SmartPropertyPointer
< baci::RWdouble > 
m_refTemperature_sp
 m_refTemperature_sp is the temperature we want the fridge to be.
baci::SmartPropertyPointer
< ROEnumImpl< ACS_ENUM_T(FRIDGE::OnOffStates),
POA_FRIDGE::ROOnOffStates > > 
m_powerStatus_sp
 The fridge can be either turned on or off.
baci::SmartPropertyPointer
< ROEnumImpl< ACS_ENUM_T(FRIDGE::OpClStates),
POA_FRIDGE::ROOpClStates > > 
m_doorStatus_sp
 The fridge's door can be either opened or closed.
baci::SmartPropertyPointer
< baci::ROdouble > 
m_currTemperature_sp
 m_currTemperature_p is the temperature the fridge actually is.
FridgeThreadm_controlLoop_p
 m_controlLoop_p is only started once the fridge has been turned on().
nc::SimpleSupplier * m_FridgeSupplier_p
 This is the Supplier derived class used to publish data to the event channel.

Detailed Description

FridgeControl shows BACI threads as well as a notification channel supplier.

The class FridgeControl simulates the behaviour of a fridge. It provides four synchronous methods: on, off, open, and close. It also provides the properties: refTemperature, powerStatus, doorStatus, and currTemperature. powerStatus and doorStatus are both enums. Finally, FridgeControl is also a Supplier for the "fridge" notification channel.

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia
Version:
"@(#) $Id: acsexmplFridgeImpl.h,v 1.115 2008/10/01 04:30:47 cparedes Exp $"

Definition at line 152 of file acsexmplFridgeImpl.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
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.

Definition at line 103 of file acsexmplFridgeImpl.cpp.

References FRIDGE::CHANNELNAME_FRIDGE, and m_FridgeSupplier_p.


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