DeviceSettings

Struct DeviceSettings 

Source
pub struct DeviceSettings {
Show 14 fields pub interval: u16, pub db_mode: u16, pub db_ref: u16, pub temp_offset: i16, pub temp_unit: u16, pub bl_off: u16, pub clock: u32, pub po_off: u16, pub hz: u16, pub digits: u16, pub beep: u16, pub rec_tolerance: u16, pub unknown1: u8, pub unknown2: u16,
}

Fields§

§interval: u16§db_mode: u16§db_ref: u16§temp_offset: i16

Offset * 10, but seems to be different for C/F unit?! [range -999.9 - 999.9] Conversion is wrong in device, the value is always in Fahrenheit, but the formula used is F=C9/5, not F=C9/5+32.

§temp_unit: u16§bl_off: u16§clock: u32§po_off: u16§hz: u16§digits: u16§beep: u16§rec_tolerance: u16§unknown1: u8§unknown2: u16

Implementations§

Source§

impl DeviceSettings

Source

pub fn beeper(&self) -> bool

Source

pub fn set_beeper(&mut self, beep: bool)

Source

pub fn digit_count(&self) -> DigitCount

Source

pub fn set_digit_count(&mut self, digits: DigitCount)

Source

pub fn ac_hertz(&self) -> AcHertz

Source

pub fn set_ac_hertz(&mut self, hertz: AcHertz)

Source

pub fn backlight_off(&self) -> u16

Source

pub fn set_backlight_off(&mut self, seconds: u16)

Source

pub fn autopower_off(&self) -> u16

Source

pub fn set_autopower_off(&mut self, minutes: u16)

Source

pub fn temp_unit(&self) -> TempUnit

Source

pub fn set_temp_unit(&mut self, unit: TempUnit)

Source

pub fn db_mode(&self) -> DbMode

Source

pub fn set_db_mode(&mut self, mode: DbMode)

Source

pub fn recording_thd(&self) -> u8

Source

pub fn set_recording_thd(&mut self, thd: u8)

Source

pub fn recording_interval(&self) -> u16

Source

pub fn set_recording_interval(&mut self, seconds: u16)

Source

pub fn d_bm_ref(&self) -> u16

Source

pub fn set_d_bm_ref(&mut self, ohm: u16)

Source

pub fn temp_offset(&self) -> i16

Source

pub fn set_temp_offset(&mut self, offset: i16)

Source

pub fn clock(&self) -> NaiveTime

Source

pub fn set_clock(&mut self, time: NaiveTime)

Source

pub fn as_bytes(&self) -> Result<Bytes, Error>

Trait Implementations§

Source§

impl Clone for DeviceSettings

Source§

fn clone(&self) -> DeviceSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DeviceSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DeviceSettings

Source§

fn default() -> DeviceSettings

Returns the “default value” for a type. Read more
Source§

impl TryFrom<&[u8]> for DeviceSettings

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.