class WatchOptions

Defined at line 573 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

Configuration options for battery state watching.

`interest` and `wake_on` are optional masks: the actual field values within the `Status` table

are ignored; only field presence (set vs. unset) determines the mask.

An absent mask means "use this field's default"; a present but empty mask means "no fields".

The two defaults differ because the safe choice differs: `interest` defaults to everything the

driver supports watching, so a client that never configures anything still makes progress,

while `wake_on` defaults to nothing, since waking the system is a cost a client must opt into.

Public Methods

bool IsEmpty ()

Returns whether no field is set.

bool HasUnknownData ()

Returns whether the table references unknown fields.

::fidl::WireTableBuilder< ::fuchsia_hardware_power_battery::wire::WatchOptions> Builder (::fidl::AnyArena & arena)

Return a builder that by defaults allocates of an arena.

::fidl::WireTableExternalBuilder< ::fuchsia_hardware_power_battery::wire::WatchOptions> ExternalBuilder (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_hardware_power_battery::wire::WatchOptions>> frame)

Return a builder that relies on explicitly allocating |fidl::ObjectView|s.

void WatchOptions ()

Defined at line 575 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

void WatchOptions (const WatchOptions & other)

Defined at line 576 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

::fuchsia_hardware_power_battery::wire::Status & interest ()

Fields the client wants to receive change notifications for.

Defaults to every field the driver supports watching, as reported by

`Spec.supported_options`. Pass an explicitly empty table to be notified only for the

fields named in `wake_on`.

bool has_interest ()
WatchOptions & operator= (const WatchOptions & other)

Defined at line 577 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

void WatchOptions (WatchOptions && other)

Defined at line 578 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

WatchOptions & operator= (WatchOptions && other)

Defined at line 579 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

::fuchsia_hardware_power_battery::wire::Status & wake_on ()

Fields that should actively wake the system from suspend.

Any field present in `wake_on` is implicitly included in `interest`.

Defaults to no fields: changes occurring during suspend are deferred until the next system

wakeup and do not wake the device.

bool has_wake_on ()
int64_t & max_interval ()

Maximum time between `Watch` responses. When set, the server completes a pending `Watch`

with a freshly sampled `Status` once this much time has passed since the previous response,

even if no field in `interest` changed.

The time is measured on the boot timeline, so time spent suspended counts towards it.

Defaults to absent: `Watch` only completes on changes.

Servers that do not support periodic sampling omit this field from the effective options

returned by `ConfigureWatch` and from `Spec.supported_options`. Servers may clamp the value,

and report the interval they will honor in the effective options.

Samples do not wake the system from suspend unless `wake_on_max_interval` is set: a sample

that falls due while the system is suspended is taken once the system resumes.

bool has_max_interval ()
bool & wake_on_max_interval ()

Whether a `max_interval` sample that falls due while the system is suspended wakes the

system. Defaults to false; like `wake_on`, waking the system is a cost the client opts into.

Ignored if `max_interval` is absent.

Servers that cannot wake the system omit this field from the effective options returned by

`ConfigureWatch` and from `Spec.supported_options`.

bool has_wake_on_max_interval ()
void ~WatchOptions ()

Defined at line 581 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/wire_types.h

Friends

class WireTableBaseBuilder
class WireTableBaseBuilder