.. index:: pair: class; NestEngineServerNRPClient .. _doxid-class_nest_engine_server_n_r_p_client: class NestEngineServerNRPClient =============================== .. toctree:: :hidden: Overview ~~~~~~~~ NRP - Nest Communicator on the NRP side. Converts :ref:`DataPackInterface ` classes from/to JSON objects. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class NestEngineServerNRPClient: public :ref:`EngineClient` { public: // typedefs typedef std::map :target:`population_mapping_t`; typedef std::map> :target:`get_connection_population_mapping_t`; // construction :target:`NestEngineServerNRPClient`( :ref:`nlohmann::json`& config, :ref:`ProcessLauncherInterface::unique_ptr`&& launcher ); // methods virtual void :ref:`initialize`(); virtual void :ref:`reset`(); virtual void :ref:`shutdown`(); virtual :ref:`SimulationTime` :ref:`runLoopStepCallback`(:ref:`SimulationTime` timeStep); virtual void :ref:`sendDataPacksToEngine`(const :ref:`datapacks_set_t`& dataPacks); virtual const std::vector :ref:`engineProcStartParams`() const; virtual :ref:`datapacks_vector_t` :ref:`getDataPacksFromEngine`(const :ref:`datapack_identifiers_set_t`& datapackIdentifiers); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef std::shared_ptr :ref:`shared_ptr`; typedef std::shared_ptr :ref:`const_shared_ptr`; typedef std::unique_ptr :ref:`unique_ptr`; typedef std::unique_ptr :ref:`const_unique_ptr`; typedef ENGINE :ref:`engine_t`; // classes template class :ref:`EngineLauncher`; // methods virtual const std::string :ref:`engineName`() const = 0; virtual const :ref:`nlohmann::json`& :ref:`engineConfig`() const = 0; virtual :ref:`nlohmann::json`& :ref:`engineConfig`() = 0; virtual const std::vector :ref:`engineProcStartParams`() const = 0; virtual pid_t :ref:`launchEngine`(); virtual void :ref:`initialize`() = 0; virtual void :ref:`reset`() = 0; virtual void :ref:`shutdown`() = 0; virtual :ref:`SimulationTime` :ref:`getEngineTimestep`() const = 0; virtual :ref:`SimulationTime` :ref:`getEngineTime`() const = 0; virtual const std::string :ref:`engineSchema`() const = 0; virtual void :ref:`runLoopStepAsync`(:ref:`SimulationTime` timeStep) = 0; virtual void :ref:`runLoopStepAsyncGet`(:ref:`SimulationTime` timeOut) = 0; virtual void :ref:`sendDataPacksToEngine`(const :ref:`datapacks_set_t`& dataPacks) = 0; virtual :ref:`datapacks_vector_t` :ref:`getDataPacksFromEngine`(const :ref:`datapack_identifiers_set_t`& datapackIdentifiers) = 0; virtual const std::string :ref:`engineName`() const; virtual :ref:`SimulationTime` :ref:`getEngineTimestep`() const; virtual const :ref:`nlohmann::json`& :ref:`engineConfig`() const; virtual :ref:`nlohmann::json`& :ref:`engineConfig`(); virtual const std::string :ref:`engineSchema`() const; virtual :ref:`SimulationTime` :ref:`getEngineTime`() const; virtual void :ref:`runLoopStepAsync`(:ref:`SimulationTime` timeStep); virtual void :ref:`runLoopStepAsyncGet`(:ref:`SimulationTime` timeOut); .. _details-class_nest_engine_server_n_r_p_client: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ NRP - Nest Communicator on the NRP side. Converts :ref:`DataPackInterface ` classes from/to JSON objects. Methods ------- .. index:: pair: function; initialize .. _doxid-class_nest_engine_server_n_r_p_client_1ad4a5f32236ce7ebdf2d88b40c6b6a4e8: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void initialize() Initialize engine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Throws - on error .. rubric:: Returns: Returns SUCCESS if no error was encountered .. index:: pair: function; reset .. _doxid-class_nest_engine_server_n_r_p_client_1a7b472b61b3f65eab6dcefcbe611b44d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void reset() Reset engine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Throws - on error .. rubric:: Returns: Returns SUCCESS if no error was encountered .. index:: pair: function; shutdown .. _doxid-class_nest_engine_server_n_r_p_client_1adb96ff86f814df40b0aa42bccf2918de: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void shutdown() Shutdown engine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - Throws - on error .. rubric:: Returns: Return SUCCESS if no error was encountered .. index:: pair: function; runLoopStepCallback .. _doxid-class_nest_engine_server_n_r_p_client_1aed809c2821cde420a0ee7532ca9db860: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`SimulationTime` runLoopStepCallback(:ref:`SimulationTime` timeStep) 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. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - timeStep - A time step by which the simulation should be advanced .. rubric:: Returns: Engine time after loop step execution .. index:: pair: function; sendDataPacksToEngine .. _doxid-class_nest_engine_server_n_r_p_client_1a0e1a064ff73d5499ea28f7736683579c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void sendDataPacksToEngine(const :ref:`datapacks_set_t`& dataPacks) Sends datapacks to engine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - datapacksArray - Array of datapacks that will be send to the engine * - Throws - on error .. rubric:: Returns: Returns SUCCESS if all datapacks could be handles, ERROR otherwise .. index:: pair: function; engineProcStartParams .. _doxid-class_nest_engine_server_n_r_p_client_1ad28fe64c421c23e46379bcad822f7d3b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const std::vector engineProcStartParams() const Get all Engine Process Startup parameters. .. index:: pair: function; getDataPacksFromEngine .. _doxid-class_nest_engine_server_n_r_p_client_1a4d23b886e0ae765f3b6dbe8e938f5ab9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`datapacks_vector_t` getDataPacksFromEngine(const :ref:`datapack_identifiers_set_t`& datapackIdentifiers) Gets requested datapacks from engine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - datapackNames - All requested datapack ids * - Throws - on error .. rubric:: Returns: Returns all requested datapacks