Go to the documentation of this file.
22 #ifndef NEST_JSON_SERVER_H
23 #define NEST_JSON_SERVER_H
32 #include <boost/python.hpp>
38 NestJSONServer(
const std::string &
serverAddress,
const std::string &engineName,
const std::string ®istrationAddress, boost::python::dict globals);
56 bool _initRunFlag =
false;
61 bool _nestPreparedFlag =
false;
66 boost::python::dict _pyGlobals;
71 boost::python::dict _pyNest;
76 boost::python::dict _pyNRPNest;
81 boost::python::dict _devMap;
86 std::list<std::shared_ptr<DataPackController<nlohmann::json>>> _datapackControllerPtrs;
91 PyGILState_STATE _pyGILState;
98 static constexpr
float convertSecToMill(
const float sec);
105 static constexpr
float convertMillToSec(
const float millsec);
112 static nlohmann::json formatInitErrorMessage(
const std::string &errMsg);
121 #endif // NEST_JSON_SERVER_H
Definition: nest_json_server.h:34
virtual SimulationTime runLoopStep(SimulationTime timeStep) override
Run a single loop step.
Definition: nest_json_server.cpp:80
virtual nlohmann::json reset(EngineJSONServer::lock_t &datapackLock) override
Engine reset routine.
Definition: nest_json_server.cpp:229
bool initRunFlag() const
Has the initialization been executed?
Definition: nest_json_server.cpp:75
std::unique_lock< EngineJSONServer::mutex_t > lock_t
Definition: engine_json_server.h:58
virtual nlohmann::json initialize(const nlohmann::json &data, EngineJSONServer::lock_t &datapackLock) override
Engine Initialization routine.
Definition: nest_json_server.cpp:104
std::string serverAddress() const
Get server address.
Definition: engine_json_server.cpp:146
Manages communication with the NRP. Uses a REST server to send/receive data. Singleton class.
Definition: engine_json_server.h:41
virtual ~NestJSONServer() override
Definition: nest_json_server.cpp:47
NestJSONServer(const std::string &serverAddress, const std::string &engineName, const std::string ®istrationAddress, boost::python::dict globals)
Definition: nest_json_server.cpp:40
std::chrono::nanoseconds SimulationTime
Definition: time_utils.h:31
virtual nlohmann::json shutdown(const nlohmann::json &data) override
Engine Shutdown routine.
Definition: nest_json_server.cpp:255
nlohmann::json json
Definition: engine_json_server.cpp:31