|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP2_WIREBOTTLE
11 #define YARP2_WIREBOTTLE
18 namespace wire_rep_utils {
25 size_t payload_index, payload_offset;
29 this->delegate = delegate;
30 payload_index = index;
31 payload_offset = offset;
35 return delegate->
length()-payload_index;
42 size_t length(
size_t index)
const override {
43 index += payload_index;
44 if (index==payload_index)
return delegate->
length(index)-payload_offset;
45 return delegate->
length(index);
48 const char *
data(
size_t index)
const override {
49 index += payload_index;
50 if (index==payload_index)
return delegate->
data(index)+payload_offset;
51 return delegate->
data(index);
void stopWrite() const override
Call when all writing is finished.
virtual size_t length() const =0
#define YARP_wire_rep_utils_API
This is a base class for objects that can be both read from and be written to the YARP network.
size_t headerLength() const override
bool dropRequested() override
size_t length() const override
virtual Portable * getReference()=0
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
void setDelegate(yarp::os::SizedWriter *delegate, int index, int offset)
static char * checkBottle(char *cursor, int &remaining, int ct, int list_tag)
yarp::os::PortReader * getReplyHandler() override
virtual PortReader * getReplyHandler()=0
void startWrite() const override
Call when writing is about to begin.
yarp::os::Portable * getReference() override
const char * data(size_t index) const override
The main, catch-all namespace for YARP.
virtual const char * data(size_t index) const =0
size_t length(size_t index) const override
Minimal requirements for an efficient Writer.