class Watch

Defined at line 148 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`] or the interval in

`max_interval` has elapsed. 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 that keeps the system awake while the server

processes the call. If the call is answered immediately, as the first call always is, the

server hands it back as `wake_lease` unless it returns a wake lease of its own. If the

call is parked, the server drops it.

Returns:

+ `status`: Complete current telemetry snapshot of the battery.

+ `wake_lease`: An optional lease token that the client should hold while it handles

`status`: the client's `lease` handed back on an immediate reply, or a wake lease provided

if the change triggered a `wake_on` condition or a `max_interval` sample woke the system

for a client that set `wake_on_max_interval`. Omitted otherwise.

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