class Watch
Defined at line 147 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/markers.h
Change notification for battery state using a hanging-get pattern.
The first call returns the full current hardware state immediately. Subsequent calls block
until a state change matches the masks in [`ConfigureWatch`]. Each return contains a
complete telemetry snapshot of all current battery fields, not a sparse delta.
At most one `Watch` call may be outstanding per connection; concurrent calls fail with
`ALREADY_WATCHING`.
Parameters:
+ `lease`: An optional power lease token used to coordinate handoff between client and
server, preventing the system from suspending before critical battery events are handled.
If omitted, no lease coordination is performed. If the driver advertises no `wake_on`
fields in `Spec.supported_options`, `lease` is ignored and `wake_lease` is always omitted.
Returns:
+ `status`: Complete current telemetry snapshot of the battery.
+ `wake_lease`: An optional lease token provided if the change triggered a `wake_on`
condition.
Omitted if the change did not trigger a wake condition or if suspend coordination is
inactive.
Errors:
- `ALREADY_WATCHING`: A `Watch` call is already pending on this connection.
- `IO`: Communication failure with the fuel gauge hardware (e.g. I2C transfer failure).
- `INTERNAL`: Internal driver error.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal