C++ Based OPC UA Client/Server/PubSub SDK
1.7.8.584
|
#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. | |
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.
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.
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.
pItem | pointer to MSamplingExecution interface. |
samplingRate | should 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.
pItem | pointer to SamplingExecution interface. |
samplingRate | must be set to the used sampling rate returned from addItemToSampling. |