pub struct EventId(pub u64);Expand description
A 64-bit event identifier, e.g. 05.01.01.01.22.00.00.10.
The inner value is public; EventId(0x0501_0101_2200_0010) is as good
as parsing. Display/FromStr use eight dotted hex bytes (separators
optional, as for NodeId); with the serde feature
the ID (de)serializes as that string. On the wire it is eight big-endian
bytes, which fill a whole CAN frame.
Tuple Fields§
§0: u64Implementations§
Source§impl EventId
impl EventId
Sourcepub const EMERGENCY_OFF: EventId
pub const EMERGENCY_OFF: EventId
Well-known: Emergency Off (de-energize).
Sourcepub const CLEAR_EMERGENCY_OFF: EventId
pub const CLEAR_EMERGENCY_OFF: EventId
Well-known: Clear Emergency Off.
Sourcepub const EMERGENCY_STOP: EventId
pub const EMERGENCY_STOP: EventId
Well-known: Emergency Stop of all operations.
Sourcepub const CLEAR_EMERGENCY_STOP: EventId
pub const CLEAR_EMERGENCY_STOP: EventId
Well-known: Clear Emergency Stop.
Sourcepub const DUPLICATE_NODE_ID: EventId
pub const DUPLICATE_NODE_ID: EventId
Well-known: a node detected another node using its Node ID
(01.01.00.00.00.00.02.01). Node produces this once,
as a PCER, when it first detects a duplicate.
Sourcepub fn from_bytes(b: &[u8]) -> Result<Self, ParseError>
pub fn from_bytes(b: &[u8]) -> Result<Self, ParseError>
Read an Event ID from the first eight big-endian bytes of b.
Extra trailing bytes are ignored.
§Errors
ParseError::Length if b is shorter than eight bytes.
Trait Implementations§
impl Copy for EventId
Source§impl<'de> Deserialize<'de> for EventId
Available on crate feature serde only.
impl<'de> Deserialize<'de> for EventId
serde only.