pub enum MessageFrameType {
GlobalAddressed,
DatagramOnly,
DatagramFirst,
DatagramMiddle,
DatagramFinal,
Stream,
Reserved(u8),
}Expand description
OpenLCB message frame types (bits 26-24 when bit 27 is set).
| Bits 26-24 | Variant | Variable field (bits 23-12) |
|---|---|---|
| 0 | Reserved(0) | — |
| 1 | GlobalAddressed | CAN-MTI |
| 2 | DatagramOnly | destination alias |
| 3 | DatagramFirst | destination alias |
| 4 | DatagramMiddle | destination alias |
| 5 | DatagramFinal | destination alias |
| 6 | Reserved(6) | — |
| 7 | Stream | destination alias |
Datagrams (up to 72 bytes, Datagram Transport Standard) are split into
8-byte chunks: a datagram that fits in one frame is sent as
DatagramOnly; longer ones as DatagramFirst, zero or more
DatagramMiddle, then DatagramFinal. Unlike addressed messages, the
whole 8 data bytes are payload because the destination is in the header.
In this crate only the datagram kinds appear inside
CanHeader::Datagram; global/addressed and stream frames have their
own CanHeader variants.
Variants§
GlobalAddressed
Global or addressed message; the variable field holds the CAN-MTI.
DatagramOnly
Frame type 2: a complete datagram in a single frame (0-8 bytes).
DatagramFirst
Frame type 3: first frame of a multi-frame datagram.
DatagramMiddle
Frame type 4: a middle frame of a multi-frame datagram.
DatagramFinal
Frame type 5: the last frame of a multi-frame datagram.
Stream
Frame type 7: stream data (Stream Transport Standard).
Reserved(u8)
Frame types 0 and 6, reserved by the standard. Holds the raw value.