#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. | |
| TaskPoll & | operator= (const TaskPoll &)=delete |
| Disable assignment operator. | |
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.
| eso::uatools::protocol::opcua::TaskPoll::TaskPoll | ( | std::chrono::milliseconds | period | ) |
Class constructor.
| [in] | oldb_map | Reference to double map object |
| [in] | db_timeout | OLDB connection timeout. |
| [in] | period | Worker thread periodicity. |
|
virtual |
Default destructor.
|
delete |
Disable copy constructor.
| bool eso::uatools::protocol::opcua::TaskPoll::IsRunning | ( | ) |
Disable assignment operator.
| 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.
| void eso::uatools::protocol::opcua::TaskPoll::StartThread | ( | ) |
| void eso::uatools::protocol::opcua::TaskPoll::StopThread | ( | ) |