Open3D (C++ API)  0.15.1
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
35
36namespace zmq {
37class message_t;
38class socket_t;
39class context_t;
40} // namespace zmq
41
42namespace open3d {
43namespace io {
44namespace rpc {
45
46namespace messages {
47struct Request;
48struct SetMeshData;
49struct GetMeshData;
50struct SetCameraData;
51struct SetProperties;
52struct SetActiveCamera;
53struct SetTime;
54} // namespace messages
55
60public:
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,
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
virtual ~MessageProcessorBase()
Definition: MessageProcessorBase.cpp:70
virtual std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetMeshData &msg, const msgpack::object_handle &obj)
Definition: MessageProcessorBase.cpp:72
MessageProcessorBase()
Constructs a receiver listening on the specified address.
Definition: MessageProcessorBase.cpp:68
Definition: PinholeCameraIntrinsic.cpp:35
Definition: ConnectionBase.h:31
struct for defining a "get_mesh_data" message, which requests mesh data.
Definition: Messages.h:429
Definition: Messages.h:527
Definition: Messages.h:410
Definition: Messages.h:497