Skip to main content

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

ArgWire type
zonedecS32
ondecS32

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

ArgWire type
maskdecS32

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

ArgWire type
stream_rate_msdecS32

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 fieldWire type
socdecS32
current_madecS32
remain_mahdecS32
full_mahdecS32
vbus_mvdecS32
vsys_mvdecS32
vbat_mvdecS32
ichg_madecS32
chg_statdecS32
vbus_statdecS32
faultdecS32
zone_maskdecU32
tier_maindecS32
tier_displaydecS32
backlightdecS32
idle_msdecS32
validbool