Struct cloudbbq::BBQDevice[][src]

pub struct BBQDevice { /* fields omitted */ }

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]

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]

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]

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]

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]

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]

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

impl Clone for BBQDevice[src]

impl Debug for BBQDevice[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.