BatteryStateSubscriber QML Type
Subscribes to sensor_msgs::msg::BatteryState messages — Constants are chosen to match the enums in the linux kernel defined in include/linux/power_supply.h as of version 3.7 The one difference is for style reasons the constants are all uppercase not mixed case. More...
| Import Statement: | import QtRos2.SensorMsgs |
| Inherits: | |
| Status: | Experimental Extension |
Properties
- capacity : real
- cellTemperature : list<real>
- cellVoltage : list<real>
- charge : real
- current : real
- designCapacity : real
- header : header
- location : string
- message : batteryState
- percentage : real
- powerSupplyHealth : uint8_t
- powerSupplyStatus : uint8_t
- powerSupplyTechnology : uint8_t
- present : bool
- serialNumber : string
- temperature : real
- voltage : real
Signals
- messageReceived(batteryState msg)
Detailed Description
BatteryStateSubscriber receives batteryState values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.
See also BatteryStatePublisher and batteryState.
Property Documentation
capacity : real
The capacity field of the last received message. Updated whenever a new message arrives. capacityChanged is emitted on every update.
cellTemperature : list<real>
The cellTemperature field of the last received message. Updated whenever a new message arrives. cellTemperatureChanged is emitted on every update.
cellVoltage : list<real>
The cellVoltage field of the last received message. Updated whenever a new message arrives. cellVoltageChanged is emitted on every update.
charge : real
The charge field of the last received message. Updated whenever a new message arrives. chargeChanged is emitted on every update.
current : real
The current field of the last received message. Updated whenever a new message arrives. currentChanged is emitted on every update.
designCapacity : real
The designCapacity field of the last received message. Updated whenever a new message arrives. designCapacityChanged is emitted on every update.
header : header
The header field of the last received message. Updated whenever a new message arrives. headerChanged is emitted on every update.
location : string
The location field of the last received message. Updated whenever a new message arrives. locationChanged is emitted on every update.
message : batteryState
The last message received on topic. Updated whenever a new message arrives.
percentage : real
The percentage field of the last received message. Updated whenever a new message arrives. percentageChanged is emitted on every update.
powerSupplyHealth : uint8_t
The powerSupplyHealth field of the last received message. Updated whenever a new message arrives. powerSupplyHealthChanged is emitted on every update.
powerSupplyStatus : uint8_t
The powerSupplyStatus field of the last received message. Updated whenever a new message arrives. powerSupplyStatusChanged is emitted on every update.
powerSupplyTechnology : uint8_t
The powerSupplyTechnology field of the last received message. Updated whenever a new message arrives. powerSupplyTechnologyChanged is emitted on every update.
present : bool
The present field of the last received message. Updated whenever a new message arrives. presentChanged is emitted on every update.
serialNumber : string
The serialNumber field of the last received message. Updated whenever a new message arrives. serialNumberChanged is emitted on every update.
temperature : real
The temperature field of the last received message. Updated whenever a new message arrives. temperatureChanged is emitted on every update.
voltage : real
The voltage field of the last received message. Updated whenever a new message arrives. voltageChanged is emitted on every update.
Signal Documentation
messageReceived(batteryState msg)
Emitted when a new batteryState arrives on topic. msg contains the received value.
Note: The corresponding handler is onMessageReceived.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.