Expand description
Battery status snapshot codec (PROP_BATTERY).
The property value is either empty — the implementation reports no
battery measurements at all — or one field-flags octet followed by the
present fields in fixed order: voltage (UINT16_LE, millivolts), level
(UINT8, percent), charge state (PUI). Reserved flag bits must be
zero, and the value length must match the flags exactly.
Structs§
- Battery
Status - One battery status snapshot: the fields the platform reports.
Enums§
- Battery
Charge State - The battery charge-state enumeration.
- Battery
Error - Snapshot or decode error.
Constants§
- FLAG_
CHARGE_ STATE - Field-flags bit for the charge-state field.
- FLAG_
LEVEL - Field-flags bit for the level field.
- FLAG_
VOLTAGE - Field-flags bit for the voltage field.
- MAX_
ENCODED_ LEN - Largest encoded size of a snapshot: flags + voltage + level + a one-byte PUI charge state.