pub struct HistoricalEntry { /* private fields */ }Expand description
Represents a historical 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-3: timestamp, seconds since boot bytes 4-5: temperature in 0.1 °C byte 6: unknown bytes 7-9: brightness in lux byte 10: unknown byte 11: moisture in % bytes 12-13: conductivity in µS/cm bytes 14-15: unknown
(source https://github.com/vrachieru/xiaomi-flower-care-api/blob/master/flowercare/reader.py#L160)
Implementations§
Source§impl HistoricalEntry
impl HistoricalEntry
pub fn timestamp(&self) -> u64
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 HistoricalEntry
impl Clone for HistoricalEntry
Source§fn clone(&self) -> HistoricalEntry
fn clone(&self) -> HistoricalEntry
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 moreAuto Trait Implementations§
impl Freeze for HistoricalEntry
impl RefUnwindSafe for HistoricalEntry
impl Send for HistoricalEntry
impl Sync for HistoricalEntry
impl Unpin for HistoricalEntry
impl UnwindSafe for HistoricalEntry
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