pub struct ClientProxy { /* private fields */ }Implementations§
Source§impl ClientProxy
impl ClientProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.powercap/Client.
Sourcepub fn take_event_stream(&self) -> ClientEventStream
pub fn take_event_stream(&self) -> ClientEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_powercap_tree(
&self,
) -> QueryResponseFut<Vec<PowercapNodeInfo>, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_powercap_tree( &self, ) -> QueryResponseFut<Vec<PowercapNodeInfo>, DefaultFuchsiaResourceDialect> ⓘ
Retrieves the static powercap zone topology at container initialization.
Sourcepub fn get_power_limit(
&self,
node_id: u64,
) -> QueryResponseFut<ClientGetPowerLimitResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_power_limit( &self, node_id: u64, ) -> QueryResponseFut<ClientGetPowerLimitResult, DefaultFuchsiaResourceDialect> ⓘ
Reads the current constraint_0_power_limit_uw for node_id.
Before SetPowerLimit is called, returns the zone’s initial unthrottled
limit (max_power_uw, or the highest entry in power_levels_uw if
max_power_uw is omitted, or 0 if neither is configured).
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or
refers to an unconstrained container zone.
Sourcepub fn set_power_limit(
&self,
node_id: u64,
power_limit_uw: u64,
) -> QueryResponseFut<ClientSetPowerLimitResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_power_limit( &self, node_id: u64, power_limit_uw: u64, ) -> QueryResponseFut<ClientSetPowerLimitResult, DefaultFuchsiaResourceDialect> ⓘ
Writes constraint_0_power_limit_uw for node_id (in microwatts).
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or
refers to an unconstrained container zone.
Sourcepub fn get_power_limit_bypass(
&self,
node_id: u64,
) -> QueryResponseFut<ClientGetPowerLimitBypassResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_power_limit_bypass( &self, node_id: u64, ) -> QueryResponseFut<ClientGetPowerLimitBypassResult, DefaultFuchsiaResourceDialect> ⓘ
Reads the remaining bypass duration in milliseconds (power_limit_bypass_msec).
Returns 0 if no bypass is currently active.
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or if
supports_bypass is not enabled on the target zone.
Sourcepub fn set_power_limit_bypass(
&self,
node_id: u64,
bypass_time_ms: u64,
) -> QueryResponseFut<ClientSetPowerLimitBypassResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn set_power_limit_bypass( &self, node_id: u64, bypass_time_ms: u64, ) -> QueryResponseFut<ClientSetPowerLimitBypassResult, DefaultFuchsiaResourceDialect> ⓘ
Sets or clears the power limit bypass timer (power_limit_bypass_msec).
A value of 0 immediately cancels any active bypass and restores the
cached thermal power limit. Setting a non-zero bypass_time_ms while a
bypass is already active replaces the active timer deadline with a new
deadline bypass_time_ms from now.
Returns PowercapError.INVALID_ARGUMENTS if node_id is unknown or if
supports_bypass is not enabled on the target zone.
Trait Implementations§
Source§impl ClientProxyInterface for ClientProxy
impl ClientProxyInterface for ClientProxy
type GetPowercapTreeResponseFut = QueryResponseFut<Vec<PowercapNodeInfo>>
type GetPowerLimitResponseFut = QueryResponseFut<Result<u64, PowercapError>>
type SetPowerLimitResponseFut = QueryResponseFut<Result<(), PowercapError>>
type GetPowerLimitBypassResponseFut = QueryResponseFut<Result<u64, PowercapError>>
type SetPowerLimitBypassResponseFut = QueryResponseFut<Result<(), PowercapError>>
fn get_powercap_tree(&self) -> Self::GetPowercapTreeResponseFut
fn get_power_limit(&self, node_id: u64) -> Self::GetPowerLimitResponseFut
fn set_power_limit( &self, node_id: u64, power_limit_uw: u64, ) -> Self::SetPowerLimitResponseFut
fn get_power_limit_bypass( &self, node_id: u64, ) -> Self::GetPowerLimitBypassResponseFut
fn set_power_limit_bypass( &self, node_id: u64, bypass_time_ms: u64, ) -> Self::SetPowerLimitBypassResponseFut
Source§impl Clone for ClientProxy
impl Clone for ClientProxy
Source§impl Debug for ClientProxy
impl Debug for ClientProxy
Source§impl Proxy for ClientProxy
impl Proxy for ClientProxy
Source§type Protocol = ClientMarker
type Protocol = ClientMarker
Proxy controls.