Loading [MathJax]/extensions/TeX/AMSsymbols.js
Open3D (C++ API)  0.14.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MessageProcessorBase.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018-2021 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <atomic>
30 #include <msgpack.hpp>
31 #include <mutex>
32 #include <thread>
33 
34 #include "open3d/utility/Logging.h"
35 
36 namespace zmq {
37 class message_t;
38 class socket_t;
39 class context_t;
40 } // namespace zmq
41 
42 namespace open3d {
43 namespace io {
44 namespace rpc {
45 
46 namespace messages {
47 struct Request;
48 struct SetMeshData;
49 struct GetMeshData;
50 struct SetCameraData;
51 struct SetProperties;
52 struct SetActiveCamera;
53 struct SetTime;
54 } // namespace messages
55 
60 public:
63 
64  virtual ~MessageProcessorBase();
65 
73  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
74  const messages::Request& req,
75  const messages::SetMeshData& msg,
76  const msgpack::object_handle& obj);
77  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
78  const messages::Request& req,
79  const messages::GetMeshData& msg,
80  const msgpack::object_handle& obj);
81  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
82  const messages::Request& req,
83  const messages::SetCameraData& msg,
84  const msgpack::object_handle& obj);
85  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
86  const messages::Request& req,
87  const messages::SetProperties& msg,
88  const msgpack::object_handle& obj);
89  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
90  const messages::Request& req,
91  const messages::SetActiveCamera& msg,
92  const msgpack::object_handle& obj);
93  virtual std::shared_ptr<zmq::message_t> ProcessMessage(
94  const messages::Request& req,
95  const messages::SetTime& msg,
96  const msgpack::object_handle& obj);
97 };
98 
99 } // namespace rpc
100 } // namespace io
101 } // namespace open3d
Definition: MessageProcessorBase.h:59
Definition: Messages.h:410
Definition: Messages.h:527
Definition: Messages.h:497
Definition: PinholeCameraIntrinsic.cpp:35
struct for defining a "get_mesh_data" message, which requests mesh data.
Definition: Messages.h:429
Definition: ConnectionBase.h:31