class Role

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

The role a power node plays in the system.

Public Methods

void Role (Role && other)
Role & operator= (Role && other)
void Role (const Role & other)
Role & operator= (const Role & other)
bool operator== (const Role & other)
bool operator!= (const Role & other)
bool IsUnknown ()
::fuchsia_hardware_power_source::Role::Tag Which ()
Role WithDisconnected (::fuchsia_hardware_power_source::Disconnected val)
const ::fidl::internal::UnionMemberView<1, Storage_> disconnected ()
::fidl::internal::UnionMemberView<1, Storage_> disconnected ()
Role & disconnected (::fuchsia_hardware_power_source::Disconnected value)

The node is disconnected or isolated from the power system.

Role WithSource (::fuchsia_hardware_power_source::SourceRole val)
const ::fidl::internal::UnionMemberView<2, Storage_> source ()
::fidl::internal::UnionMemberView<2, Storage_> source ()
Role & source (::fuchsia_hardware_power_source::SourceRole value)

The node provides energy to the common system bus.

Role WithSink (::fuchsia_hardware_power_source::SinkRole val)
const ::fidl::internal::UnionMemberView<3, Storage_> sink ()
::fidl::internal::UnionMemberView<3, Storage_> sink ()
Role & sink (::fuchsia_hardware_power_source::SinkRole value)

The node consumes or stores energy from the common bus.

Role WithAuto_ (::fuchsia_hardware_power_source::Auto val)
const ::fidl::internal::UnionMemberView<4, Storage_> auto_ ()
::fidl::internal::UnionMemberView<4, Storage_> auto_ ()
Role & auto_ (::fuchsia_hardware_power_source::Auto value)

The hardware automatically decides the role based on physical detection.

void Role (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Enumerations

enum class Tag : fidl_xunion_tag_t
Name Value Comments
kDisconnected 1

0x1

kSource 2

0x2

kSink 3

0x3

kAuto 4

0x4

_do_not_handle_this__write_a_default_case_instead ::std::numeric_limits<::fidl_union_tag_t>::max() --

TODO: share union tag types between wire

&

natural.

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

Friends

class NaturalUnionCodingTraits