pub enum Message {
StartOfMessage(MessageHeader),
EndOfMessage,
}
Expand description
A fully-decoded SAME/EAS message
In the EAS, the “message” is actually the audio signal to be
broadcast to the human listener: i.e., the “message” is the
synthesized voice you hear on weather radio. The message is
wrapped in audio pass-band digital data. The digital data
demarcates the StartOfMessage
and the EndOfMessage
.
The StartOfMessage
contains digital codes and timestamps
which summarize the audio message to follow. Some messages
are intended for either silent or audible tests. Others
report actual emergencies; these either may or must interrupt
normal broadcast programming.
The audio message immediately follows. The audio message may be up to two minutes long.
The EndOfMessage
demarcates the end of the audio message.
Message
implements Display
and efficient conversion to
&str
.
More information on the SAME/EAS standard may be found in,
- “NOAA Weather Radio (NWR) All Hazards Specific Area Message Encoding (SAME),” NWSI 10-172, 3 Oct. 2011, https://www.nws.noaa.gov/directives/sym/pd01017012curr.pdf
Variants§
StartOfMessage(MessageHeader)
Indicates start of audio message
A StartOfMessage
indicates that a SAME/EAS audio
message immediately follows. The message
header contains the event
type, affected areas, time extents, and originator
information.
For broadcast stations, the in-band audio which immediately
follows the StartOfMessage
may break station
programming and be aired directly to listeners.
EndOfMessage
Indicates end of audio message
An EndOfMessage
marks the conclusion of the SAME/EAS
audio message. For broadcast stations, it is an
indication that normal programming may resume.
Implementations§
Source§impl Message
impl Message
Sourcepub fn parity_error_count(&self) -> usize
pub fn parity_error_count(&self) -> usize
Count of parity errors
The number of bit errors which were corrected by the 2-of-3 parity correction algorithm. High parity error counts indicate a high bit error rate in the receiving system.
Parity errors are not tracked for the EndOfMessage
variant.
Sourcepub fn voting_byte_count(&self) -> usize
pub fn voting_byte_count(&self) -> usize
Number of bytes which were bit-voted
voting_byte_count
is the total number of bytes which were
checked via the “two of three” bitwise voting algorithm—i.e.,
the total number of bytes for which all three SAME bursts were
available.
Voting counts are not tracked for the EndOfMessage
variant.
Trait Implementations§
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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.