ACSSampImpl

NAME
SYNOPSIS
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
Author

NAME

ACSSampImpl −

SYNOPSIS

#include <acssampImpl.h>

Inherits baci::CharacteristicComponentImpl.

Public Member Functions

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

virtual ~ACSSampImpl ()

virtual acssamp::SampObj_ptr initSampObj (const char *name, const char *property, ACS::TimeInterval frequency, ACS::TimeInterval reportRate)

virtual void addComponenttoList (CORBA::Object_ptr component_ref)

virtual void removeComponentfromList (CORBA::Object_ptr component_ref)

Private Attributes

std::list< CORBA::Object_ptr > component_list

ACE_Recursive_Thread_Mutex m_samplingListMutex

Detailed Description

This class implements basically one method (initSampObj), which allows to create dynamically the so called ’sampling objects’. Each sampling object is connected to a specific property (e.g. LAMP1:brightness) and allows to sample its values with a user defined sampling frequency. Moreover the sampled value are not delivered immediately to the NC, but are buffered for an user-defined amount of time (in order to not waste network bandwidth).

Constructor & Destructor Documentation

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

Parameters:

poa Poa which will activate this and also all other Components.
name
DO’s name. This is also the name that will be used to find the configuration data for the DO in the Configuration Database.

virtual ACSSampImpl::~ACSSampImpl () [virtual] Destructor

Member Function Documentation

virtual void ACSSampImpl::addComponenttoList (CORBA::Object_ptr component_ref) [virtual] Internal method used to add all newly created sampling objects to an internal list (containing a reference to the active objects). If objects are not correctly destroyed, this list is used by the destructor of the factory (this class) to clean-up everything in a consistent way.

Parameters:

component_ref pointer to a CORBA object

Returns:

void

virtual acssamp::SampObj_ptr ACSSampImpl::initSampObj (const char * name, const char * property, ACS::TimeInterval frequency, ACS::TimeInterval reportRate) [virtual] initSampObj Initialize and returns a reference to the newly created sampling object.

Parameters:

name name of the component, which property is to be sampled (e.g.LAMP1 )
property
name of the property to be sampled (e.g. brightness )
frequency
sampling frequency: period between two consecutive sampling (units are 100ns; e.g. 1000000 means 0.1 sec i.e. 10 samples per second)
reportRate
number of second the process should buffer before actually sending (notifying) data (units are 100ns; e.g. 10000000 means collect data for 1 second)

Exceptions:

ACSErrTypeCommon::OutOfBoundsEx
ACSErrTypeCommon::MemoryFaultEx
ACSErrTypeCommon::CORBAProblemEx
ACSErrTypeCommon::CouldntCreateObjectEx
ACSErrTypeCommon::TypeNotSupportedEx
ACSErrTypeCommon::CouldntAccessPropertyEx
ACSErrTypeCommon::CouldntAccessComponentEx

Returns:

SampObj_ptr pointer to the newly created sampling object. It allows to control the actual sampling (start/stop/pause etc.)

virtual void ACSSampImpl::removeComponentfromList (CORBA::Object_ptr component_ref) [virtual] Internal method used to remove a sampling object from the internal list of the active (instantiated) objects. This method is called automatically, whenever a previously created object is destroyed.

Parameters:

component_ref pointer to a CORBA object

Returns:

void

Member Data Documentation

std::list<CORBA::Object_ptr> ACSSampImpl::component_list [private] component_list is an internal list of the active sampling objects.

ACE_Recursive_Thread_Mutex ACSSampImpl::m_samplingListMutex [private]

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.