|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
58 bool ok = connection.
expectBlock((
char*)&header,
sizeof(header));
59 if (!ok)
return false;
60 if (header.listLen > 0 &&
63 if ((
size_t)getListSize() != (
size_t)(header.listLen))
64 resize(header.listLen);
65 char* ptr = getMemoryBlock();
67 int elemSize=getElementSize();
68 ok = connection.
expectBlock(ptr, elemSize*header.listLen);
69 if (!ok)
return false;
82 header.
listLen = (int)getListSize();
84 connection.
appendBlock((
char*)&header,
sizeof(header));
85 const char *ptr = getMemoryBlock();
86 int elemSize=getElementSize();
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
contains the definition of a Vector type
#define YARP_END_PACK
Ends 1 byte packing for structs/classes.
#define YARP_LOG_COMPONENT(name,...)
#define YARP_BEGIN_PACK
Starts 1 byte packing for structs/classes.
#define BOTTLE_TAG_STRING
contains the definition of a Matrix type
const std::map< int, std::string > tag2FormatStr
virtual std::string getFormatStr(int tag) const
virtual bool isError() const =0
An interface for writing to a network connection.
virtual bool isError() const =0
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
#define yCAssert(component, x)
An interface for reading from a network connection.
#define BOTTLE_TAG_FLOAT64
An interface to the operating system, including Port based communication.
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write vector to a connection.
std::int32_t NetInt32
Definition of the NetInt32 type.