Open3D (C++ API)  0.11.0
DummyReceiver.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2020 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 
30 
31 namespace open3d {
32 namespace io {
33 namespace rpc {
34 
37 class DummyReceiver : public ReceiverBase {
38 public:
39  DummyReceiver(const std::string& address, int timeout)
40  : ReceiverBase(address, timeout) {}
41 
42  std::shared_ptr<zmq::message_t> CreateStatusOKMsg();
43 
44  std::shared_ptr<zmq::message_t> ProcessMessage(
45  const messages::Request& req,
46  const messages::SetMeshData& msg,
47  const MsgpackObject& obj) override {
48  return CreateStatusOKMsg();
49  }
50  std::shared_ptr<zmq::message_t> ProcessMessage(
51  const messages::Request& req,
52  const messages::GetMeshData& msg,
53  const MsgpackObject& obj) override {
54  return CreateStatusOKMsg();
55  }
56  std::shared_ptr<zmq::message_t> ProcessMessage(
57  const messages::Request& req,
58  const messages::SetCameraData& msg,
59  const MsgpackObject& obj) override {
60  return CreateStatusOKMsg();
61  }
62  std::shared_ptr<zmq::message_t> ProcessMessage(
63  const messages::Request& req,
64  const messages::SetProperties& msg,
65  const MsgpackObject& obj) override {
66  return CreateStatusOKMsg();
67  }
68  std::shared_ptr<zmq::message_t> ProcessMessage(
69  const messages::Request& req,
70  const messages::SetActiveCamera& msg,
71  const MsgpackObject& obj) override {
72  return CreateStatusOKMsg();
73  }
74  std::shared_ptr<zmq::message_t> ProcessMessage(
75  const messages::Request& req,
76  const messages::SetTime& msg,
77  const MsgpackObject& obj) override {
78  return CreateStatusOKMsg();
79  }
80 };
81 
82 } // namespace rpc
83 } // namespace io
84 } // namespace open3d
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::GetMeshData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:50
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetMeshData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:44
Definition: ReceiverBase.cpp:54
Definition: DummyReceiver.h:37
Definition: Messages.h:190
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetCameraData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:56
Definition: Messages.h:307
Definition: Messages.h:277
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetProperties &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:62
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetActiveCamera &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:68
DummyReceiver(const std::string &address, int timeout)
Definition: DummyReceiver.h:39
Definition: PinholeCameraIntrinsic.cpp:35
std::shared_ptr< zmq::message_t > CreateStatusOKMsg()
Definition: DummyReceiver.cpp:37
struct for defining a "get_mesh_data" message, which requests mesh data.
Definition: Messages.h:209
Definition: ReceiverBase.h:57
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetTime &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:74