|
Robot Raconteur Core C++ Library
|
Transport for intra-process communication. More...
#include <IntraTransport.h>
Public Member Functions | |
| IntraTransport (const boost::shared_ptr< RobotRaconteurNode > &node=RobotRaconteurNode::sp()) | |
| Construct a new IntraTransport. | |
| virtual void | StartServer () |
| Start the server to listen for incoming client connections. | |
| virtual void | StartClient () |
| Start the transport as a client. | |
Transport for intra-process communication.
It is recommended that ClientNodeSetup, ServerNodeSetup, or SecureServerNodeSetup be used to construct this class.
See robotraconteur_url for more information on URLs.
The IntraTransport implements transport connections between nodes running within the same process. This is often true for simulation environments, where there may be multiple simulated devices running within the simulation. The IntraTransport uses a singleton to keep track of the different nodes running in the same process, and to form connections. The singleton also implements discovery updates. Because the nodes are all in the same process, it is not necessary to serialize messages being passed between nodes. Instead, the messages are handed off to the receiving node by the transport. This is in effect a shallow copy of the data being transmitted, and pointers to the original data are passed to the receiving node. Because the data is passed as a pointer, any modification by the receiver will also modify the sender's buffer. Use with care!
| RobotRaconteur::IntraTransport::IntraTransport | ( | const boost::shared_ptr< RobotRaconteurNode > & | node = RobotRaconteurNode::sp() | ) |
Construct a new IntraTransport.
Must use boost::make_shared<IntraTransport>()
The use of RobotRaconteurNodeSetup and subclasses is recommended to construct transports.
The transport must be registered with the node using RobotRaconteurNode::RegisterTransport() after construction.
| node | The node that will use the transport. Default is the singleton node |