Power Management
dev.hardware.power_management - wire path h\p - generated from fwMenuPowerManagement.
list_zones
List Zones. Lists all 17 power zones with their name and rail.
Wire command: h\p\l
Returns: none (Ok/Err only)
dev.hardware.power_management.list_zones() -> Result
ow_status ow_hardware_power_management_list_zones(ow_device* dev);
dev.hardware().power_management().list_zones() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.list_zones() # check dev.ok
get_zones
Get Zones. Shows which power zones are currently on. Needs a telemetry sample.
Wire command: h\p\g
Returns: none (Ok/Err only)
dev.hardware.power_management.get_zones() -> Result
ow_status ow_hardware_power_management_get_zones(ow_device* dev);
dev.hardware().power_management().get_zones() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.get_zones() # check dev.ok
set_zone
Set Zone. Switches one power zone on or off. Zone 9 is the board-manager LED, not a power rail.
Wire command: h\p\s
| Arg | Wire type |
|---|---|
| zone | decS32 |
| on | decS32 |
Returns: none (Ok/Err only)
dev.hardware.power_management.set_zone(zone: int, on: int) -> Result
ow_status ow_hardware_power_management_set_zone(ow_device* dev, int32_t zone, int32_t on);
dev.hardware().power_management().set_zone(zone: i32, on: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.set_zone(zone, on) # check dev.ok
set_zone_mask
Set Zone Mask. Sets every user-controllable zone at once from a bit mask; bit 0 is zone 1.
Wire command: h\p\m
| Arg | Wire type |
|---|---|
| mask | decS32 |
Returns: none (Ok/Err only)
dev.hardware.power_management.set_zone_mask(mask: int) -> Result
ow_status ow_hardware_power_management_set_zone_mask(ow_device* dev, int32_t mask);
dev.hardware().power_management().set_zone_mask(mask: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.set_zone_mask(mask) # check dev.ok
get_power_state
Get Power State. Prints the most recent power telemetry sample.
Wire command: h\p\t
Returns: none (Ok/Err only)
dev.hardware.power_management.get_power_state() -> Result
ow_status ow_hardware_power_management_get_power_state(ow_device* dev);
dev.hardware().power_management().get_power_state() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.get_power_state() # check dev.ok
enable_power_stream
Stream Power. Streams battery, charger and power-zone telemetry to the host at the given rate. 0 stops the stream.
Wire command: h\p\o
| Arg | Wire type |
|---|---|
| stream_rate_ms | decS32 |
Returns: none (Ok/Err only)
dev.hardware.power_management.enable_power_stream(stream_rate_ms: int) -> Result
ow_status ow_hardware_power_management_enable_power_stream(ow_device* dev, int32_t stream_rate_ms);
dev.hardware().power_management().enable_power_stream(stream_rate_ms: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.hardware.power_management.enable_power_stream(stream_rate_ms) # check dev.ok
Events
Spontaneous frames this menu emits (not command responses). Text events arrive as [*<id> ...] frames (Python: Transport.events; C: ow_poll_text_event; Rust: poll_event -> Event::Text); binary events use the binary API below. The on-device rthon binding does not receive event streams in v1.
power (text)
Power Telemetry
| Payload field | Wire type |
|---|---|
| soc | decS32 |
| current_ma | decS32 |
| remain_mah | decS32 |
| full_mah | decS32 |
| vbus_mv | decS32 |
| vsys_mv | decS32 |
| vbat_mv | decS32 |
| ichg_ma | decS32 |
| chg_stat | decS32 |
| vbus_stat | decS32 |
| fault | decS32 |
| zone_mask | decU32 |
| tier_main | decS32 |
| tier_display | decS32 |
| backlight | decS32 |
| idle_ms | decS32 |
| valid | bool |