10 #ifndef YARP_MPICARRIER_H
11 #define YARP_MPICARRIER_H
40 Carrier *
create()
const override = 0;
Abstract base carrier for managing port communication via MPI.
void close() override=0
Close the carrier.
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 expectIndex(yarp::os::ConnectionState &proto) override
Expect a message header, if there is one for this carrier.
bool sendHeader(yarp::os::ConnectionState &proto) override
Write a header appropriate to the carrier to the connection, followed by any carrier-specific data.
bool sendIndex(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
bool expectSenderSpecifier(yarp::os::ConnectionState &proto) override
Expect the name of the sending port.
virtual void createStream(bool sender)=0
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
Carrier * create() const override=0
Factory method.
bool expectAck(yarp::os::ConnectionState &proto) override
Receive an acknowledgement, if expected for this carrier.
std::string getName() const override=0
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool sendAck(yarp::os::ConnectionState &proto) override
Send an acknowledgement, if needed for this carrier.
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...
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
bool write(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
Write a message.
bool supportReply() const override=0
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
bool canEscape() const override
Check if carrier can encode administrative messages, as opposed to just user data.
Wrapper for MPI_Comm communicator.
Abstract base class for port communication via MPI.
A starter class for implementing simple carriers.
A simple abstraction for a block of bytes.
The basic state of a connection - route, streams in use, etc.
OutputStream & os()
Shorthand for getOutputStream()
virtual bool isOk() const =0
Check if the stream is ok or in an error state.
Minimal requirements for an efficient Writer.
virtual void write(OutputStream &os)