class LevelDependency
Defined at line 632 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
Describes a dependency from one power element's level on another power
element's level.
For example if element `PowerElement_A` has a level `PowerLevel_A3` which
depends on an element `PowerElement_B` being at `PowerLevel_B2` then we would
fill out the struct to convey the meaning:
- `dependent_level` = `PowerLevel_A3`
- `requires_token` = `PowerElement_B`
- `requires_level_by_preference` = `[PowerLevel_B2]`
(Note the values above are only *symbolic*, eg. `dependent_level` requires
an integer value, not a string.)
The dependent Element's identity is not specified in this struct and must
be specified as a separate argument in a request or be inferred, perhaps
because a channel is scoped to the dependent element.
Public Members
static const fidl_type_t * FidlType
Public Methods
bool IsEmpty ()
Returns whether no field is set.
void LevelDependency ()
void LevelDependency (LevelDependency && other)
const uint8_t & dependent_level ()
The power element level that this `LevelDependency` struct declaration
supports. This is level that has a dependency on
`requires_level_by_preference`.
Defined at line 641 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
bool has_dependent_level ()
Defined at line 645 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
uint8_t * mutable_dependent_level ()
The power element level that this `LevelDependency` struct declaration
supports. This is level that has a dependency on
`requires_level_by_preference`.
Defined at line 652 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
void clear_dependent_level ()
Defined at line 660 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
const ::zx::event & requires_token ()
Must supply a token registered via the RegisterDependencyToken call of
the required element's ElementControl protocol.
Defined at line 670 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
bool has_requires_token ()
Defined at line 674 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
::zx::event * mutable_requires_token ()
Must supply a token registered via the RegisterDependencyToken call of
the required element's ElementControl protocol.
Defined at line 680 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
void clear_requires_token ()
Defined at line 688 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
const ::std::vector<uint8_t> & requires_level_by_preference ()
A list of levels in decreasing preferential order that power broker
should attempt to make required for this dependency to be satisfied.
The first level in list that is a valid level will become the required
level.
Platform clients can use this list to keep backwards compatibility with
dependencies by providing multiple levels that the dependency may have
implemented in older API levels.
Defined at line 704 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
bool has_requires_level_by_preference ()
Defined at line 708 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
::std::vector<uint8_t> * mutable_requires_level_by_preference ()
A list of levels in decreasing preferential order that power broker
should attempt to make required for this dependency to be satisfied.
The first level in list that is a valid level will become the required
level.
Platform clients can use this list to keep backwards compatibility with
dependencies by providing multiple levels that the dependency may have
implemented in older API levels.
Defined at line 720 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
void clear_requires_level_by_preference ()
Defined at line 728 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
const bool & remove_with_required_element ()
If true, this dependency will be automatically removed if/when the
required element is removed.
Defined at line 738 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
bool has_remove_with_required_element ()
Defined at line 742 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
bool * mutable_remove_with_required_element ()
If true, this dependency will be automatically removed if/when the
required element is removed.
Defined at line 748 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
void clear_remove_with_required_element ()
Defined at line 756 of file fidling/gen/sdk/fidl/fuchsia.power.broker/fuchsia.power.broker/hlcpp/fuchsia/power/broker/cpp/fidl.h
LevelDependency & set_dependent_level (uint8_t _value)
LevelDependency & set_requires_token (::zx::event _value)
LevelDependency & set_requires_level_by_preference (::std::vector<uint8_t> _value)
LevelDependency & set_remove_with_required_element (bool _value)
void ~LevelDependency ()
LevelDependency & operator= (LevelDependency && other)
::std::unique_ptr<LevelDependency> New ()
void Encode (::fidl::Encoder *_encoder,size_t_offset,std::optional< ::fidl::HandleInformation>maybe_handle_info)
void Decode (::fidl::Decoder *_decoder,LevelDependency *_value,size_t_offset)
zx_status_t Clone (LevelDependency * _result)