pub enum DeviceControllerRequest {
ConnectMultiplexed {
server: Channel,
include_node: bool,
include_controller: bool,
control_handle: DeviceControllerControlHandle,
},
ConnectToController {
controller: ServerEnd<ControllerMarker>,
control_handle: DeviceControllerControlHandle,
},
ConnectToDeviceProtocol {
server: Channel,
control_handle: DeviceControllerControlHandle,
},
BindDriver {
driver_path: String,
driver: Vmo,
responder: DeviceControllerBindDriverResponder,
},
ConnectProxy_ {
shadow: Channel,
control_handle: DeviceControllerControlHandle,
},
Init {
responder: DeviceControllerInitResponder,
},
Unbind {
responder: DeviceControllerUnbindResponder,
},
CompleteRemoval {
responder: DeviceControllerCompleteRemovalResponder,
},
Suspend {
flags: u32,
responder: DeviceControllerSuspendResponder,
},
Resume {
target_system_state: u32,
responder: DeviceControllerResumeResponder,
},
}
Expand description
Protocol for controlling devices in a devhost process from the devcoordinator
Variants§
ConnectMultiplexed
Connect to the device’s FIDL, but also include other FIDLs multiplexed on the same channel.
- request
include_node
if this is true then include fuchsia.io/Node on the channel. - request
include_controller
if this is true then include fuchsia.device/Controller on the channel.
ConnectToController
Connect to the device’s fuchsia.device/Controller API.
ConnectToDeviceProtocol
Connect to the device’s API.
NOTE: This is not multiplexed with fuchsia.io/Node or fuchsia.device/Controller.
BindDriver
Bind the requested driver to this device. driver_path
is informational,
but all calls to BindDriver/CreateDevice should use the same driver_path
each time they use a driver
VMO with the same contents. Returns a status
and optionally a channel to the driver’s test output. test_output
will be
not present unless the driver is configured to run its run_unit_tests hook, in
which case the other end of the channel will have been passed to the driver.
ConnectProxy_
Give this device a channel to its shadow in another process.
Init
Fields
responder: DeviceControllerInitResponder
Ask devhost to call the device init hook.
Unbind
Fields
responder: DeviceControllerUnbindResponder
Ask devhost to unbind this device. On success, the remote end of this interface channel will close instead of returning a result.
CompleteRemoval
Fields
responder: DeviceControllerCompleteRemovalResponder
Ask the devhost to complete the removal of this device, which previously had
invoked ScheduleRemove
. This is a special case that can be removed
once device_remove
invokes unbind
.
Suspend
Ask devhost to suspend this device, using the target state indicated by flags
.
Resume
Ask devhost to resume this device, using the target system state indicated by ‘target_system_state’.
Implementations§
source§impl DeviceControllerRequest
impl DeviceControllerRequest
pub fn into_connect_multiplexed( self ) -> Option<(Channel, bool, bool, DeviceControllerControlHandle)>
pub fn into_connect_to_controller( self ) -> Option<(ServerEnd<ControllerMarker>, DeviceControllerControlHandle)>
pub fn into_connect_to_device_protocol( self ) -> Option<(Channel, DeviceControllerControlHandle)>
pub fn into_bind_driver( self ) -> Option<(String, Vmo, DeviceControllerBindDriverResponder)>
pub fn into_connect_proxy_( self ) -> Option<(Channel, DeviceControllerControlHandle)>
pub fn into_init(self) -> Option<DeviceControllerInitResponder>
pub fn into_unbind(self) -> Option<DeviceControllerUnbindResponder>
pub fn into_complete_removal( self ) -> Option<DeviceControllerCompleteRemovalResponder>
pub fn into_suspend(self) -> Option<(u32, DeviceControllerSuspendResponder)>
pub fn into_resume(self) -> Option<(u32, DeviceControllerResumeResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL