#include <acssampObjImpl.h>
List of all members.
Detailed Description
template<ACS_SAMP_C>
class ACSSampObjImpl< ACS_SAMP_C >
This class implements all methods used to sample a specific property. In particular, once a new sampling object is initialized, with user-defined parameters (like the sampling rate, the report rate etc.) it allows to start/stop/pause/continue the sampling. Moreover it expose methods to change these parametrs on-the-fly. All buffered data are delivered automatically to the notification channel; trough it a client could retrieve them, and subsequently plot them or perform the necessary kind of analysis.
This class is a template. This because the type of the property could be RWdouble, RWlong etc.
This class is meant to be used trough the factory class ACSSampImpl.
Constructor & Destructor Documentation
Constructor It construct the sampling object, using the following parameters:
- Parameters:
-
| _cobName | name of the component, which property is to be sampled (e.g.LAMP1 ) |
| _propertyName | name of the property to be sampled (e.g. brightness ) |
| _sampFrequency | sampling frequency: period between two consecutive sampling (units are 100ns; e.g. 1000000 means 0.1 sec i.e. 10 samples per second) |
| _sampReportRate | number of second the process should buffer before actually sending (notifying) data (units are 100ns; e.g. 10000000 means collect data for 1 second) |
| _m_cob | BACIComponent of the factory object. |
| _genProperty | reference to a generic property |
| _sampPtr | pointer to the factory object. It is used to store created sampling object in an internal (member of factory object) list; when the the sampling objects are destroyed, the corresponding entry in the list is cleared. When the base factory is destroyed, it checks the list and in case takes care to clean-up correctly all the existing sampling objects (still not removed from the list). |
Member Function Documentation
Destroy the sampling object. Implementation of IDL destroy() interface (inherited from the ACS:Subscription interface).
- Returns:
- void
template<ACS_SAMP_C >
virtual char* ACSSampObjImpl< ACS_SAMP_C >::getChannelName |
( |
|
) |
[virtual] |
Is the channel name of the notification channel onto which the data are delivered. The name is composed by concatenation of the following string: NC_ Component name_ Property name_ SampRate_ ReportRate_ (e.g. NC_LAMP1_brightness_1000000_10000000)
- Returns:
- channelName.
template<ACS_SAMP_C >
CORBA::Object_ptr ACSSampObjImpl< ACS_SAMP_C >::getCORBAReference |
( |
|
) |
const [inline] |
Internal method to get the CORBA reference to the newly activated CORBA object (i.e. this sampling object).
- Returns:
- reference_p reference to the CORBA object.
template<ACS_SAMP_C >
virtual void ACSSampObjImpl< ACS_SAMP_C >::getFrequency |
( |
ACS::TimeInterval_out |
sFrequency |
) |
[virtual] |
Gets the sampling frequency of an already activated sampling object.
- Parameters:
-
| sFrequency | the current sampling frequency (units are 100ns; e.g. 1000000 means 10 sample per second) |
- Returns:
- void
template<ACS_SAMP_C >
virtual void ACSSampObjImpl< ACS_SAMP_C >::getRate |
( |
ACS::TimeInterval_out |
rRate |
) |
[virtual] |
Gets the report rate of an already activated sampling object.
- Parameters:
-
| sFrequency | the current report rate report rate (units are 100ns; e.g. 10000000 means collect data for 1 second) |
- Returns:
- void
template<ACS_SAMP_C >
ACS::TimeInterval ACSSampObjImpl< ACS_SAMP_C >::getReportRate |
( |
|
) |
const [inline] |
Internal method to retrieve the report rate.
- Returns:
- sampReportRate
template<ACS_SAMP_C >
ACS::TimeInterval ACSSampObjImpl< ACS_SAMP_C >::getSampFrequency |
( |
|
) |
const [inline] |
Internal method to retrieve the sampling frequency.
- Returns:
- sampFrequency
Initialize (activate) the sampling object, with parameters passed in the constructor.
- Exceptions:
-
| ACSErrTypeCommon::OutOfBoundsExImpl | |
| ACSErrTypeCommon::MemoryFaultExImpl | |
| ACSErrTypeCommon::CORBAProblemExImpl | |
| ACSErrTypeCommon::CouldntCreateObjectExImpl | |
- Returns:
- void
template<ACS_SAMP_C >
bool ACSSampObjImpl< ACS_SAMP_C >::isInDestructState |
( |
|
) |
const [inline] |
Resume the sampling. Implementation of IDL resume() interface (inherited from the ACS:Subscription interface).
- Returns:
- void
template<ACS_SAMP_C >
virtual void ACSSampObjImpl< ACS_SAMP_C >::setFrequency |
( |
ACS::TimeInterval |
sFrequency |
) |
[virtual] |
Sets the sampling frequency of an already activated sampling object.
- Parameters:
-
| sFrequency | a new sampling frequency (units are 100ns; e.g. 1000000 means 10 sample per second) |
- Returns:
- void
template<ACS_SAMP_C >
virtual void ACSSampObjImpl< ACS_SAMP_C >::setRate |
( |
ACS::TimeInterval |
rRate |
) |
[virtual] |
Sets the report rate of an already activated sampling object.
- Parameters:
-
| sFrequency | a new report rate (units are 100ns; e.g. 10000000 means collect data for 1 second) |
- Returns:
- void
template<ACS_SAMP_C >
void ACSSampObjImpl< ACS_SAMP_C >::setReportRate |
( |
const ACS::TimeInterval & |
_sampReportRate |
) |
|
Internal method to set the report rate.
- Parameters:
-
- Returns:
- void
template<ACS_SAMP_C >
void ACSSampObjImpl< ACS_SAMP_C >::setSampFrequency |
( |
const ACS::TimeInterval & |
_sampFrequency |
) |
|
Internal method to set the sampling frequency.
- Parameters:
-
- Returns:
- void
Starts the sampling. Implementation of IDL start() interface.
- Returns:
- void
Stops the sampling. Implementation of IDL stop() interface.
- Returns:
- void
Suspend the sampling. Implementation of IDL suspend() interface (inherited from the ACS:Subscription interface).
- Returns:
- void
Member Data Documentation
BACI Component instance This is a reference to the factory CORBA object
controlLoop_p is only started once the sampling object is initialized, through the call of method start. It determines the ticks, when the sampling actually occurs; the thread is destroyed when the method destroy is called.
flush_p is only started once the sampling object is initialized, through the call of method start. It determines the time, when the sampling are actually flushed on the NC; the thread is destroyed when the method destroy is called.
Internal buffer containing all data, before the delivering to the notification channel.
The documentation for this class was generated from the following file: