18 auto* icursor =
reinterpret_cast<NetInt32 *
> (cursor);
22 static char *
checkBottle(
char *cursor,
int& remaining,
int ct,
int list_tag) {
23 while (remaining>0 && ct>0) {
41 if (remaining<4) {
return nullptr; }
46 if (remaining<8) {
return nullptr; }
59 if (len<0||len>remaining) {
74 cursor =
checkBottle(cursor,remaining,len,tag&0xff);
75 if (cursor ==
nullptr) {
84 if (remaining!=0) {
return nullptr; }
85 if (ct!=0) {
return nullptr; }
97 for (
size_t i=0; i<src.
length(); i++) {
98 total_len += src.
length(i);
100 bool has_header =
false;
101 int payload_index = 0;
102 int payload_offset = 0;
105 char *base = (
char*)src.
data(0);
115 if ((
size_t)i3==total_len - 12) {
126 dest.
setDelegate(&src,payload_index,payload_offset);
#define BOTTLE_TAG_FLOAT64
#define BOTTLE_TAG_STRING
#define BOTTLE_TAG_VOCAB32
static NetInt32 getInt(char *cursor)
static char * checkBottle(char *cursor, int &remaining, int ct, int list_tag)
A simple abstraction for a block of bytes.
static int netInt(const yarp::os::Bytes &code)
Minimal requirements for an efficient Writer.
virtual size_t length() const =0
virtual const char * data(size_t index) const =0
void setDelegate(yarp::os::SizedWriter *delegate, int index, int offset)
An interface to the operating system, including Port based communication.
std::int32_t NetInt32
Definition of the NetInt32 type.