Struct cloudbbq::BBQDevice [−][src]
A Bluetooth BBQ thermometer device which is connected.
Implementations
impl BBQDevice
[src]
pub fn is_compatible(device: &DeviceInfo) -> bool
[src]
Return whether the given Bluetooth device is a compatible BBQ thermometer.
pub async fn new(
bt_session: BluetoothSession,
device: DeviceId
) -> Result<BBQDevice, BluetoothError>
[src]
bt_session: BluetoothSession,
device: DeviceId
) -> Result<BBQDevice, BluetoothError>
Construct a new BBQDevice wrapper around an appropriate Bluetooth device which is already connected.
pub async fn authenticate(&self) -> Result<(), BluetoothError>
[src]
Authenticate with the device. This must be done before anything else, or it will disconnect after a short time.
pub async fn set_temperature_unit(
&self,
unit: TemperatureUnit
) -> Result<(), BluetoothError>
[src]
&self,
unit: TemperatureUnit
) -> Result<(), BluetoothError>
Configure which temperature unit the device will use for its display. This does not affect the Bluetooth interface.
pub async fn set_target_range(
&self,
probe: u8,
range: Range<f32>
) -> Result<(), Error>
[src]
&self,
probe: u8,
range: Range<f32>
) -> Result<(), Error>
Set the desired temperature range for the given temperature probe. If the temperature goes outside the given range then the device will sound an alarm.
pub async fn set_target_temp(&self, probe: u8, target: f32) -> Result<(), Error>
[src]
Set the target temperature for the given temperature probe. Once the temperature goes above the given value the device will sound an alarm.
pub async fn enable_real_time_data(
&self,
enable: bool
) -> Result<(), BluetoothError>
[src]
&self,
enable: bool
) -> Result<(), BluetoothError>
Enable or disable the device from sending real-time temperature data from its probes.
pub async fn request_battery_level(&self) -> Result<(), BluetoothError>
[src]
Request that the device report its current battery level. The result will come as a
SettingResult
event.
pub async fn real_time(
&self
) -> Result<impl Stream<Item = RealTimeData>, BluetoothError>
[src]
&self
) -> Result<impl Stream<Item = RealTimeData>, BluetoothError>
Get a stream of real time data from the device.
You must also call enable_real_time_data(true)
to actually get some data.
pub async fn setting_results(
&self
) -> Result<impl Stream<Item = SettingResult>, BluetoothError>
[src]
&self
) -> Result<impl Stream<Item = SettingResult>, BluetoothError>
Get a stream of setting results from the device. This includes responses to commands, battery level notifications, and notifications that the alarm has been silenced.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for BBQDevice
impl Send for BBQDevice
impl Sync for BBQDevice
impl Unpin for BBQDevice
impl !UnwindSafe for BBQDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,