class WatchOptions

Defined at line 272 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.battery/fuchsia.hardware.power.battery/cpp/fidl/fuchsia.hardware.power.battery/cpp/natural_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

void WatchOptions (Storage_ storage)
void WatchOptions ()

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

void WatchOptions (WatchOptions && )

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

void WatchOptions (const WatchOptions & other)
WatchOptions & interest (std::optional< ::fuchsia_hardware_power_battery::Status> value)

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`.

WatchOptions & operator= (WatchOptions && )

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

WatchOptions & operator= (const WatchOptions & other)
bool operator== (const WatchOptions & other)
bool operator!= (const WatchOptions & other)
bool IsEmpty ()
const std::optional< ::fuchsia_hardware_power_battery::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`.

::std::optional< ::fuchsia_hardware_power_battery::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`.

const std::optional< ::fuchsia_hardware_power_battery::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.

::std::optional< ::fuchsia_hardware_power_battery::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.

WatchOptions & wake_on (std::optional< ::fuchsia_hardware_power_battery::Status> value)

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.

const std::optional<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.

::std::optional<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.

WatchOptions & max_interval (std::optional<int64_t> value)

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.

const std::optional<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`.

::std::optional<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`.

WatchOptions & wake_on_max_interval (std::optional<bool> value)

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`.

void WatchOptions (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Friends

class MemberVisitor
class NaturalTableCodingTraits