uatools 1.0.0
 
Loading...
Searching...
No Matches
eso::uatools::protocol::opcua::TaskPoll Class Reference

#include <taskPoll.hpp>

Public Member Functions

 TaskPoll (std::chrono::milliseconds period)
 Class constructor.
 
virtual ~TaskPoll ()
 Default destructor.
 
void Run ()
 Thread run method.
 
void StartThread ()
 
void StopThread ()
 
bool IsRunning ()
 
 TaskPoll (const TaskPoll &)=delete
 Disable copy constructor.
 
TaskPolloperator= (const TaskPoll &)=delete
 Disable assignment operator.
 

Detailed Description

This class implements a worker thread to manage OLDB writes separately from the main thread and thus reducing the CPU usage for applications writing many attributes into the OLDB in a short time.

See also
std::thread
rad::DoubleMap

Constructor & Destructor Documentation

◆ TaskPoll() [1/2]

eso::uatools::protocol::opcua::TaskPoll::TaskPoll ( std::chrono::milliseconds period)

Class constructor.

Parameters
[in]oldb_mapReference to double map object
[in]db_timeoutOLDB connection timeout.
[in]periodWorker thread periodicity.

◆ ~TaskPoll()

eso::uatools::protocol::opcua::TaskPoll::~TaskPoll ( )
virtual

Default destructor.

◆ TaskPoll() [2/2]

eso::uatools::protocol::opcua::TaskPoll::TaskPoll ( const TaskPoll & )
delete

Disable copy constructor.

Member Function Documentation

◆ IsRunning()

bool eso::uatools::protocol::opcua::TaskPoll::IsRunning ( )

◆ operator=()

TaskPoll & eso::uatools::protocol::opcua::TaskPoll::operator= ( const TaskPoll & )
delete

Disable assignment operator.

◆ Run()

void eso::uatools::protocol::opcua::TaskPoll::Run ( )

Thread run method.

This method runs an infinite loop with a wait time defined by the period. In each loop, it writes all the attributes found in the internal double map.

◆ StartThread()

void eso::uatools::protocol::opcua::TaskPoll::StartThread ( )

◆ StopThread()

void eso::uatools::protocol::opcua::TaskPoll::StopThread ( )

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