NRP - Python Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects. More...
#include <python_engine_json_nrp_client_base.h>
Public Member Functions | |
PythonEngineJSONNRPClientBase (nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual | ~PythonEngineJSONNRPClientBase () override |
virtual void | initialize () override |
Initialize engine. More... | |
virtual void | reset () override |
Reset engine. More... | |
virtual void | shutdown () override |
Shutdown engine. More... | |
![]() | |
EngineJSONNRPClient (nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
Constructor. More... | |
EngineJSONNRPClient (const std::string &serverAddress, nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
Constructor. More... | |
virtual | ~EngineJSONNRPClient () override=default |
virtual pid_t | launchEngine () override |
Launch the engine. More... | |
virtual void | sendDataPacksToEngine (const datapacks_set_t &dataPacks) override |
Sends datapacks to engine. More... | |
virtual datapacks_vector_t | getDataPacksFromEngine (const datapack_identifiers_set_t &requestedDataPackIds) override |
Gets requested datapacks from engine. More... | |
![]() | |
EngineClient (nlohmann::json &engineConfig, ProcessLauncherInterface::unique_ptr &&launcher) | |
Constructor. More... | |
~EngineClient () override=default | |
const std::string | engineName () const override final |
Get Engine Name. More... | |
SimulationTime | getEngineTimestep () const override final |
Get engine timestep. More... | |
const nlohmann::json & | engineConfig () const override final |
Get Engine Configuration. More... | |
nlohmann::json & | engineConfig () override final |
Get Engine Configuration. More... | |
const std::string | engineSchema () const override final |
Get json schema for this engine type. More... | |
SimulationTime | getEngineTime () const override |
Returns current engine (simulation) time. More... | |
void | runLoopStepAsync (SimulationTime timeStep) override |
Concrete implementation of EngineClientInterface::runLoopStepAsync() More... | |
void | runLoopStepAsyncGet (SimulationTime timeOut) override |
Concrete implementation of EngineClientInterface::runLoopStepAsyncGet() More... | |
![]() | |
EngineClientInterface (ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual | ~EngineClientInterface () |
Additional Inherited Members | |
![]() | |
using | engine_t = ENGINE |
![]() | |
using | shared_ptr = std::shared_ptr< EngineClientInterface > |
using | const_shared_ptr = std::shared_ptr< const EngineClientInterface > |
using | unique_ptr = std::unique_ptr< EngineClientInterface > |
using | const_unique_ptr = std::unique_ptr< const EngineClientInterface > |
![]() | |
nlohmann::json | sendInitCommand (const nlohmann::json &data) |
Send an initialization command. More... | |
nlohmann::json | sendResetCommand (const nlohmann::json &data) |
Send a reset command. More... | |
nlohmann::json | sendShutdownCommand (const nlohmann::json &data) |
Send a shutdown command. More... | |
std::string | waitForRegistration (unsigned int numTries, unsigned int waitTime) const |
Wait for the engine registration server to receive a call from the engine. More... | |
![]() | |
virtual void | resetEngineTime () |
template<class T > | |
void | setDefaultProperty (std::string key, T value) |
Attempts to set a default value for a property in the engine configuration. If the property has been already set either in the engine configuration file or from the engine schema, its value is not overwritten. More... | |
![]() | |
ProcessLauncherInterface::unique_ptr | _process |
Process Launcher. Will be used to stop process at end. More... | |
NRP - Python Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Initialize engine.
Throws | on error |
Implements EngineClientInterface.
|
inlineoverridevirtual |
Reset engine.
Throws | on error |
Implements EngineClientInterface.
|
inlineoverridevirtual |
Shutdown engine.
Throws | on error |
Implements EngineClientInterface.