#include <baciCharacteristicComponentImpl.h>
Public Member Functions | |
CharacteristicComponentImpl (const ACE_CString &name, maci::ContainerServices *containerServices, bool monitoringProperties=true) | |
virtual | ~CharacteristicComponentImpl () |
BACIComponent * | getComponent () const |
virtual ACS::CharacteristicComponentDesc * | descriptor () |
void | addPropertyToDesc (ACS::Property_ptr prop) |
virtual void | __execute () |
virtual void | __aboutToAbort () |
virtual void | __cleanUp () |
void | startPropertiesMonitoring () |
void | stopPropertiesMonitoring () |
bool | isPropertiesMonitoringActive () |
Protected Attributes | |
ACS::CharacteristicComponentDesc_var | desc_m |
Private Member Functions | |
void | operator= (const CharacteristicComponentImpl &) |
CharacteristicComponentImpl (const CharacteristicComponentImpl &) | |
Private Attributes | |
bool | monitoringProperties_mp |
BACIComponent * | component_mp |
This class implements the ACS DO. All the standard methods and macros necessary for the CORBA interface implementation and the MACI-DLL support are in this class.
baci::CharacteristicComponentImpl::CharacteristicComponentImpl | ( | const ACE_CString & | name, | |
maci::ContainerServices * | containerServices, | |||
bool | monitoringProperties = true | |||
) |
Constructor. The CharacteristicComponent shall be considered an abstract class and at the end of the constructor an CharacteristicComponent is not initilized (i.e. initilization() would return 1 == incomplete).
Tha | name of the Component | |
containerServices | pointer to services provided by the container | |
monitoringProperties | flag that indicates if monitoring of properties has to be turned on or not. Default is monitroing turned on (true). Be aware that turning monitoring off means that monitors created by users, archive monitors and alarm monitors will be turned off! If monitoringProperties flag is set to false an user has to take care for turning the monitoring on and also to turn the monitoring off when a component is deleted. |
virtual baci::CharacteristicComponentImpl::~CharacteristicComponentImpl | ( | ) | [virtual] |
Destructor
baci::CharacteristicComponentImpl::CharacteristicComponentImpl | ( | const CharacteristicComponentImpl & | ) | [private] |
ALMA C++ coding standards state copy constructors should be disabled.
virtual void baci::CharacteristicComponentImpl::__aboutToAbort | ( | ) | [virtual] |
The function stops the threads before calling aboutToAbort()
virtual void baci::CharacteristicComponentImpl::__cleanUp | ( | ) | [virtual] |
The function stops the threads before calling cleanUp()
virtual void baci::CharacteristicComponentImpl::__execute | ( | ) | [virtual] |
The function creates and starts the thread before calling execute
ACSErr::ACSbaseExImpl |
void baci::CharacteristicComponentImpl::addPropertyToDesc | ( | ACS::Property_ptr | prop | ) |
Add a property to the descriptor desc_m
fun | The idl accessor of the property | |
name | The name of the property | |
propSet | The property set of the property |
virtual ACS::CharacteristicComponentDesc* baci::CharacteristicComponentImpl::descriptor | ( | ) | [virtual] |
Descriptor of the CharacteristicComponent This method returns a pointer to this CharacteristicComponent's descriptor. The descriptor contains data (i.e., DO reference, name, UID, etc) used by typical clients retrieved in only one network call. However, the descriptor ONLY contains named members that are declared by BACI and not a specific control system.
BACIComponent* baci::CharacteristicComponentImpl::getComponent | ( | ) | const [inline] |
Get BACI Component instance of DO This function is used to return component_mp because inherited classes would not have access to it otherwise.
References component_mp.
bool baci::CharacteristicComponentImpl::isPropertiesMonitoringActive | ( | ) |
Returns true if monitoring of properties is turned on (=active), otherwise false
Reimplemented in BaciTestAlarmClassImpl.
void baci::CharacteristicComponentImpl::operator= | ( | const CharacteristicComponentImpl & | ) | [private] |
ALMA C++ coding standards state assignment operators should be disabled.
void baci::CharacteristicComponentImpl::startPropertiesMonitoring | ( | ) |
Method to start monitoring of the properties. If monitoring is already started it just remains active. If the thread has not been yet created, it creates one. If the thread has been already created, it just resumes it.
acsthreadErrType::CanNotStartThreadExImpl | In case the monitoring thread can not be created | |
ACSErrTypeCommon::NullPointerExImpl | if BACIComponent is NULL |
Referenced by BaciTestClassImpl::turnOnMonitoring().
void baci::CharacteristicComponentImpl::stopPropertiesMonitoring | ( | ) |
Method to stop monitoring of the properties. If the monitoring thread has not been created yet, or if monitring is already stopped (=monitoring thread is suspended), it just returns.
Referenced by BaciTestClassImpl::turnOffMonitoring().
BACI Component instance This is a reference to the CORBA object
Referenced by getComponent().
ACS::CharacteristicComponentDesc_var baci::CharacteristicComponentImpl::desc_m [protected] |
ComponentDesc returned by the descriptor method.
bool baci::CharacteristicComponentImpl::monitoringProperties_mp [private] |
Signal if monitoring of properties is turned on or not.