pub struct DeviceControllerProxy { /* private fields */ }
Implementations§
source§impl DeviceControllerProxy
impl DeviceControllerProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.device.manager/DeviceController.
sourcepub fn take_event_stream(&self) -> DeviceControllerEventStream
pub fn take_event_stream(&self) -> DeviceControllerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn connect_multiplexed(
&self,
server: Channel,
include_node: bool,
include_controller: bool
) -> Result<(), Error>
pub fn connect_multiplexed( &self, server: Channel, include_node: bool, include_controller: bool ) -> Result<(), Error>
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.
sourcepub fn connect_to_controller(
&self,
controller: ServerEnd<ControllerMarker>
) -> Result<(), Error>
pub fn connect_to_controller( &self, controller: ServerEnd<ControllerMarker> ) -> Result<(), Error>
Connect to the device’s fuchsia.device/Controller API.
sourcepub fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>
pub fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>
Connect to the device’s API.
NOTE: This is not multiplexed with fuchsia.io/Node or fuchsia.device/Controller.
sourcepub fn bind_driver(
&self,
driver_path: &str,
driver: Vmo,
default_dispatcher_scheduler_role: &str
) -> QueryResponseFut<(i32, Option<Channel>)>
pub fn bind_driver( &self, driver_path: &str, driver: Vmo, default_dispatcher_scheduler_role: &str ) -> QueryResponseFut<(i32, Option<Channel>)>
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.
- request
default_dispatcher_scheduler_role
the scheduler role to set for the default dispatcher created for the driver. The scheduler role determines the thread pool that the dispatcher will be serviced by. This may be an empty string if the driver does not require the dispatcher to run in a specific thread pool. Setting a scheduler role is on a best-effort basis. If an invalid scheduler role is specified, the dispatcher will be serviced by the default thread pool, and this will not cause an error to be returned.
sourcepub fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>
pub fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>
Give this device a channel to its shadow in another process.
sourcepub fn unbind(&self) -> QueryResponseFut<DeviceControllerUnbindResult>
pub fn unbind(&self) -> QueryResponseFut<DeviceControllerUnbindResult>
Ask devhost to unbind this device. On success, the remote end of this interface channel will close instead of returning a result.
sourcepub fn complete_removal(
&self
) -> QueryResponseFut<DeviceControllerCompleteRemovalResult>
pub fn complete_removal( &self ) -> QueryResponseFut<DeviceControllerCompleteRemovalResult>
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
.
sourcepub fn suspend(&self, flags: u32) -> QueryResponseFut<i32>
pub fn suspend(&self, flags: u32) -> QueryResponseFut<i32>
Ask devhost to suspend this device, using the target state indicated by flags
.
sourcepub fn resume(&self, target_system_state: u32) -> QueryResponseFut<i32>
pub fn resume(&self, target_system_state: u32) -> QueryResponseFut<i32>
Ask devhost to resume this device, using the target system state indicated by ‘target_system_state’.
sourcepub fn signal_made_visible(&self) -> Result<(), Error>
pub fn signal_made_visible(&self) -> Result<(), Error>
Informs the driver that it has been made visible in devfs.
Trait Implementations§
source§impl Clone for DeviceControllerProxy
impl Clone for DeviceControllerProxy
source§fn clone(&self) -> DeviceControllerProxy
fn clone(&self) -> DeviceControllerProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DeviceControllerProxy
impl Debug for DeviceControllerProxy
source§impl DeviceControllerProxyInterface for DeviceControllerProxy
impl DeviceControllerProxyInterface for DeviceControllerProxy
fn connect_multiplexed( &self, server: Channel, include_node: bool, include_controller: bool ) -> Result<(), Error>
fn connect_to_controller( &self, controller: ServerEnd<ControllerMarker> ) -> Result<(), Error>
fn connect_to_device_protocol(&self, server: Channel) -> Result<(), Error>
type BindDriverResponseFut = QueryResponseFut<(i32, Option<Channel>)>
fn bind_driver( &self, driver_path: &str, driver: Vmo, default_dispatcher_scheduler_role: &str ) -> Self::BindDriverResponseFut
fn connect_proxy_(&self, shadow: Channel) -> Result<(), Error>
type InitResponseFut = QueryResponseFut<i32>
fn init(&self) -> Self::InitResponseFut
type UnbindResponseFut = QueryResponseFut<Result<(), i32>>
fn unbind(&self) -> Self::UnbindResponseFut
type CompleteRemovalResponseFut = QueryResponseFut<Result<(), i32>>
fn complete_removal(&self) -> Self::CompleteRemovalResponseFut
type SuspendResponseFut = QueryResponseFut<i32>
fn suspend(&self, flags: u32) -> Self::SuspendResponseFut
type ResumeResponseFut = QueryResponseFut<i32>
fn resume(&self, target_system_state: u32) -> Self::ResumeResponseFut
fn signal_made_visible(&self) -> Result<(), Error>
source§impl Proxy for DeviceControllerProxy
impl Proxy for DeviceControllerProxy
§type Protocol = DeviceControllerMarker
type Protocol = DeviceControllerMarker
Proxy
controls.