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.cpu.ctrl/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_operating_point_info(
&self,
opp: u32,
) -> QueryResponseFut<DeviceGetOperatingPointInfoResult, DefaultFuchsiaResourceDialect>
pub fn get_operating_point_info( &self, opp: u32, ) -> QueryResponseFut<DeviceGetOperatingPointInfoResult, DefaultFuchsiaResourceDialect>
Returns information about a given operating point for this performance domain.
Sourcepub fn get_current_operating_point(
&self,
) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
pub fn get_current_operating_point( &self, ) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
Gets the current operating point of the device.
Sourcepub fn set_current_operating_point(
&self,
requested_opp: u32,
) -> QueryResponseFut<DeviceSetCurrentOperatingPointResult, DefaultFuchsiaResourceDialect>
pub fn set_current_operating_point( &self, requested_opp: u32, ) -> QueryResponseFut<DeviceSetCurrentOperatingPointResult, DefaultFuchsiaResourceDialect>
Set the operating point of this device to the requested operating point. Returns ZX_OK, if the device is in a working state and the operating point is changed to requested_opp successfully. out_opp will be same as requested_opp. Returns error status, if switching to the requested_opp was unsuccessful. out_opp is the operating performance point (OPP) that the device is currently in.
Sourcepub fn get_operating_point_count(
&self,
) -> QueryResponseFut<DeviceGetOperatingPointCountResult, DefaultFuchsiaResourceDialect>
pub fn get_operating_point_count( &self, ) -> QueryResponseFut<DeviceGetOperatingPointCountResult, DefaultFuchsiaResourceDialect>
Returns the number of operating points within this performance domain.
Sourcepub fn get_num_logical_cores(
&self,
) -> QueryResponseFut<u64, DefaultFuchsiaResourceDialect>
pub fn get_num_logical_cores( &self, ) -> QueryResponseFut<u64, DefaultFuchsiaResourceDialect>
Returns the number of logical cores contained within this performance domain.
Sourcepub fn get_logical_core_id(
&self,
index: u64,
) -> QueryResponseFut<u64, DefaultFuchsiaResourceDialect>
pub fn get_logical_core_id( &self, index: u64, ) -> QueryResponseFut<u64, DefaultFuchsiaResourceDialect>
Returns a global system-wide core ID for the nth core in this
performance domain. index
must be a value in the range [0, n) where
n is the value returned by GetNumLogicalCores().
Sourcepub fn get_domain_id(
&self,
) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
pub fn get_domain_id( &self, ) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
Returns the id of this performance domain within its package. This number should be stable across boots, but clients should prefer to use GetRelativePerformance to differentiate cores if possible.
Sourcepub fn get_relative_performance(
&self,
) -> QueryResponseFut<DeviceGetRelativePerformanceResult, DefaultFuchsiaResourceDialect>
pub fn get_relative_performance( &self, ) -> QueryResponseFut<DeviceGetRelativePerformanceResult, DefaultFuchsiaResourceDialect>
The relative performance of this domain as configured by the platform, if known. The highest performance domain should return 255, while others should return N/255 fractional values relative to that domain. Returns ZX_ERR_NOT_SUPPORTED if the performance level is unknown.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetOperatingPointInfoResponseFut = QueryResponseFut<Result<CpuOperatingPointInfo, i32>>
type GetCurrentOperatingPointResponseFut = QueryResponseFut<u32>
type SetCurrentOperatingPointResponseFut = QueryResponseFut<Result<u32, i32>>
type GetOperatingPointCountResponseFut = QueryResponseFut<Result<u32, i32>>
type GetNumLogicalCoresResponseFut = QueryResponseFut<u64>
type GetLogicalCoreIdResponseFut = QueryResponseFut<u64>
type GetDomainIdResponseFut = QueryResponseFut<u32>
type GetRelativePerformanceResponseFut = QueryResponseFut<Result<u8, i32>>
fn get_operating_point_info( &self, opp: u32, ) -> Self::GetOperatingPointInfoResponseFut
fn get_current_operating_point( &self, ) -> Self::GetCurrentOperatingPointResponseFut
fn set_current_operating_point( &self, requested_opp: u32, ) -> Self::SetCurrentOperatingPointResponseFut
fn get_operating_point_count(&self) -> Self::GetOperatingPointCountResponseFut
fn get_num_logical_cores(&self) -> Self::GetNumLogicalCoresResponseFut
fn get_logical_core_id(&self, index: u64) -> Self::GetLogicalCoreIdResponseFut
fn get_domain_id(&self) -> Self::GetDomainIdResponseFut
fn get_relative_performance(&self) -> Self::GetRelativePerformanceResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)