26class MessageProcessorBase;
44 ZMQReceiver(
const std::string& address =
"tcp://127.0.0.1:51454",
73 const std::string address_;
75 std::shared_ptr<zmq::context_t> context_;
76 std::unique_ptr<zmq::socket_t> socket_;
80 std::atomic<bool> loop_running_;
81 std::atomic<int> mainloop_error_code_;
82 std::runtime_error mainloop_exception_;
83 std::shared_ptr<MessageProcessorBase> processor_;
Class for the server side receiving requests from a client.
Definition ZMQReceiver.h:39
virtual ~ZMQReceiver()
Definition ZMQReceiver.cpp:44
void Start()
Starts the receiver mainloop in a new thread.
Definition ZMQReceiver.cpp:46
std::string GetLastEndpoint() const
Definition ZMQReceiver.cpp:95
ZMQReceiver & operator=(const ZMQReceiver &)=delete
void SetMessageProcessor(std::shared_ptr< MessageProcessorBase > processor)
Sets the message processor object which will process incoming messages.
Definition ZMQReceiver.cpp:225
std::runtime_error GetLastError()
Returns the last error from the mainloop thread.
Definition ZMQReceiver.cpp:87
void Stop()
Definition ZMQReceiver.cpp:70
ZMQReceiver(const ZMQReceiver &)=delete
bool SetTime(int time, std::shared_ptr< ConnectionBase > connection)
Definition RemoteFunctions.cpp:395
bool SetMeshData(const std::string &path, int time, const std::string &layer, const core::Tensor &vertices, const std::map< std::string, core::Tensor > &vertex_attributes, const core::Tensor &faces, const std::map< std::string, core::Tensor > &face_attributes, const core::Tensor &lines, const std::map< std::string, core::Tensor > &line_attributes, const std::string &material, const std::map< std::string, float > &material_scalar_attributes, const std::map< std::string, std::array< float, 4 > > &material_vector_attributes, const std::map< std::string, t::geometry::Image > &texture_maps, const std::string &o3d_type, std::shared_ptr< ConnectionBase > connection)
Definition RemoteFunctions.cpp:187
bool SetActiveCamera(const std::string &path, std::shared_ptr< ConnectionBase > connection)
Definition RemoteFunctions.cpp:412
Definition PinholeCameraIntrinsic.cpp:16
Definition ConnectionBase.h:12