pub enum CoordinatorRequest {
    AddDevice {
        args: AddDeviceArgs,
        coordinator: ServerEnd<CoordinatorMarker>,
        device_controller: ClientEnd<DeviceControllerMarker>,
        inspect: Option<Vmo>,
        outgoing_dir: Option<ClientEnd<DirectoryMarker>>,
        responder: CoordinatorAddDeviceResponder,
    },
    ScheduleRemove {
        unbind_self: bool,
        control_handle: CoordinatorControlHandle,
    },
    ScheduleUnbindChildren {
        responder: CoordinatorScheduleUnbindChildrenResponder,
    },
    BindDevice {
        driver_url_suffix: Option<String>,
        responder: CoordinatorBindDeviceResponder,
    },
    GetTopologicalPath {
        responder: CoordinatorGetTopologicalPathResponder,
    },
    LoadFirmware {
        driver_path: String,
        fw_path: String,
        responder: CoordinatorLoadFirmwareResponder,
    },
    GetMetadata {
        key: u32,
        responder: CoordinatorGetMetadataResponder,
    },
    GetMetadataSize {
        key: u32,
        responder: CoordinatorGetMetadataSizeResponder,
    },
    AddMetadata {
        key: u32,
        data: Option<Vec<u8>>,
        responder: CoordinatorAddMetadataResponder,
    },
    AddCompositeDevice {
        name: String,
        comp_desc: CompositeDeviceDescriptor,
        responder: CoordinatorAddCompositeDeviceResponder,
    },
    AddCompositeNodeSpec {
        name: String,
        spec: CompositeNodeSpecDescriptor,
        responder: CoordinatorAddCompositeNodeSpecResponder,
    },
    ConnectFidlProtocol {
        fragment_name: Option<String>,
        service_name: Option<String>,
        protocol_name: String,
        server: Channel,
        responder: CoordinatorConnectFidlProtocolResponder,
    },
}
Expand description

Interface for drivers in driver host to coordinate with the driver manager.

Variants§

§

AddDevice

Fields

§coordinator: ServerEnd<CoordinatorMarker>
§device_controller: ClientEnd<DeviceControllerMarker>
§inspect: Option<Vmo>
§outgoing_dir: Option<ClientEnd<DirectoryMarker>>

Record the addition of a new device that can be communicated with via device_controller. On success, the returned local_device_id is the identifier assigned by devmgr.

§

ScheduleRemove

Fields

§unbind_self: bool

Requests the devcoordinator schedule the removal of this device, and the unbinding of its children. If unbind_self is true, the unbind hook for this device will also be called.

§

ScheduleUnbindChildren

Requests the devcoordinator schedule the unbinding of this device’s children. If the device has no children, no request will be sent, and has_children will be false.

§

BindDevice

Fields

§driver_url_suffix: Option<String>

Attempt to bind a driver against this device.

  • request driver_url_suffix only driver’s that match this URL suffix will try to bind to the device (e.g: “fvm.cm”). If this is null, the API will autobind.
  • error ZX_ERR_ALREADY_BOUND if the device is already bound.
  • error ZX_ERR_NOT_FOUND no drivers were found.
§

GetTopologicalPath

Returns the topological path of this device.

§

LoadFirmware

Fields

§driver_path: String
§fw_path: String

Requests that the firmware at the given path be loaded and returned.

§

GetMetadata

Retrieve the metadata blob associated with this device and the given key.

§

GetMetadataSize

Retrieve the metadata size associated with this device and the given key.

§

AddMetadata

Add metadata blob associated with this device and the given key. If the same key is specified multiple times, the new data will be ignored in favor of the data from first call with the specified key.

§

AddCompositeDevice

Adds the given composite device. This causes the driver manager to try to match the fragments against the existing device tree, and to monitor all new device additions in order to find the fragments as they are created.

§

AddCompositeNodeSpec

Adds the given composite node spec. This causes the driver manager to add the spec to the driver index, and then try to match the parents against the node topology. All device additions will be monitored to see if they matched to the remaining unbound nodes.

§

ConnectFidlProtocol

Fields

§fragment_name: Option<String>
§service_name: Option<String>
§protocol_name: String
§server: Channel

Connects the given FIDL protocol inside of a FIDL service. Connection is completed asynchronously due to pipelining. Returning ZX_OK does not imply the service exists. A two way call to the service via the retained client end of the channel pair must be issued in order to ascertain whether the connection has been successfully established.

  • |fragment_name| should be specified if the parent is a composite node.
  • |service_name| should be specified if attempting to connect to a service. This will be mandatory in the future: https://fxbug.dev/42058509.
  • error Reports ZX_ERR_UNAVAILABLE if the parent (or fragment) does not have an outgoing directory.
  • error Reports ZX_ERR_NOT_FOUND if |fragment_name| is not the name of a parent.
  • error Reports ZX_ERR_NOT_SUPPORTED if |fragment_name| is specified by the device is not a composite node

Implementations§

source§

impl CoordinatorRequest

Trait Implementations§

source§

impl Debug for CoordinatorRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more