UA Server SDK C++ Bundle  1.4.2.275
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SamplingEngine Class Reference

SamplingEngine. More...

#include <samplingengine.h>

Inherits UaThread.

Public Member Functions

 SamplingEngine ()
 Constructes a sampling engine with default settings including the hardcoded sampling rates 50, 100, 250, 500, 1000, 2500, 5000. More...
 
 SamplingEngine (const UaUInt32Array &availableSamplingRates)
 Constructes a sampling engine with default settings and the passed sampling rates. More...
 
 ~SamplingEngine ()
 Destroys the sampling engine object.
 
void addItemToSampling (SamplingExecution *pItem, OpcUa_Int32 &samplingRate)
 Adds item that should be sampled. More...
 
void removeItemFromSampling (SamplingExecution *pItem, OpcUa_Int32 samplingRate)
 Removes the item from the according sampling list. More...
 
OpcUa_Int32 minSamplingRate () const
 Returns the smallest sampling rate available in the SamplingEngine.
 

Additional Inherited Members

- Private Member Functions inherited from UaThread
 UaThread ()
 Constructs a thread management object without starting the thread.
 
virtual ~UaThread ()
 Destroys the thread management object.
 
virtual void start ()
 Starts the thread managed by this object. More...
 
OpcUa_Boolean wait (OpcUa_UInt32 time=OpcUa_UInt32_Max)
 Waits for the termination of the thread. More...
 
OpcUa_Boolean running () const
 Returns the running state of the thread. More...
 
OpcUa_Boolean finished () const
 Returns the finished state of the thread. More...
 
- Static Private Member Functions inherited from UaThread
static OpcUa_UInt32 currentThread ()
 Get thread ID of current thread. More...
 
static void sleep (OpcUa_UInt32 secs)
 Sleep for n seconds. More...
 
static void msleep (OpcUa_UInt32 msecs)
 Sleep for n milliseconds. More...
 
static void usleep (OpcUa_UInt32 usecs)
 Sleep for n microseconds. More...
 

Detailed Description

SamplingEngine.

Provides the functionality to sample items at the defined sampling rate. Derived from UaThread. It is not possible to create plane copies of this Class.

Constructor & Destructor Documentation

SamplingEngine::SamplingEngine ( )

Constructes a sampling engine with default settings including the hardcoded sampling rates 50, 100, 250, 500, 1000, 2500, 5000.

SamplingEngine::SamplingEngine ( const UaUInt32Array &  availableSamplingRates)

Constructes a sampling engine with default settings and the passed sampling rates.

Member Function Documentation

void SamplingEngine::addItemToSampling ( SamplingExecution pItem,
OpcUa_Int32 &  samplingRate 
)

Adds item that should be sampled.

This functions sorts the item into the according sampling lists. You must lock the list before using this function with lockSamplingList.

Parameters
pItempointer to MSamplingExecution interface.
samplingRateshould be set to the requested sampling rate. This parameter gets evaluated and updated. This updated value should be returned as revised sampling rate.
void SamplingEngine::removeItemFromSampling ( SamplingExecution pItem,
OpcUa_Int32  samplingRate 
)

Removes the item from the according sampling list.

Parameters
pItempointer to SamplingExecution interface.
samplingRatemust be set to the used sampling rate returned from addItemToSampling.

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