EventLoop implementation which runs an EngineProtoWrapper. More...
#include <event_loop_engine.h>
Public Member Functions | |
| EventLoopEngine (std::chrono::milliseconds timestep, std::chrono::milliseconds timestepThres, size_t storeCapacity, bool doProcessLast, const nlohmann::json &engineConfig, EngineProtoWrapper *engineWrapper) | |
| Constructor. More... | |
| ~EventLoopEngine () | |
Public Member Functions inherited from EventLoopInterface | |
| virtual | ~EventLoopInterface ()=default |
| EventLoopInterface ()=delete | |
| EventLoopInterface (std::chrono::milliseconds timestep, std::chrono::milliseconds timestepThres) | |
| Constructor. More... | |
| virtual void | initialize () |
| Initialize loop. More... | |
| void | runLoopOnce (const std::chrono::time_point< std::chrono::steady_clock > &startTime) |
| Run a single loop. More... | |
| void | runLoop (std::chrono::milliseconds timeout) |
| Run loop. More... | |
| void | runLoopAsync (std::chrono::milliseconds timeout=std::chrono::milliseconds(0), bool doInit=false) |
| Run loop in a thread. More... | |
| void | stopLoop () |
| Stop loop. More... | |
| void | shutdown () |
| Shutdown loop. More... | |
| bool | isRunning () |
| Returns true if the event loop is currently running, false otherwise. More... | |
| void | waitForLoopEnd () |
| Blocks execution until the loop reaches timeout. More... | |
Protected Member Functions | |
| void | initializeCB () override |
| Initialize loop. More... | |
| void | runLoopCB () override |
| Execute actions which must be performed every loop. More... | |
| void | shutdownCB () override |
| Shutdown loop. More... | |
Protected Member Functions inherited from EventLoopInterface | |
| bool | isRunningNotAsync () |
| Internal isRunning function. More... | |
Additional Inherited Members | |
Protected Attributes inherited from EventLoopInterface | |
| std::chrono::milliseconds | _timestep |
| timestep of the event loop More... | |
| std::chrono::milliseconds | _timestepThres |
| allowed time deviation in event loop timestep execution before printing a warning message More... | |
| std::chrono::milliseconds | _currentTime = std::chrono::milliseconds(0) |
| current time clock More... | |
| unsigned long | _iterations = 0L |
| stores the number of times the loop has been run More... | |
EventLoop implementation which runs an EngineProtoWrapper.
| EventLoopEngine::EventLoopEngine | ( | std::chrono::milliseconds | timestep, |
| std::chrono::milliseconds | timestepThres, | ||
| size_t | storeCapacity, | ||
| bool | doProcessLast, | ||
| const nlohmann::json & | engineConfig, | ||
| EngineProtoWrapper * | engineWrapper | ||
| ) |
Constructor.
| EventLoopEngine::~EventLoopEngine | ( | ) |
|
overrideprotectedvirtual |
Initialize loop.
Implements EventLoopInterface.
|
overrideprotectedvirtual |
Execute actions which must be performed every loop.
Implements EventLoopInterface.
|
overrideprotectedvirtual |
Shutdown loop.
Implements EventLoopInterface.