1 #ifndef _MADARA_THREADS_WORKER_THREAD_H_ 2 #define _MADARA_THREADS_WORKER_THREAD_H_ 119 bool & one_shot,
bool & blaster);
125 std::unique_ptr<BaseThread>
thread_ =
nullptr;
165 #endif // _MADARA_THREADS_WORKER_THREAD_H_ This class stores a double within a variable context.
WorkerThread()
Default constructor.
knowledge::containers::Double new_hertz_
thread safe hertz reference
~WorkerThread() noexcept
Destructor.
double hertz_
hertz rate for worker thread executions
void run(void)
Starts the thread, with entry point svc()
std::chrono::time_point< Clock > TimeValue
time point
Provides a quality-of-service-enabled threading library.
std::thread me_
Assignment operator.
std::unique_ptr< BaseThread > thread_
the contained thread
Abstract base class for implementing threads.
A thread that executes BaseThread logic.
This class provides a distributed knowledge base to users.
This class stores an integer within a variable context.
std::string name_
the name of the contained thread
void change_frequency(double hertz, utility::TimeValue ¤t, utility::Duration &frequency, utility::TimeValue &next_epoch, bool &one_shot, bool &blaster)
Changes the frequency given a hertz rate.
knowledge::containers::Integer started_
thread safe start flag that will be sent to the knowledge base on launch of the thread ...
Starts threads with first class support of MADARA contexts.
knowledge::containers::Integer finished_
thread safe finished flag that will be sent to the knowledge base on completion of the thread ...
knowledge::KnowledgeBase control_
the control plane to the knowledge base
knowledge::KnowledgeBase data_
the data plane (the knowledge base)
std::map< std::string, std::unique_ptr< WorkerThread > > NamedWorkerThreads
Collection of named threads.
WorkerThread(const std::string &name, BaseThread *thread, knowledge::KnowledgeBase *control, knowledge::KnowledgeBase *data, double hertz=-1.0)
Constructor deprecated: use version that takes control and data by value.
Copyright (c) 2015 Carnegie Mellon University.
std::chrono::nanoseconds Duration
default clock duration