Skip to main content

Kkm

Struct Kkm 

Source
pub struct Kkm {
Show 19 fields pub frame: &'static str, pub encrypted: bool, pub undecryptable: bool, pub model: Option<u8>, pub battery_mv: Option<u16>, pub battery_percent: Option<u8>, pub temperature: Option<f64>, pub humidity: Option<f64>, pub axis: Option<[i16; 3]>, pub alarm: Option<u8>, pub pir: Option<u8>, pub lux: Option<u16>, pub voc: Option<(u16, u32)>, pub nox: Option<u16>, pub co2: Option<(u16, u32)>, pub new_records: Option<(u8, u16)>, pub utc: Option<u32>, pub mac: Option<String>, pub firmware: Option<String>,
}
Expand description

A KKM frame.

Fields§

§frame: &'static str

sensor or system.

§encrypted: bool

Encrypted on the air.

§undecryptable: bool

Encrypted, and no password (or no address) to decrypt it with. When the password is wrong the readings are garbage: KKM’s format has no integrity check.

§model: Option<u8>

Device model (v2 sensor and system frames).

§battery_mv: Option<u16>

Battery voltage, mV (sensor frames).

§battery_percent: Option<u8>

Battery, percent (system frames).

§temperature: Option<f64>

Temperature, °C.

§humidity: Option<f64>

Relative humidity, %.

§axis: Option<[i16; 3]>

Three-axis reading (accelerometer in mg, or magnetometer on the S7S).

§alarm: Option<u8>

Alarm byte. Its bits are model specific; on the S7S parking sensor bits 0-1 are park status and bits 4-5 radar status.

§pir: Option<u8>

PIR indication.

§lux: Option<u16>

Illuminance, lux.

§voc: Option<(u16, u32)>

VOC index, and seconds since it was measured.

§nox: Option<u16>

NOx index.

§co2: Option<(u16, u32)>

CO2, ppm, and seconds since it was measured.

§new_records: Option<(u8, u16)>

New history records: record type and count.

§utc: Option<u32>

UTC seconds sent with an encrypted frame.

§mac: Option<String>

The beacon’s own MAC address, as printed (system frames).

§firmware: Option<String>

Firmware version (system frames).

Trait Implementations§

Source§

impl Clone for Kkm

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Kkm

Source§

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

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

impl Default for Kkm

Source§

fn default() -> Self

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

impl PartialEq for Kkm

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Kkm

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Kkm

Auto Trait Implementations§

§

impl Freeze for Kkm

§

impl RefUnwindSafe for Kkm

§

impl Send for Kkm

§

impl Sync for Kkm

§

impl Unpin for Kkm

§

impl UnsafeUnpin for Kkm

§

impl UnwindSafe for Kkm

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.