Struct SarProxy
pub struct SarProxy<'p>(Proxy<'p>);Expand description
Client for the SAR power features of a modem.
The host picks a power level from a table in the device. Ask the modem vendor what each level means, because the interface does not expose the table.
Added in ModemManager 1.20.
Upstream documentation: https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.Sar.html.
Tuple Fields§
§0: Proxy<'p>Implementations§
§impl<'p> SarProxy<'p>
impl<'p> SarProxy<'p>
pub async fn new<P>(conn: &Connection, path: P) -> Result<SarProxy<'p>>
pub async fn new<P>(conn: &Connection, path: P) -> Result<SarProxy<'p>>
Creates a new proxy with the given path, and the default destination.
pub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
pub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
pub fn inner(&self) -> &Proxy<'p>
pub fn inner(&self) -> &Proxy<'p>
The reference to the underlying zbus::Proxy.
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
pub async fn enable(&self, enable: bool) -> Result<()>
pub async fn enable(&self, enable: bool) -> Result<()>
Turns SAR power control on or off.
When it is off, only the device changes the power level.
pub async fn set_power_level(&self, level: u32) -> Result<()>
pub async fn set_power_level(&self, level: u32) -> Result<()>
Sets the power level of all antennas.
pub fn cached_state(
&self,
) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
pub fn cached_state( &self, ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
Whether SAR power control is on.
Get the cached value of the State property, or None if the property is not cached.
pub async fn receive_state_changed(
&self,
) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
pub async fn receive_state_changed( &self, ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
Whether SAR power control is on.
Create a stream for the State property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].
pub async fn power_level(&self) -> Result<u32>
pub async fn power_level(&self) -> Result<u32>
The current power level.
It only matters while SAR power control is on.
pub fn cached_power_level(
&self,
) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
pub fn cached_power_level( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>
The current power level.
It only matters while SAR power control is on.
Get the cached value of the PowerLevel property, or None if the property is not cached.
pub async fn receive_power_level_changed(
&self,
) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
pub async fn receive_power_level_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>
The current power level.
It only matters while SAR power control is on.
Create a stream for the PowerLevel property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].