pub struct RealtimeEntry { /* private fields */ }Expand description
Represents a real time entry of sensor values by parsing the byte array returned by the device.
The sensor returns 16 bytes in total. It’s unclear what the meaning of these bytes is beyond what is decoded in this method.
Semantics of the data (in little endian encoding): bytes 0-1: temperature in 0.1 °C byte 2: unknown bytes 3-6: brightness in lux byte 7: moisture in % byted 8-9: conductivity in µS/cm bytes 10-15: unknown
(source https://github.com/vrachieru/xiaomi-flower-care-api/blob/master/flowercare/reader.py#L138)
Implementations§
Source§impl RealtimeEntry
impl RealtimeEntry
pub fn temperature(&self) -> u16
pub fn brightness(&self) -> u32
pub fn moisture(&self) -> u8
pub fn conductivity(&self) -> u16
Trait Implementations§
Source§impl Clone for RealtimeEntry
impl Clone for RealtimeEntry
Source§fn clone(&self) -> RealtimeEntry
fn clone(&self) -> RealtimeEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RealtimeEntry
impl Debug for RealtimeEntry
Auto Trait Implementations§
impl Freeze for RealtimeEntry
impl RefUnwindSafe for RealtimeEntry
impl Send for RealtimeEntry
impl Sync for RealtimeEntry
impl Unpin for RealtimeEntry
impl UnwindSafe for RealtimeEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more