Struct n2k_base::n2k::N2kMessage
[−]
[src]
pub struct N2kMessage<'a> { pub header: N2kHeader, pub body: &'a [u8], }
An N2kMessage has a header and a body. The header is encoded into a 32-bit header field for a CAN-frame. The body is a sequence of up to 8 bytes. Longer messages need to be split into multiple CAN-frames with a counter at the start of each body. The life-time of an N2kMessage is coupled to the liftime of its underlying data sequence.
Fields
header: N2kHeader
body: &'a [u8]
Methods
impl<'a> N2kMessage<'a>
[src]
fn new(header: N2kHeader, body: &'a [u8]) -> N2kMessage
[src]
create an N2kMessage