A thread that executes BaseThread logic.
More...
#include <WorkerThread.h>
A thread that executes BaseThread logic.
Users should
Definition at line 33 of file WorkerThread.h.
madara::threads::WorkerThread::WorkerThread |
( |
| ) |
|
|
inline |
Constructor deprecated: use version that takes control and data by value.
- Parameters
-
name | the name of the user thread |
thread | the user thread |
control | the knowledge base that provides a control plane between the data knowledge base and threads |
data | the knowledge base that provides user data access |
hertz | the hertz rate to run the thread |
Definition at line 55 of file WorkerThread.h.
Constructor.
- Parameters
-
name | the name of the user thread |
thread | the user thread |
control | the knowledge base that provides a control plane between the data knowledge base and threads |
data | the knowledge base that provides user data access |
hertz | the hertz rate to run the thread |
Definition at line 17 of file WorkerThread.cpp.
madara::threads::WorkerThread::WorkerThread |
( |
WorkerThread && |
other | ) |
|
|
default |
madara::threads::WorkerThread::~WorkerThread |
( |
| ) |
|
|
noexcept |
Changes the frequency given a hertz rate.
- Parameters
-
hertz | the new hertz rate |
current | current time |
frequency | an updated frequency value |
next_epoch | next time to trigger execution |
one_shot | if hertz rate is less than 0, true. Otherwise, false |
blaster | if hertz rate is 0, true. Otherwise, false. |
Definition at line 16 of file WorkerThread.inl.
void madara::threads::WorkerThread::run |
( |
void |
| ) |
|
|
protected |
int madara::threads::WorkerThread::svc |
( |
void |
| ) |
|
|
protected |
the control plane to the knowledge base
Definition at line 128 of file WorkerThread.h.
thread safe finished flag that will be sent to the knowledge base on completion of the thread
Definition at line 137 of file WorkerThread.h.
double madara::threads::WorkerThread::hertz_ = -1 |
|
protected |
hertz rate for worker thread executions
Definition at line 153 of file WorkerThread.h.
std::thread madara::threads::WorkerThread::me_ |
|
protected |
Assignment operator.
- Parameters
-
input | thread information to copy |
Definition at line 94 of file WorkerThread.h.
std::string madara::threads::WorkerThread::name_ |
|
protected |
thread safe start flag that will be sent to the knowledge base on launch of the thread
Definition at line 143 of file WorkerThread.h.
std::unique_ptr<BaseThread> madara::threads::WorkerThread::thread_ = nullptr |
|
protected |
The documentation for this class was generated from the following files: