MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / from_slice

Method from_slice

lrwn/src/maccommand.rs:419–423  ·  view source on GitHub ↗
(b: &[u8])

Source from the content-addressed store, hash-verified

417 }
418
419 pub fn from_slice(b: &[u8]) -> Self {
420 // For LoRaWAN 1.1, this payload must be first decrypted before it can be parsed.
421 // Therefore, the decoding into separate mac-commands is handled by decode_from_raw.
422 MACCommandSet(vec![MACCommand::Raw(b.to_vec())])
423 }
424
425 pub fn push(&mut self, m: MACCommand) {
426 self.0.push(m);

Callers

nothing calls this directly

Calls 1

MACCommandSetClass · 0.85

Tested by

no test coverage detected