C++ Based OPC UA Client/Server SDK  1.5.5.355
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.
 

Detailed Description

SamplingEngine.

Provides the functionality to sample items at the defined sampling rate. Derived from UaThread. It is not possible to create shallow 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: