NRP - Nest Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects. More...
#include <nest_engine_server_nrp_client.h>
Public Types | |
using | population_mapping_t = std::map< std::string, std::string > |
using | get_connection_population_mapping_t = std::map< std::string, std::pair< std::string, std::string > > |
![]() | |
using | engine_t = NestEngineServerNRPClient |
![]() | |
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 > |
Public Member Functions | |
NestEngineServerNRPClient (nlohmann::json &config, ProcessLauncherInterface::unique_ptr &&launcher) | |
virtual | ~NestEngineServerNRPClient () override |
virtual void | initialize () override |
Initialize engine. More... | |
virtual void | reset () override |
Reset engine. More... | |
virtual void | shutdown () override |
Shutdown engine. More... | |
SimulationTime | runLoopStepCallback (SimulationTime timeStep) override |
Executes a single loop step. More... | |
virtual void | sendDataPacksToEngine (const datapacks_set_t &datapacksArray) override |
Sends datapacks to engine. More... | |
virtual const std::vector< std::string > | engineProcStartParams () const override |
Get all Engine Process Startup parameters. More... | |
virtual datapacks_vector_t | getDataPacksFromEngine (const datapack_identifiers_set_t &datapackIdentifiers) 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 () |
virtual const std::string | engineName () const =0 |
Get Engine Name. More... | |
virtual const nlohmann::json & | engineConfig () const =0 |
Get engine config data. More... | |
virtual pid_t | launchEngine () |
Launch the engine. More... | |
virtual SimulationTime | getEngineTimestep () const =0 |
Get engine timestep. More... | |
virtual SimulationTime | getEngineTime () const =0 |
Get current engine time. More... | |
virtual const std::string | engineSchema () const =0 |
Get json schema for this specific engine type. More... | |
Additional Inherited Members | |
![]() | |
virtual void | resetEngineTime () |
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 - Nest Communicator on the NRP side. Converts DataPackInterface classes from/to JSON objects.
using NestEngineServerNRPClient::get_connection_population_mapping_t = std::map<std::string, std::pair<std::string,std::string> > |
using NestEngineServerNRPClient::population_mapping_t = std::map<std::string, std::string> |
NestEngineServerNRPClient::NestEngineServerNRPClient | ( | nlohmann::json & | config, |
ProcessLauncherInterface::unique_ptr && | launcher | ||
) |
|
overridevirtual |
|
overridevirtual |
Get all Engine Process Startup parameters.
Implements EngineClientInterface.
|
overridevirtual |
Gets requested datapacks from engine.
datapackNames | All requested datapack ids |
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Initialize engine.
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Reset engine.
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Executes a single loop step.
This function is going to be called by runLoopStep using std::async. It will be executed by a worker thread, which allows for runLoopStepFunction from multiple engines to run simultaneously.
[in] | timeStep | A time step by which the simulation should be advanced |
Implements EngineClient< NestEngineServerNRPClient, NestServerConfigConst::EngineSchema >.
|
overridevirtual |
Sends datapacks to engine.
datapacksArray | Array of datapacks that will be send to the engine |
Throws | on error |
Implements EngineClientInterface.
|
overridevirtual |
Shutdown engine.
Throws | on error |
Implements EngineClientInterface.