pub struct DeviceProxy { /* private fields */ }Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.platform.device/Device.
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_mmio_by_id(
&self,
index: u32,
) -> QueryResponseFut<DeviceGetMmioByIdResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_mmio_by_id( &self, index: u32, ) -> QueryResponseFut<DeviceGetMmioByIdResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a memory mapped IO (MMIO) resource for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of mmios. - error
ZX_ERR_INTERNALif the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUNDif the retrieved mmio’s base address is NULL.
Sourcepub fn get_mmio_by_name(
&self,
name: &str,
) -> QueryResponseFut<DeviceGetMmioByNameResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_mmio_by_name( &self, name: &str, ) -> QueryResponseFut<DeviceGetMmioByNameResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a memory mapped IO (MMIO) resource for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved mmio is not valid. - error
ZX_ERR_NOT_FOUNDif the retrieved’s mmio base address is NULL.
Sourcepub fn get_interrupt_by_id(
&self,
index: u32,
flags: u32,
) -> QueryResponseFut<DeviceGetInterruptByIdResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_interrupt_by_id( &self, index: u32, flags: u32, ) -> QueryResponseFut<DeviceGetInterruptByIdResult, DefaultFuchsiaResourceDialect> ⓘ
Returns an interrupt handle for the given |index|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of interrupts. - error
ZX_ERR_INTERNALif the retrieved interrupt is not valid.
Sourcepub fn get_interrupt_by_name(
&self,
name: &str,
flags: u32,
) -> QueryResponseFut<DeviceGetInterruptByNameResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_interrupt_by_name( &self, name: &str, flags: u32, ) -> QueryResponseFut<DeviceGetInterruptByNameResult, DefaultFuchsiaResourceDialect> ⓘ
Returns an interrupt handle for the given |name|.
|flags| is forwarded as the |options| parameter to zx_interrupt_create.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved interrupt is not valid.
Sourcepub fn get_bti_by_id(
&self,
index: u32,
) -> QueryResponseFut<DeviceGetBtiByIdResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_bti_by_id( &self, index: u32, ) -> QueryResponseFut<DeviceGetBtiByIdResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a bus transaction initiator (bti) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of btis. - error
ZX_ERR_INTERNALif the retrieved bti is not valid.
Sourcepub fn get_bti_by_name(
&self,
name: &str,
) -> QueryResponseFut<DeviceGetBtiByNameResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_bti_by_name( &self, name: &str, ) -> QueryResponseFut<DeviceGetBtiByNameResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a bus transaction initiator (bti) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved bti is not valid.
Sourcepub fn get_smc_by_id(
&self,
index: u32,
) -> QueryResponseFut<DeviceGetSmcByIdResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_smc_by_id( &self, index: u32, ) -> QueryResponseFut<DeviceGetSmcByIdResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a secure monitor call (smc) handle for the given |index|.
- error
ZX_ERR_OUT_OF_RANGEif |index| is equal or greater than the number of smcs. - error
ZX_ERR_INTERNALif the retrieved smc is not valid.
Sourcepub fn get_smc_by_name(
&self,
name: &str,
) -> QueryResponseFut<DeviceGetSmcByNameResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_smc_by_name( &self, name: &str, ) -> QueryResponseFut<DeviceGetSmcByNameResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a secure monitor call (smc) handle for the given |name|.
- error
ZX_ERR_INVALID_ARGSif |name| is an empty string. - error
ZX_ERR_OUT_OF_RANGEif |name| is not found. - error
ZX_ERR_INTERNALif the retrieved smc is not valid.
Sourcepub fn get_power_configuration(
&self,
) -> QueryResponseFut<DeviceGetPowerConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_power_configuration( &self, ) -> QueryResponseFut<DeviceGetPowerConfigurationResult, DefaultFuchsiaResourceDialect> ⓘ
Returns power configuration for the device the driver has bound to.
Sourcepub fn get_node_device_info(
&self,
) -> QueryResponseFut<DeviceGetNodeDeviceInfoResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_node_device_info( &self, ) -> QueryResponseFut<DeviceGetNodeDeviceInfoResult, DefaultFuchsiaResourceDialect> ⓘ
Returns information about the device corresponding to the node that the driver has bound to.
Sourcepub fn get_board_info(
&self,
) -> QueryResponseFut<DeviceGetBoardInfoResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_board_info( &self, ) -> QueryResponseFut<DeviceGetBoardInfoResult, DefaultFuchsiaResourceDialect> ⓘ
Return information about the board the device is attached to.
Sourcepub fn get_metadata(
&self,
id: &str,
) -> QueryResponseFut<DeviceGetMetadataResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_metadata( &self, id: &str, ) -> QueryResponseFut<DeviceGetMetadataResult, DefaultFuchsiaResourceDialect> ⓘ
Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetMmioByIdResponseFut = QueryResponseFut<Result<Mmio, i32>>
type GetMmioByNameResponseFut = QueryResponseFut<Result<Mmio, i32>>
type GetInterruptByIdResponseFut = QueryResponseFut<Result<Interrupt, i32>>
type GetInterruptByNameResponseFut = QueryResponseFut<Result<Interrupt, i32>>
type GetBtiByIdResponseFut = QueryResponseFut<Result<Bti, i32>>
type GetBtiByNameResponseFut = QueryResponseFut<Result<Bti, i32>>
type GetSmcByIdResponseFut = QueryResponseFut<Result<Resource, i32>>
type GetSmcByNameResponseFut = QueryResponseFut<Result<Resource, i32>>
type GetPowerConfigurationResponseFut = QueryResponseFut<Result<Vec<PowerElementConfiguration>, i32>>
type GetNodeDeviceInfoResponseFut = QueryResponseFut<Result<NodeDeviceInfo, i32>>
type GetBoardInfoResponseFut = QueryResponseFut<Result<BoardInfo, i32>>
type GetMetadataResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn get_mmio_by_id(&self, index: u32) -> Self::GetMmioByIdResponseFut
fn get_mmio_by_name(&self, name: &str) -> Self::GetMmioByNameResponseFut
fn get_interrupt_by_id( &self, index: u32, flags: u32, ) -> Self::GetInterruptByIdResponseFut
fn get_interrupt_by_name( &self, name: &str, flags: u32, ) -> Self::GetInterruptByNameResponseFut
fn get_bti_by_id(&self, index: u32) -> Self::GetBtiByIdResponseFut
fn get_bti_by_name(&self, name: &str) -> Self::GetBtiByNameResponseFut
fn get_smc_by_id(&self, index: u32) -> Self::GetSmcByIdResponseFut
fn get_smc_by_name(&self, name: &str) -> Self::GetSmcByNameResponseFut
fn get_power_configuration(&self) -> Self::GetPowerConfigurationResponseFut
fn get_node_device_info(&self) -> Self::GetNodeDeviceInfoResponseFut
fn get_board_info(&self) -> Self::GetBoardInfoResponseFut
fn get_metadata(&self, id: &str) -> Self::GetMetadataResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.