|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
22 this->requireAckFlag = requireAckFlag;
32 return requireAckFlag ?
"tcp" :
"fast_tcp";
42 int spec = getSpecifier(header);
43 if (spec % 16 == getSpecifierCode()) {
44 if (((spec & 128) != 0) == requireAckFlag) {
53 createStandardHeader(getSpecifierCode() + (requireAckFlag ? 128 : 0), header);
66 return requireAckFlag;
77 writeYarpInt(cport, proto);
virtual const Contact & getLocalAddress() const =0
Get the address of the local side of the stream.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
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...
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
virtual int getSpecifierCode() const
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
Carrier * create() const override
Factory method.
TcpCarrier(bool requireAckFlag=true)
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
virtual bool checkStreams() const =0
Check whether streams are in a good state.
Communicating between two ports via TCP.
virtual TwoWayStream & getStreams()=0
Access the streams associated with the connection.
A simple abstraction for a block of bytes.
void setParameters(const yarp::os::Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
The basic state of a connection - route, streams in use, etc.
An interface to the operating system, including Port based communication.
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
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...