#[non_exhaustive]pub enum LinkState {
NoCarrier,
Searching,
Reading,
Burst(Vec<u8>),
}
Expand description
SAME Link Layer Status
The SAME receiver decodes data in three basic steps:
-
Synchronization: the receiver estimates the bit and byte synchronization of the incoming signal.
-
Burst decoding: SAME transmissions are repeated three times. Each “burst” is decoded individually.
-
Message framing: three bursts are assembled into a single message, which receives some basic validity checks before being emitted to the client.
The LinkState
reflects the overall state of this
system as it detects the carrier, SAME preamble, and
reads a Burst.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoCarrier
Dropped data carrier
Searching
Searching for burst prefix
The framer has synchronized to the bit/byte
boundaries and is searching for a message prefix
like “ZCZC
.”
Reading
Now reading a burst
A SAME burst has been detected and is now being decoded.
Burst(Vec<u8>)
A burst has been completely read
The current burst has ended, and the raw burst
bytes are included. SAME messages use only ASCII
printable characters, but no such guarantees are
made about the contents of this enum. The Burst
is aligned to the start of the transmission (“ZCZC
”
or “NNNN
”), but even those bytes may have errors.
Clients MUST NOT report a single Burst
as a
SAME message. Messages should instead be obtained from
from the transport layer’s TransportState::Message
.
Trait Implementations§
Source§impl From<LinkState> for SameEventType
impl From<LinkState> for SameEventType
impl Eq for LinkState
impl StructuralPartialEq for LinkState
Auto Trait Implementations§
impl Freeze for LinkState
impl RefUnwindSafe for LinkState
impl Send for LinkState
impl Sync for LinkState
impl Unpin for LinkState
impl UnwindSafe for LinkState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.