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.google.nanohub/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 download_firmware(
&self,
firmware: Vmo,
offset: u64,
) -> QueryResponseFut<DeviceDownloadFirmwareResult, DefaultFuchsiaResourceDialect>
pub fn download_firmware( &self, firmware: Vmo, offset: u64, ) -> QueryResponseFut<DeviceDownloadFirmwareResult, DefaultFuchsiaResourceDialect>
Request to sent to nanohub to load the firmware.
Sourcepub fn get_firmware_name(
&self,
) -> QueryResponseFut<String, DefaultFuchsiaResourceDialect>
pub fn get_firmware_name( &self, ) -> QueryResponseFut<String, DefaultFuchsiaResourceDialect>
The name of the firmware binary running on the MCU.
Sourcepub fn get_firmware_version(
&self,
) -> QueryResponseFut<McuVersionInfo, DefaultFuchsiaResourceDialect>
pub fn get_firmware_version( &self, ) -> QueryResponseFut<McuVersionInfo, DefaultFuchsiaResourceDialect>
The version of the firmware binary running on the MCU.
Sourcepub fn get_time_sync(
&self,
) -> QueryResponseFut<DeviceGetTimeSyncResult, DefaultFuchsiaResourceDialect>
pub fn get_time_sync( &self, ) -> QueryResponseFut<DeviceGetTimeSyncResult, DefaultFuchsiaResourceDialect>
The time since boot recorded by the AP and the MCU.
Sourcepub fn set_wake_lock(
&self,
value: McuWakeLockValue,
) -> QueryResponseFut<DeviceSetWakeLockResult, DefaultFuchsiaResourceDialect>
pub fn set_wake_lock( &self, value: McuWakeLockValue, ) -> QueryResponseFut<DeviceSetWakeLockResult, DefaultFuchsiaResourceDialect>
Set an MCU wake lock request to prevent the MCU from entering a low-power state.
Sourcepub fn get_wake_up_event_duration(
&self,
) -> QueryResponseFut<DeviceGetWakeUpEventDurationResult, DefaultFuchsiaResourceDialect>
pub fn get_wake_up_event_duration( &self, ) -> QueryResponseFut<DeviceGetWakeUpEventDurationResult, DefaultFuchsiaResourceDialect>
Get the current duration of time the MCU will remain awake.
Sourcepub fn set_wake_up_event_duration(
&self,
duration: i64,
) -> QueryResponseFut<DeviceSetWakeUpEventDurationResult, DefaultFuchsiaResourceDialect>
pub fn set_wake_up_event_duration( &self, duration: i64, ) -> QueryResponseFut<DeviceSetWakeUpEventDurationResult, DefaultFuchsiaResourceDialect>
Set a duration of time for the MCU to remain awake.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type DownloadFirmwareResponseFut = QueryResponseFut<Result<(), i32>>
type GetFirmwareNameResponseFut = QueryResponseFut<String>
type GetFirmwareVersionResponseFut = QueryResponseFut<McuVersionInfo>
type GetTimeSyncResponseFut = QueryResponseFut<Result<McuTimeSyncInfo, i32>>
type SetWakeLockResponseFut = QueryResponseFut<Result<(), i32>>
type GetWakeUpEventDurationResponseFut = QueryResponseFut<Result<i64, i32>>
type SetWakeUpEventDurationResponseFut = QueryResponseFut<Result<(), i32>>
fn download_firmware( &self, firmware: Vmo, offset: u64, ) -> Self::DownloadFirmwareResponseFut
fn get_firmware_name(&self) -> Self::GetFirmwareNameResponseFut
fn get_firmware_version(&self) -> Self::GetFirmwareVersionResponseFut
fn get_time_sync(&self) -> Self::GetTimeSyncResponseFut
fn set_wake_lock(&self, value: McuWakeLockValue) -> Self::SetWakeLockResponseFut
fn get_wake_up_event_duration(&self) -> Self::GetWakeUpEventDurationResponseFut
fn set_wake_up_event_duration( &self, duration: i64, ) -> Self::SetWakeUpEventDurationResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for DeviceProxy
impl !RefUnwindSafe for DeviceProxy
impl Send for DeviceProxy
impl Sync for DeviceProxy
impl Unpin for DeviceProxy
impl !UnwindSafe for DeviceProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> FromClient for Twhere
T: Proxy,
impl<T> FromClient for Twhere
T: Proxy,
§fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
fn from_client(value: ClientEnd<<T as FromClient>::Protocol>) -> T
Converts from a client.