19 const double temperature,
20 const std::int32_t status) :
25 temperature(temperature),
33 if (!read_charge(reader)) {
36 if (!read_voltage(reader)) {
39 if (!read_current(reader)) {
42 if (!read_temperature(reader)) {
45 if (!read_status(reader)) {
70 if (!write_charge(writer)) {
73 if (!write_voltage(writer)) {
76 if (!write_current(writer)) {
79 if (!write_temperature(writer)) {
82 if (!write_status(writer)) {
double charge
Battery charge percentage [%].
double voltage
Battery Voltage [V].
double current
Battery Current [A].
bool write(const yarp::os::idl::WireWriter &writer) const override
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::idl::WireReader &reader) override
std::int32_t status
the status of the device.
double temperature
Battery Temperature [degC].
std::string toString() const
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 readI32(std::int32_t &x)
bool readFloat64(yarp::conf::float64_t &x)
IDL-friendly connection writer.
bool writeI32(std::int32_t x, bool skip_tag=false) const
bool writeListHeader(int len) const
bool writeFloat64(yarp::conf::float64_t x, bool skip_tag=false) const
For streams capable of holding different kinds of content, check what they actually have.