Open3D (C++ API)  0.12.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 
31 
32 namespace open3d {
33 namespace io {
34 namespace rpc {
35 
38 class DummyReceiver : public ReceiverBase {
39 public:
40  DummyReceiver(const std::string& address, int timeout)
41  : ReceiverBase(address, timeout) {}
42 
43  std::shared_ptr<zmq::message_t> ProcessMessage(
44  const messages::Request& req,
45  const messages::SetMeshData& msg,
46  const MsgpackObject& obj) override {
47  return CreateStatusOKMsg();
48  }
49  std::shared_ptr<zmq::message_t> ProcessMessage(
50  const messages::Request& req,
51  const messages::GetMeshData& msg,
52  const MsgpackObject& obj) override {
53  return CreateStatusOKMsg();
54  }
55  std::shared_ptr<zmq::message_t> ProcessMessage(
56  const messages::Request& req,
57  const messages::SetCameraData& msg,
58  const MsgpackObject& obj) override {
59  return CreateStatusOKMsg();
60  }
61  std::shared_ptr<zmq::message_t> ProcessMessage(
62  const messages::Request& req,
63  const messages::SetProperties& msg,
64  const MsgpackObject& obj) override {
65  return CreateStatusOKMsg();
66  }
67  std::shared_ptr<zmq::message_t> ProcessMessage(
68  const messages::Request& req,
69  const messages::SetActiveCamera& msg,
70  const MsgpackObject& obj) override {
71  return CreateStatusOKMsg();
72  }
73  std::shared_ptr<zmq::message_t> ProcessMessage(
74  const messages::Request& req,
75  const messages::SetTime& msg,
76  const MsgpackObject& obj) override {
77  return CreateStatusOKMsg();
78  }
79 };
80 
81 } // namespace rpc
82 } // namespace io
83 } // namespace open3d
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::GetMeshData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:49
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetMeshData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:43
Definition: ReceiverBase.cpp:54
Definition: DummyReceiver.h:38
Definition: Messages.h:343
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetCameraData &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:55
Definition: Messages.h:460
Definition: Messages.h:430
std::shared_ptr< zmq::message_t > CreateStatusOKMsg()
Definition: MessageUtils.cpp:100
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetProperties &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:61
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetActiveCamera &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:67
DummyReceiver(const std::string &address, int timeout)
Definition: DummyReceiver.h:40
Definition: PinholeCameraIntrinsic.cpp:35
struct for defining a "get_mesh_data" message, which requests mesh data.
Definition: Messages.h:362
Definition: ReceiverBase.h:58
std::shared_ptr< zmq::message_t > ProcessMessage(const messages::Request &req, const messages::SetTime &msg, const MsgpackObject &obj) override
Definition: DummyReceiver.h:73