|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
39 return getSpecifier(header) % 16 == getSpecifierCode();
44 createStandardHeader(getSpecifierCode(), header);
72 bool ok = stream->open(remote);
78 int myPort = stream->getLocalAddress().
getPort();
79 writeYarpInt(myPort, proto);
92 int altPort = readYarpInt(proto);
102 bool ok = stream->open(
Contact(myName, myPort),
Contact(altName, altPort));
virtual const Contact & getLocalAddress() const =0
Get the address of the local side of the stream.
bool expectReplyToHeader(ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
void getHeader(Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
bool checkHeader(const Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
virtual const Contact & getRemoteAddress() const =0
Get the address of the remote side of the stream.
A stream abstraction for datagram communication.
Communicating between two ports via UDP.
virtual TwoWayStream & getStreams()=0
Access the streams associated with the connection.
A simple abstraction for a block of bytes.
The basic state of a connection - route, streams in use, etc.
void setParameters(const Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
Carrier * create() const override
Factory method.
bool respondToHeader(ConnectionState &proto) override
Respond to the header.
An interface to the operating system, including Port based communication.
The components from which ports and connections are built.
virtual int getSpecifierCode() const
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).