Go to the documentation of this file.
   22 #ifndef EVENT_LOOP_ENGINE_H 
   23 #define EVENT_LOOP_ENGINE_H 
   28 #include "nrp_protobuf/engine_grpc.pb.h" 
   30 #include <nlohmann/json.hpp> 
   37     using mutex_t = std::timed_mutex;
 
   38     using lock_t  = std::unique_lock<EventLoopEngine::mutex_t>;
 
   45         EventLoopEngine(std::chrono::milliseconds timestep, std::chrono::milliseconds timestepThres,
 
   46                         size_t storeCapacity, 
bool doProcessLast,
 
   66         void topic_callback(
const std::string& dpName, 
const std::string& msgStr);
 
   68         std::map<std::string, std::vector<EngineGrpc::DataPackMessage>> _datapackStore;
 
   69         std::shared_ptr<EngineGrpc::DataPackMessage> _datapackPub;
 
   70         size_t _storeCapacity;
 
   72         std::vector<std::string> _datapackNames;
 
   78         std::unique_ptr<EngineProtoWrapper> _engineWrapper;
 
   84         std::string datapackTopicSet(
const std::string& dpName);
 
   90         std::string datapackTopicGet(
const std::string& dpName);
 
   95         mutex_t _datapackLock;
 
  100 #endif // EVENT_LOOP_ENGINE_H 
  
 
~EventLoopEngine()
Definition: event_loop_engine.cpp:37
 
Manages simulation loop. Runs physics and brain interface, and synchronizes them via Transfer Functio...
Definition: event_loop_interface.h:34
 
void shutdownCB() override
Shutdown loop.
Definition: event_loop_engine.cpp:88
 
Definition: nrp_mqtt_proxy.h:27
 
EventLoopEngine(std::chrono::milliseconds timestep, std::chrono::milliseconds timestepThres, size_t storeCapacity, bool doProcessLast, const nlohmann::json &engineConfig, EngineProtoWrapper *engineWrapper)
Constructor.
Definition: event_loop_engine.cpp:26
 
Abstract class defining an interface to interact with an Engine with data exchange via protobuf messa...
Definition: engine_proto_wrapper.h:48
 
void runLoopCB() override
Execute actions which must be performed every loop.
Definition: event_loop_engine.cpp:60
 
void initializeCB() override
Initialize loop.
Definition: event_loop_engine.cpp:40
 
EventLoop implementation which runs an EngineProtoWrapper.
Definition: event_loop_engine.h:35
 
nlohmann::json json
Definition: engine_json_server.cpp:31