|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
64 #ifndef YARP_ROSMSG_sensor_msgs_BatteryState_h
65 #define YARP_ROSMSG_sensor_msgs_BatteryState_h
334 for (
int i=0; i<len; i++) {
496 static constexpr
const char*
typeName =
"sensor_msgs/BatteryState";
499 static constexpr
const char*
typeChecksum =
"476f837fa6771f6e16e3bf4ef96f8770";
504 # Constants are chosen to match the enums in the linux kernel\n\
505 # defined in include/linux/power_supply.h as of version 3.7\n\
506 # The one difference is for style reasons the constants are\n\
507 # all uppercase not mixed case.\n\
509 # Power supply status constants\n\
510 uint8 POWER_SUPPLY_STATUS_UNKNOWN = 0\n\
511 uint8 POWER_SUPPLY_STATUS_CHARGING = 1\n\
512 uint8 POWER_SUPPLY_STATUS_DISCHARGING = 2\n\
513 uint8 POWER_SUPPLY_STATUS_NOT_CHARGING = 3\n\
514 uint8 POWER_SUPPLY_STATUS_FULL = 4\n\
516 # Power supply health constants\n\
517 uint8 POWER_SUPPLY_HEALTH_UNKNOWN = 0\n\
518 uint8 POWER_SUPPLY_HEALTH_GOOD = 1\n\
519 uint8 POWER_SUPPLY_HEALTH_OVERHEAT = 2\n\
520 uint8 POWER_SUPPLY_HEALTH_DEAD = 3\n\
521 uint8 POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4\n\
522 uint8 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5\n\
523 uint8 POWER_SUPPLY_HEALTH_COLD = 6\n\
524 uint8 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7\n\
525 uint8 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8\n\
527 # Power supply technology (chemistry) constants\n\
528 uint8 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0\n\
529 uint8 POWER_SUPPLY_TECHNOLOGY_NIMH = 1\n\
530 uint8 POWER_SUPPLY_TECHNOLOGY_LION = 2\n\
531 uint8 POWER_SUPPLY_TECHNOLOGY_LIPO = 3\n\
532 uint8 POWER_SUPPLY_TECHNOLOGY_LIFE = 4\n\
533 uint8 POWER_SUPPLY_TECHNOLOGY_NICD = 5\n\
534 uint8 POWER_SUPPLY_TECHNOLOGY_LIMN = 6\n\
537 float32 voltage # Voltage in Volts (Mandatory)\n\
538 float32 current # Negative when discharging (A) (If unmeasured NaN)\n\
539 float32 charge # Current charge in Ah (If unmeasured NaN)\n\
540 float32 capacity # Capacity in Ah (last full capacity) (If unmeasured NaN)\n\
541 float32 design_capacity # Capacity in Ah (design capacity) (If unmeasured NaN)\n\
542 float32 percentage # Charge percentage on 0 to 1 range (If unmeasured NaN)\n\
543 uint8 power_supply_status # The charging status as reported. Values defined above\n\
544 uint8 power_supply_health # The battery health metric. Values defined above\n\
545 uint8 power_supply_technology # The battery chemistry. Values defined above\n\
546 bool present # True if the battery is present\n\
548 float32[] cell_voltage # An array of individual cell voltages for each cell in the pack\n\
549 # If individual voltages unknown but number of cells known set each to NaN\n\
550 string location # The location into which the battery is inserted. (slot number or plug)\n\
551 string serial_number # The best approximation of the battery serial number\n\
553 ================================================================================\n\
554 MSG: std_msgs/Header\n\
555 # Standard metadata for higher-level stamped data types.\n\
556 # This is generally used to communicate timestamped data \n\
557 # in a particular coordinate frame.\n\
559 # sequence ID: consecutively increasing ID \n\
561 #Two-integer timestamp that is expressed as:\n\
562 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
563 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
564 # time-handling sugar is provided by the client library\n\
566 #Frame this data is associated with\n\
585 #endif // YARP_ROSMSG_sensor_msgs_BatteryState_h
virtual void appendFloat32(yarp::conf::float32_t data)=0
Send a representation of a 32-bit floating point number to the network connection.
static constexpr const char * typeName
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_LION
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readString(std::string &str, bool *is_vocab=nullptr)
static const std::uint8_t POWER_SUPPLY_STATUS_FULL
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
yarp::conf::float32_t percentage
yarp::conf::float32_t expectFloat32()
yarp::os::idl::BottleStyle< yarp::rosmsg::sensor_msgs::BatteryState > bottleStyle
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_LIMN
virtual bool read(yarp::os::idl::WireReader &reader)
static constexpr const char * typeChecksum
virtual void appendInt8(std::int8_t data)=0
Send a representation of a 8-bit integer to the network connection.
std::vector< yarp::conf::float32_t > cell_voltage
virtual bool isBareMode() const =0
Check if the connection is bare mode.
#define BOTTLE_TAG_STRING
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_NICD
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_LIFE
static const std::uint8_t POWER_SUPPLY_STATUS_DISCHARGING
virtual std::int8_t expectInt8()=0
Read a 8-bit integer from the network connection.
static const std::uint8_t POWER_SUPPLY_STATUS_CHARGING
static constexpr const char * typeText
yarp::rosmsg::std_msgs::Header header
yarp::conf::float32_t capacity
virtual bool isError() const =0
static const std::uint8_t POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
#define BOTTLE_TAG_FLOAT32
static Type byName(const char *name)
bool writeBare(yarp::os::ConnectionWriter &connection) const override
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
std::uint8_t power_supply_health
Type & addProperty(const char *key, const Value &val)
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_NIMH
An interface for writing to a network connection.
yarp::conf::float32_t voltage
virtual bool isError() const =0
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_LIPO
static const std::uint8_t POWER_SUPPLY_TECHNOLOGY_UNKNOWN
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
static const std::uint8_t POWER_SUPPLY_HEALTH_OVERVOLTAGE
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
yarp::conf::float32_t charge
yarp::conf::float32_t design_capacity
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
bool readBare(yarp::os::ConnectionReader &connection) override
IDL-friendly connection reader.
static const std::uint8_t POWER_SUPPLY_HEALTH_GOOD
An interface for reading from a network connection.
yarp::os::idl::BareStyle< yarp::rosmsg::sensor_msgs::BatteryState > rosStyle
std::string serial_number
bool readBottle(yarp::os::ConnectionReader &connection) override
std::uint8_t power_supply_status
static const std::uint8_t POWER_SUPPLY_HEALTH_DEAD
static const std::uint8_t POWER_SUPPLY_HEALTH_OVERHEAT
The main, catch-all namespace for YARP.
static const std::uint8_t POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
virtual yarp::conf::float32_t expectFloat32()=0
Read a 32-bit floating point number from the network connection.
static const std::uint8_t POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE
yarp::conf::float32_t current
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
static const std::uint8_t POWER_SUPPLY_HEALTH_UNKNOWN
std::uint8_t power_supply_technology
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
static const std::uint8_t POWER_SUPPLY_STATUS_NOT_CHARGING
A single value (typically within a Bottle).
static const std::uint8_t POWER_SUPPLY_HEALTH_COLD
static const std::uint8_t POWER_SUPPLY_STATUS_UNKNOWN
yarp::os::Type getType() const override
virtual bool write(const yarp::os::idl::WireWriter &writer) const