SamplingEngine Class Reference

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. More...

#include <samplingengine.h>

Inheritance diagram for SamplingEngine:
Collaboration diagram for SamplingEngine:

List of all members.

Public Member Functions

 SamplingEngine ()
 SamplingEngine (const UaUInt32Array &availableSamplingRates)
 ~SamplingEngine ()
void addItemToSampling (SamplingExecution *pItem, OpcUa_Int32 &samplingRate)
void removeItemFromSampling (SamplingExecution *pItem, OpcUa_Int32 samplingRate)
OpcUa_Int32 minSamplingRate () const

Detailed Description

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.

SamplingEngine


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.

SamplingEngine::~SamplingEngine (  )

Destroys the sampling engine object


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.
OpcUa_Int32 SamplingEngine::minSamplingRate (  ) const [inline]

Returns the smallest sampling rate available in the SamplingEngine

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:
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/samplingengine.h
  • /home/buildbot/work/uasdkcpp/src/uaserver/uaservercpp/coremodule/samplingengine.cpp