|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
76 ACE_INET_Addr anywhere((u_short)0, (ACE_UINT32)INADDR_ANY);
78 bool ok = stream->open(base, sender) == 0;
80 int myPort = stream->getLocalAddress().getPort();
91 ok = stream->open(base, sender) == 0;
108 return becomeShmemVersionHybridStream(proto, sender);
114 return becomeShmem(proto,
false);
120 return becomeShmem(proto,
true);
virtual const Contact & getLocalAddress() const =0
Get the address of the local side of the stream.
A stream abstraction for shared memory communication.
void writeYarpInt(int n, ConnectionState &proto)
Write n as an 8 bytes yarp number.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
virtual int getSpecifierCode() const
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
void createStandardHeader(int specifier, yarp::os::Bytes &header) const
const yarp::os::LogComponent & SHMEMCARRIER()
virtual TwoWayStream & getStreams()=0
Access the streams associated with the connection.
A simple abstraction for a block of bytes.
#define yCAssert(component, x)
The basic state of a connection - route, streams in use, etc.
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
void getHeader(yarp::os::Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
Carrier * create() const override
Factory method.
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
void setParameters(const yarp::os::Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
bool checkHeader(const yarp::os::Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
int getSpecifier(const Bytes &b) const
int readYarpInt(ConnectionState &proto)
Read 8 bytes and interpret them as a YARP number.