17 const std::vector<double>& value) :
27 if (!nested_read_ret(reader)) {
30 if (!read_value(reader)) {
55 if (!nested_write_ret(writer)) {
58 if (!write_value(writer)) {
149 if constexpr (expected_tag != 0) {
150 if (_csize != 0 && _etype.
code != expected_tag) {
154 value.resize(_csize);
155 if (_csize != 0 && !reader.
readBlock(
reinterpret_cast<char*
>(
value.data()),
value.size() *
sizeof(double))) {
169 if (!writer.
writeBlock(
reinterpret_cast<const char*
>(
value.data()),
value.size() *
sizeof(
double))) {
191 if constexpr (expected_tag != 0) {
192 if (_csize != 0 && _etype.
code != expected_tag) {
196 value.resize(_csize);
197 if (_csize != 0 && !reader.
readBlock(
reinterpret_cast<char*
>(
value.data()),
value.size() *
sizeof(double))) {
211 if (!writer.
writeBlock(
reinterpret_cast<const char*
>(
value.data()),
value.size() *
sizeof(
double))) {
#define BOTTLE_TAG_FLOAT64
bool read(yarp::os::idl::WireReader &reader) override
bool write(const yarp::os::idl::WireWriter &writer) const override
std::string toString() const
std::vector< double > value
yarp::dev::ReturnValue ret
return_getAllAxes()=default
A simple collection of objects that can be described and transmitted in a portable way.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
An interface for reading from a network connection.
An interface for writing to a network connection.
static bool copyPortable(const PortWriter &writer, PortReader &reader)
Copy one portable to another, via writing and reading.
IDL-friendly connection reader.
bool readNested(WirePortable &obj)
void readListBegin(yarp::os::idl::WireState &nstate, size_t &len)
bool readBlock(char *const data, size_t len)
bool read(WirePortable &obj)
IDL-friendly connection writer.
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeBlock(const char *data, size_t len) const
bool writeListEnd() const
bool writeNested(const WirePortable &obj) const
bool writeListBegin(int tag, size_t len) const
For streams capable of holding different kinds of content, check what they actually have.