#[non_exhaustive]pub struct CedReading {
pub counters: CedCounters,
/* private fields */
}Expand description
The per-lane character error counts from one read of the CED registers, with what the read found wrong.
The checksum is always checked; a mismatch is a CedWarning, not an error, and the
counters are decoded either way. Read the warnings with warnings
or iter_warnings; the storage is private.
The counters accumulate and saturate at 0x7FFF, so a saturated count means “at least”.
A sink may clear them when they are read, so a reading is a running total on some sinks
and the count since the previous read on others; a reading lower than the previous one
means a reset (clear on read, hot plug, an SCDC clear), and counting starts again from
it. Count afresh after retraining, a rate change or a hot plug too. A lane without a
valid count is None: unknown, not zero.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.counters: CedCountersThe decoded counters, whatever the warnings say.
Implementations§
Source§impl CedReading
impl CedReading
Sourcepub fn warnings(&self) -> &[CedWarning]
pub fn warnings(&self) -> &[CedWarning]
The warnings, in the order they were found.
Sourcepub fn iter_warnings(&self) -> impl Iterator<Item = &CedWarning>
pub fn iter_warnings(&self) -> impl Iterator<Item = &CedWarning>
The warnings, in the order they were found.
Trait Implementations§
Source§impl Clone for CedReading
impl Clone for CedReading
Source§fn clone(&self) -> CedReading
fn clone(&self) -> CedReading
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more