A module executed on a timer.
More...
#include <scriptModules.hpp>
|
|
| TimedModule ()=default |
| | Default constructor.
|
| | TimedModule (const std::chrono::duration< uint32_t > &executionInterval, std::shared_ptr< std::condition_variable > stopSignal, std::shared_ptr< std::mutex > mutex, std::shared_ptr< bool > stop, std::unique_ptr< std::condition_variable > signalOnChange, const std::filesystem::path &script, const size_t &outputLengthLimit, std::unique_ptr< std::string > outputTarget) |
| | Constructor with data.
|
| | TimedModule (TimedModule &&toMove) noexcept=default |
| | Move constructor.
|
| TimedModule & | operator= (TimedModule &&toMove) noexcept=default |
| | Move assignment operator.
|
|
| ~TimedModule ()=default |
| | Destructor.
|
| void | operator() () const |
A module executed on a timer.
Executes a shell script on a timer.
◆ TimedModule() [1/2]
| PSSspace::TimedModule::TimedModule |
( |
const std::chrono::duration< uint32_t > & | executionInterval, |
|
|
std::shared_ptr< std::condition_variable > | stopSignal, |
|
|
std::shared_ptr< std::mutex > | mutex, |
|
|
std::shared_ptr< bool > | stop, |
|
|
std::unique_ptr< std::condition_variable > | signalOnChange, |
|
|
const std::filesystem::path & | script, |
|
|
const size_t & | outputLengthLimit, |
|
|
std::unique_ptr< std::string > | outputTarget ) |
|
inline |
Constructor with data.
- Parameters
-
| [in] | executionInterval | refresh interval |
| [in] | stopSignal | condition variable the spawning thread notifies to stop the loop |
| [in] | mutex | mutex shared with the spawning thread; guards stop, outputTarget, and the stop wait |
| [in] | stop | flag shared with the spawning thread; set to true before notifying stopSignal to terminate |
| [in] | signalOnChange | condition variable to notify the spawning thread that an execution happened |
| [in] | script | path to the shell script |
| [in] | outputLengthLimit | limit on output length, in UTF-8 codepoints (characters) |
| [in] | outputTarget | pointer to the target string |
◆ TimedModule() [2/2]
| PSSspace::TimedModule::TimedModule |
( |
TimedModule && | toMove | ) |
|
|
defaultnoexcept |
Move constructor.
- Parameters
-
◆ operator()()
| void PSSspace::TimedModule::operator() |
( |
| ) |
const |
Run the module
Runs the module, refreshing at the specified interval.
◆ operator=()
Move assignment operator.
- Parameters
-
- Returns
- TimedModule object
The documentation for this class was generated from the following file: