class Watch

Defined at line 111 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.source/fuchsia.hardware.power.source/cpp/fidl/fuchsia.hardware.power.source/cpp/markers.h

Change notification for power source state using a "hanging-get" pattern.

The first call to this method returns the current hardware state immediately.

Subsequent calls block until a change occurs that matches the provided masks.

At most one `Watch` call may be outstanding at a time per connection.

Completing a call acknowledges that the client has received the previous update.

### Power Management and Suspend

To prevent lost wakeups, the server (driver) must ensure that the `Watch` call

remains active (and hardware interrupts armed) while the system is suspended.

+ **Interest Triggers**: If a change in the `interest` mask occurs while the

system is suspended, the server MUST NOT complete the `Watch` call until

the system wakes for another reason (e.g., a `wake_on` event or external trigger).

This ensures the CPU remains asleep for non-critical updates.

+ **Wake-On Triggers**: If a change in the `wake_on` mask occurs, the server

MUST wake the system and complete the call immediately with a `wake_lease`.

As a result of this queuing behavior, if multiple changes occur while the

system is suspended, they may be merged into a single returned `status` table,

and intermediate state transitions may be lost.

+ `interest`: The client wants to be notified if any of the fields present

in this table change. If any field in `interest` changes, the method returns.

+ `wake_on`: Similar to `interest`, but if a change occurs in these fields,

the server will attempt to keep the system awake using the provided `lease`

(or by returning a `wake_lease`) until the client acknowledges the update.

+ `lease`: A power lease token used to coordinate handoff between the server

and client, ensuring the system does not suspend before the client can

process a critical power event.

Returns:

+ `status`: The updated status table containing the fields that changed.

+ `wake_lease`: An optional lease token provided if the change triggered

a `wake_on` condition and the server is maintaining system state.

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