Open3D (C++ API)  0.18.0+252c867
MessageProcessorBase.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <atomic>
11 #include <msgpack.hpp>
12 #include <mutex>
13 #include <thread>
14 
15 #include "open3d/utility/Logging.h"
16 
17 namespace zmq {
18 class message_t;
19 class socket_t;
20 class context_t;
21 } // namespace zmq
22 
23 namespace open3d {
24 namespace io {
25 namespace rpc {
26 
27 namespace messages {
28 struct Request;
29 struct SetMeshData;
30 struct GetMeshData;
31 struct SetCameraData;
32 struct SetProperties;
33 struct SetActiveCamera;
34 struct SetTime;
35 } // namespace messages
36 
41 public:
44 
45  virtual ~MessageProcessorBase();
46 
54  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
55  const messages::Request& req,
56  const messages::SetMeshData& msg,
57  const msgpack::object_handle& obj);
58  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
59  const messages::Request& req,
60  const messages::GetMeshData& msg,
61  const msgpack::object_handle& obj);
62  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
63  const messages::Request& req,
64  const messages::SetCameraData& msg,
65  const msgpack::object_handle& obj);
66  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
67  const messages::Request& req,
68  const messages::SetProperties& msg,
69  const msgpack::object_handle& obj);
70  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
71  const messages::Request& req,
72  const messages::SetActiveCamera& msg,
73  const msgpack::object_handle& obj);
74  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
75  const messages::Request& req,
76  const messages::SetTime& msg,
77  const msgpack::object_handle& obj);
78 };
79 
80 } // namespace rpc
81 } // namespace io
82 } // namespace open3d
Definition: MessageProcessorBase.h:40
virtual ~MessageProcessorBase()
Definition: MessageProcessorBase.cpp:51
virtual std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetMeshData &msg, const msgpack::object_handle &obj)
Definition: MessageProcessorBase.cpp:53
MessageProcessorBase()
Constructs a receiver listening on the specified address.
Definition: MessageProcessorBase.cpp:49
Definition: PinholeCameraIntrinsic.cpp:16
Definition: ConnectionBase.h:12
struct for defining a "get_mesh_data" message, which requests mesh data.
Definition: Messages.h:410
Definition: Messages.h:508
Definition: Messages.h:391
Definition: Messages.h:478