pub struct Health {
pub notifications: BTreeMap<&'static str, u64>,
pub decode_errors: BTreeMap<&'static str, u64>,
pub irregular_eeg_frames: u64,
pub sequence_gaps: u64,
pub frames_lost: u64,
pub counter_restarts: u64,
pub battery_percent: Option<u8>,
pub contact_state: Option<u8>,
pub reconnects: u64,
pub connected: bool,
}Expand description
Running counters for a connection. Every irregularity increments a counter here.
Fields§
§notifications: BTreeMap<&'static str, u64>Notifications received per characteristic name.
decode_errors: BTreeMap<&'static str, u64>Notifications that failed to decode, per characteristic name.
irregular_eeg_frames: u64EEG frames without a sequence byte or with an unknown frame type.
sequence_gaps: u64EEG sequence gaps (lost frames, or restarts not explained by a start command).
frames_lost: u64Estimated EEG frames lost in those gaps.
counter_restarts: u64Counter restarts following a stream-start command.
battery_percent: Option<u8>Last battery percentage reported.
contact_state: Option<u8>Last contact state reported.
reconnects: u64Times the link was re-established after being lost.
connected: boolWhether the link is up.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Health
impl Freeze for Health
impl Move for Health
impl RefUnwindSafe for Health
impl Send for Health
impl Sync for Health
impl Unpin for Health
impl UnsafeUnpin for Health
impl UnwindSafe for Health
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