17 std::shared_ptr<zmq::message_t> CreateStatusMessage(
19 msgpack::sbuffer sbuf;
21 msgpack::pack(sbuf, reply);
22 msgpack::pack(sbuf, status);
23 std::shared_ptr<zmq::message_t> msg =
24 std::make_shared<zmq::message_t>(sbuf.data(), sbuf.size());
30 std::shared_ptr<zmq::message_t> IgnoreMessage(
33 const msgpack::object_handle& obj) {
34 LogInfo(
"MessageProcessorBase::ProcessMessage: messages with id {} will be "
39 status.
str +=
": messages with id " + msg.MsgId() +
" are not supported";
40 return CreateStatusMessage(status);
49 MessageProcessorBase::MessageProcessorBase() {}
51 MessageProcessorBase::~MessageProcessorBase() {}
53 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
56 const msgpack::object_handle& obj) {
57 return IgnoreMessage(req, msg, obj);
60 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
63 const msgpack::object_handle& obj) {
64 return IgnoreMessage(req, msg, obj);
67 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
70 const msgpack::object_handle& obj) {
71 return IgnoreMessage(req, msg, obj);
74 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
77 const msgpack::object_handle& obj) {
78 return IgnoreMessage(req, msg, obj);
81 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
84 const msgpack::object_handle& obj) {
85 return IgnoreMessage(req, msg, obj);
88 std::shared_ptr<zmq::message_t> MessageProcessorBase::ProcessMessage(
91 const msgpack::object_handle& obj) {
92 return IgnoreMessage(req, msg, obj);
Generic file read and write utility for python interface.
struct for defining a "get_mesh_data" message, which requests mesh data.
static std::string MsgId()
std::string str
string representation of the code
static Status ErrorProcessingMessage()