Open3D (C++ API)
0.12.0
|
#include <ReceiverBase.h>
Data Structures | |
struct | MsgpackObject |
Public Member Functions | |
ReceiverBase (const std::string &address="tcp://127.0.0.1:51454", int timeout=10000) | |
ReceiverBase (const ReceiverBase &)=delete | |
ReceiverBase & | operator= (const ReceiverBase &)=delete |
virtual | ~ReceiverBase () |
void | Start () |
Starts the receiver mainloop in a new thread. More... | |
void | Stop () |
std::runtime_error | GetLastError () |
Returns the last error from the mainloop thread. More... | |
Protected Member Functions | |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::SetMeshData &msg, const MsgpackObject &obj) |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::GetMeshData &msg, const MsgpackObject &obj) |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::SetCameraData &msg, const MsgpackObject &obj) |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::SetProperties &msg, const MsgpackObject &obj) |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::SetActiveCamera &msg, const MsgpackObject &obj) |
virtual std::shared_ptr< zmq::message_t > | ProcessMessage (const messages::Request &req, const messages::SetTime &msg, const MsgpackObject &obj) |
Base class for the server side receiving requests from a client. Subclass from this and implement the overloaded ProcessMessage functions as needed.
open3d::io::rpc::ReceiverBase::ReceiverBase | ( | const std::string & | address = "tcp://127.0.0.1:51454" , |
int | timeout = 10000 |
||
) |
Constructs a receiver listening on the specified address.
address | Address to listen on. |
timeout | Timeout in milliseconds for sending the reply. |
|
delete |
|
virtual |
std::runtime_error open3d::io::rpc::ReceiverBase::GetLastError | ( | ) |
Returns the last error from the mainloop thread.
|
delete |
|
protectedvirtual |
Function for processing a msg.
req | The Request object that accompanies the |
msg | object. |
msg | The message to be processed |
obj | The object from which the |
msg | was unpacked. Can be used for custom unpacking. |
Reimplemented in open3d::visualization::Receiver, and open3d::io::rpc::DummyReceiver.
|
protectedvirtual |
Reimplemented in open3d::io::rpc::DummyReceiver.
|
protectedvirtual |
Reimplemented in open3d::io::rpc::DummyReceiver.
|
protectedvirtual |
Reimplemented in open3d::io::rpc::DummyReceiver.
|
protectedvirtual |
Reimplemented in open3d::io::rpc::DummyReceiver.
|
protectedvirtual |
Reimplemented in open3d::io::rpc::DummyReceiver.
void open3d::io::rpc::ReceiverBase::Start | ( | ) |
Starts the receiver mainloop in a new thread.
void open3d::io::rpc::ReceiverBase::Stop | ( | ) |
Stops the receiver mainloop and joins the thread. This function blocks until the mainloop is done with processing messages that have already been received.