#include <acssampObjImpl.h>
Collaboration diagram for ACSSampObjImpl<>:
Public Member Functions | |
ACSSampObjImpl (const ACE_CString &_cobName, const ACE_CString &_propertyName, ACS::TimeInterval _sampFrequency, ACS::TimeInterval _sampReportRate, baci::BACIComponent *_m_cob, ACS::Property_var _genProperty, ACSSampImpl *_sampPtr) | |
virtual | ~ACSSampObjImpl () |
virtual void | start () |
virtual void | stop () |
virtual void | destroy () |
virtual void | suspend () |
virtual void | resume () |
virtual void | setFrequency (ACS::TimeInterval sFrequency) |
virtual void | getFrequency (ACS::TimeInterval_out sFrequency) |
virtual void | setRate (ACS::TimeInterval rRate) |
virtual void | getRate (ACS::TimeInterval_out rRate) |
virtual void | initialize () |
virtual void | doSamp () |
virtual void | flushSamp () |
ACS::TimeInterval | getSampFrequency () const |
void | setSampFrequency (const ACS::TimeInterval &_sampFrequency) |
ACS::TimeInterval | getReportRate () const |
void | setReportRate (const ACS::TimeInterval &_sampReportRate) |
CORBA::Object_ptr | getCORBAReference () const |
virtual char * | getChannelName () |
bool | isInDestructState () const |
Private Attributes | |
ACE_CString | cobName |
ACE_CString | propertyName |
ACE_CString | sampObjName |
ACE_CString | sampChannelName |
ACS::TimeInterval | sampFrequency |
ACS::TimeInterval | sampReportRate |
bool | inDestructState |
baci::BACIComponent * | cob_p |
SamplingThread< ACS_SAMP_TL > * | controlLoop_p |
SamplingThreadFlush< ACS_SAMP_TL > * | flush_p |
ACS::Property_var | genProperty_p |
T_var | propToSamp_p |
ACE_Message_Queue< ACE_SYNCH > * | mq_p |
nc::SimpleSupplier * | sampSupplier_p |
CORBA::Object_ptr | reference_p |
ACSSampImpl * | samp_p |
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 It construct the sampling object, using the following parameters:
|
|
Destructor |
|
Destroy the sampling object. Implementation of IDL destroy() interface (inherited from the ACS:Subscription interface).
|
|
Do the sampling. Retrieves data from the property using get_sync(). Data are stored in an internal array used as a buffer.
|
|
Flush data from the internal array to the notification channel.
|
|
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)
|
|
Internal method to get the CORBA reference to the newly activated CORBA object (i.e. this sampling object).
|
|
Gets the sampling frequency of an already activated sampling object.
|
|
Gets the report rate of an already activated sampling object.
|
|
Internal method to retrieve the report rate.
|
|
Internal method to retrieve the sampling frequency.
|
|
Initialize (activate) the sampling object, with parameters passed in the constructor.
|
|
Internal thread used to determine when the sampling object is to be destroyed.
|
|
Resume the sampling. Implementation of IDL resume() interface (inherited from the ACS:Subscription interface).
|
|
Sets the sampling frequency of an already activated sampling object.
|
|
Sets the report rate of an already activated sampling object.
|
|
Internal method to set the report rate.
|
|
Internal method to set the sampling frequency.
|
|
Starts the sampling. Implementation of IDL start() interface.
|
|
Stops the sampling. Implementation of IDL stop() interface.
|
|
Suspend the sampling. Implementation of IDL suspend() interface (inherited from the ACS:Subscription interface).
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|