Go to the documentation of this file.
22 #ifndef INPUT_SPINNAKER_NODE_H
23 #define INPUT_SPINNAKER_NODE_H
26 #include <nlohmann/json.hpp>
49 {
return "FromSpinnaker"; }
84 std::lock_guard<std::mutex> lock(_msgMutex);
85 _msgTemp.push_back(msg);
92 std::lock_guard<std::mutex> lock(_msgMutex);
98 for(
auto & msg : _msgTemp) {
99 _msgStore.push_back(std::move(msg));
114 std::mutex _msgMutex;
116 std::vector<nlohmann::json> _msgTemp;
118 std::vector<nlohmann::json> _msgStore;
148 #endif //INPUT_SPINNAKER_NODE_H
void startSpinnaker()
Definition: spinnaker_proxy.h:74
const std::string & id() const
Returns the node 'id'.
Definition: computational_node.h:57
Definition: spinnaker_proxy.h:43
static NRPSpinnakerProxy & getInstance()
Get singleton instance of NRPSpinnakerProxy.
Definition: spinnaker_proxy.cpp:26
void stopSpinnaker()
Definition: spinnaker_proxy.h:144
void addReceiver(std::string &label, SpiNNakerJsonReceiveCallbackInterface *callback)
Definition: spinnaker_proxy.h:185
Definition: spinnaker_proxy.h:49
static NRPSpinnakerProxy & resetInstance()
Reset singleton instance.
Definition: spinnaker_proxy.cpp:31
nlohmann::json json
Definition: engine_json_server.cpp:31