class NodeManager
Defined at line 83 of file ../../src/devices/bin/driver_manager/node.h
Public Methods
void Bind (Node & node, std::shared_ptr<BindResultTracker> result_tracker)
Attempt to bind `node`.
A nullptr for result_tracker is acceptable if the caller doesn't intend to
track the results.
void Bind (Resource & resource, std::shared_ptr<BindResultTracker> result_tracker)
void ~NodeManager ()
Defined at line 85 of file ../../src/devices/bin/driver_manager/node.h
void BindToUrl (Node &node,std::string_viewdriver_url_suffix,std::shared_ptr<BindResultTracker>result_tracker)
Defined at line 93 of file ../../src/devices/bin/driver_manager/node.h
zx::result<> StartDriver (Node &node,std::string_viewurl,fuchsia_driver_framework::DriverPackageTypepackage_type)
Defined at line 98 of file ../../src/devices/bin/driver_manager/node.h
void OnNodeBound (std::shared_ptr<const Node> node)
Defined at line 103 of file ../../src/devices/bin/driver_manager/node.h
void DestroyDriverHostComponent (std::string_view driver_host_name_for_colocation, fit::callback<void (zx::result<>)> completion_cb)
Destroys the driver host component asynchronously. Calls |cb| on completion.
Defined at line 119 of file ../../src/devices/bin/driver_manager/node.h
DriverHost * GetDriverHost (std::string_view driver_name_name_for_colocation)
zx::result<DriverHost *> CreateDriverHost (bool use_next_vdso, std::string_view driver_name_name_for_colocation)
void CreateDriverHostDynamicLinker (std::string_view driver_name_name_for_colocation, fit::callback<void (zx::result<DriverHost *>)> completion_cb)
Creates the driver host component, loads the driver host using dynamic linking,
and calls |cb| on completion or error.
Defined at line 112 of file ../../src/devices/bin/driver_manager/node.h
bool IsDriverHostValid (DriverHost * driver_host)
DriverHost lifetimes are managed through a linked list, and they will delete themselves
when the FIDL connection is closed. Currently in the Node class we store a raw pointer to the
DriverHost object, and do not have a way to remove it from the class when the underlying
DriverHost object is deallocated. This function will return true if the underlying DriverHost
object is still alive and in the linked list. Otherwise returns false.
Defined at line 129 of file ../../src/devices/bin/driver_manager/node.h
void RebindComposite (std::stringspec,std::optional<std::string>driver_url,fit::callback<void (zx::result<>)>callback)
Defined at line 131 of file ../../src/devices/bin/driver_manager/node.h
void TryResolvePendingNodes ()
Defined at line 134 of file ../../src/devices/bin/driver_manager/node.h
bool IsTestShutdownDelayEnabled ()
Defined at line 136 of file ../../src/devices/bin/driver_manager/node.h
std::weak_ptr<std::mt19937> GetShutdownTestRng ()
Defined at line 137 of file ../../src/devices/bin/driver_manager/node.h
void WaitForBootup (fit::callback<void ()> callback)
Defined at line 141 of file ../../src/devices/bin/driver_manager/node.h
void ImportDictionary (fuchsia_component_sandbox::DictionaryRef dictionary, fit::callback<void (zx::result<uint64_t>)> callback)
Defined at line 143 of file ../../src/devices/bin/driver_manager/node.h
void RequestMatchPendingNode (fidl::VectorView<fuchsia_driver_framework::wire::ParentSpec2> dependencies, fit::callback<void (fidl::WireUnownedResult<fuchsia_driver_index::DriverIndex::MatchPendingNode> &)> match_callback)
Defined at line 148 of file ../../src/devices/bin/driver_manager/node.h
void CreatePowerElement (std::optional<fidl::ClientEnd<fuchsia_power_broker::Topology>>topology_client,std::string_viewname,fuchsia_power_broker::DependencyTokenelement_token,std::vector<fuchsia_power_broker::DependencyToken>deps,fidl::ServerEnd<fuchsia_power_broker::ElementControl>control,fidl::ClientEnd<fuchsia_power_broker::ElementRunner>runner,fidl::ServerEnd<fuchsia_power_broker::Lessor>lessor,Collectionfor_collection,std::optional<fuchsia_power_broker::DependencyToken>cpu_token_override,std::optional<zx::eventpair>initial_lease_token,boolis_hermetic_power_test,fit::callback<void (zx::result<bool>)>cb)
Create a power element where |element_token| is the access token for the newly created
element. |deps| are the tokens this element should depend on.
|is_hermetic_power_test| indicates whether power dependencies or token overrides are active.
|cb| is called with:
- `zx::ok(true)` if the power element was successfully created
- `zx::ok(false)` if the power element could not be created because this is not a suspend-
enabled platform.
- `zx::error` if an error happens creating the element on a suspend-enabled platform.
Defined at line 164 of file ../../src/devices/bin/driver_manager/node.h
DictionaryUtil & dictionary_util ()
Defined at line 177 of file ../../src/devices/bin/driver_manager/node.h
bool SuspendEnabled ()
Defined at line 179 of file ../../src/devices/bin/driver_manager/node.h
std::optional<fuchsia_power_broker::DependencyToken> StorageElementToken ()
Defined at line 181 of file ../../src/devices/bin/driver_manager/node.h
MemoryAttributor & memory_attributor ()
Defined at line 185 of file ../../src/devices/bin/driver_manager/node.h
ResourceId GetNextResourceId ()
Defined at line 187 of file ../../src/devices/bin/driver_manager/node.h
void RebootSystem ()
Defined at line 189 of file ../../src/devices/bin/driver_manager/node.h