class ParentSetCollector
Defined at line 23 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, std::weak_ptr<Node> node)
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 13 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 25 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 30 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h
void ReleaseNodes ()
Defined at line 33 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc
bool HasCompositeInfo ()
Defined at line 35 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 45 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc
const std::optional<std::weak_ptr<Node>> & get (uint32_t index)
Defined at line 59 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h
std::optional<std::weak_ptr<Node>> completed_composite_node ()
Defined at line 61 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h
size_t size ()
Defined at line 65 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.h
const std::vector<std::optional<NodeWkPtr>> & parents ()
Exposed for testing.
Defined at line 68 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 73 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc
fidl::VectorView<fidl::StringView> GetParentTopologicalPaths (fidl::AnyArena & arena)
Defined at line 101 of file ../../src/devices/bin/driver_manager/composite/parent_set_collector.cc