.. index:: pair: class; NestJSONServer .. _doxid-class_nest_j_s_o_n_server: class NestJSONServer ==================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class NestJSONServer: public :ref:`EngineJSONServer` { public: // construction :target:`NestJSONServer`( const std::string& serverAddress, const std::string& engineName, const std::string& registrationAddress, boost::python::dict globals ); // methods bool :ref:`initRunFlag`() const; virtual :ref:`SimulationTime` :ref:`runLoopStep`(:ref:`SimulationTime` timeStep); virtual :ref:`nlohmann::json` :ref:`initialize`( const :ref:`nlohmann::json`& data, :ref:`EngineJSONServer::lock_t`& datapackLock ); virtual :ref:`nlohmann::json` :ref:`reset`(:ref:`EngineJSONServer::lock_t`& datapackLock); virtual :ref:`nlohmann::json` :ref:`shutdown`(const :ref:`nlohmann::json`& data); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // typedefs typedef std::timed_mutex :ref:`mutex_t`; typedef std::unique_lock<:ref:`EngineJSONServer::mutex_t`> :ref:`lock_t`; // methods :ref:`EngineJSONServer`& :ref:`operator =` (const :ref:`EngineJSONServer`&); bool :ref:`isServerRunning`() const; void :ref:`startServerAsync`(); void :ref:`startServer`(); void :ref:`shutdownServer`(); uint16_t :ref:`serverPort`() const; std::string :ref:`serverAddress`() const; void :ref:`registerDataPack`( const std::string& datapackName, :ref:`JsonDataPackController`* interface ); void :ref:`registerDataPackNoLock`( const std::string& datapackName, :ref:`JsonDataPackController`* interface ); virtual :ref:`SimulationTime` :ref:`runLoopStep`(:ref:`SimulationTime` timeStep) = 0; virtual :ref:`nlohmann::json` :ref:`initialize`( const :ref:`nlohmann::json`& data, :ref:`EngineJSONServer::lock_t`& datapackLock ) = 0; virtual :ref:`nlohmann::json` :ref:`reset`(:ref:`EngineJSONServer::lock_t`& datapackLock) = 0; virtual :ref:`nlohmann::json` :ref:`shutdown`(const :ref:`nlohmann::json`& data) = 0; bool :ref:`shutdownFlag`(); .. _details-class_nest_j_s_o_n_server: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; initRunFlag .. _doxid-class_nest_j_s_o_n_server_1a3ebffd2a66218c9fa47ae45be1cc271f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool initRunFlag() const Has the initialization been executed? .. rubric:: Returns: Returns true once the initialize function has been run once .. index:: pair: function; runLoopStep .. _doxid-class_nest_j_s_o_n_server_1a15e32b7efb110783e7774693fc7040d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`SimulationTime` runLoopStep(:ref:`SimulationTime` timeStep) Run a single loop step. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - timeStep - Step to take .. rubric:: Returns: Returns the time registered by this engine at the end of the loop .. index:: pair: function; initialize .. _doxid-class_nest_j_s_o_n_server_1abd7322673b4ad608186e4e229805b505: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`nlohmann::json` initialize( const :ref:`nlohmann::json`& data, :ref:`EngineJSONServer::lock_t`& datapackLock ) Engine Initialization routine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Initialization data * - datapackLock - :ref:`DataPack ` Lock. Prevents access to _datapacksControllers .. rubric:: Returns: Returns data about initialization status .. index:: pair: function; reset .. _doxid-class_nest_j_s_o_n_server_1a0c06299b3aa7e73fd6c9fbf39ea884d7: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`nlohmann::json` reset(:ref:`EngineJSONServer::lock_t`& datapackLock) Engine reset routine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - datapackLock - :ref:`DataPack ` Lock. Prevents access to _datapacksControllers .. rubric:: Returns: Returns data about initialization status .. index:: pair: function; shutdown .. _doxid-class_nest_j_s_o_n_server_1aed7cde182896ad27a877583153ada003: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`nlohmann::json` shutdown(const :ref:`nlohmann::json`& data) Engine Shutdown routine. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - data - Shutdown data .. rubric:: Returns: Returns data about shutdown status