class ParentSetCollector

Defined at line 25 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

|ParentSetCollector| wraps functionality for collecting multiple parent nodes for composites.

The parent set starts out empty and gets nodes added to it until it is complete. Once complete

it will return a vector containing all the parent node pointers.

Public Methods

zx::result<> AddNode (uint32_t index, const std::vector<fuchsia_driver_framework::NodeProperty2> & node_properties, ResourceWkPtr resource)

Add a node to the parent set at the specified index.

Caller should check that |ContainsNode| is false for the index before calling this.

Only a weak_ptr of the node is stored by this class (until collection in GetIfComplete).

Defined at line 14 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc

void ParentSetCollector (size_t size, std::string_view driver_host_name_for_colocation)

Defined at line 27 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

void BindToComposite (std::vector<std::string> parent_names, uint32_t primary_index)

Defined at line 32 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

void ReleaseNodes ()

Defined at line 36 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc

bool HasCompositeInfo ()

Defined at line 37 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

zx::result<std::shared_ptr<Node>> TryToAssemble (std::string_view name, NodeManager * node_manager, async_dispatcher_t * dispatcher)

Check if all parents are found. If so, then create and return the composite node. If the

node is already created, return ZX_ERR_ALREADY_EXISTS.

Defined at line 50 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc

const std::optional<ResourceWkPtr> & get (uint32_t index)

Defined at line 63 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

std::optional<std::weak_ptr<Node>> completed_composite_node ()

Defined at line 65 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

size_t size ()

Defined at line 69 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

const std::vector<std::optional<ResourceWkPtr>> & parents ()

Exposed for testing.

Defined at line 72 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h

fuchsia_driver_development::wire::CompositeNodeInfo GetCompositeInfo (fidl::AnyArena & arena, const std::optional<fuchsia_driver_framework::CompositeInfo> & composite_info)

Defined at line 82 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc

fidl::VectorView<fidl::StringView> GetParentTopologicalPaths (fidl::AnyArena & arena)

Defined at line 114 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc

fidl::VectorView<fidl::StringView> GetParentMonikers (fidl::AnyArena & arena)

Defined at line 136 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc