[−][src]Trait dw1000::ranging::Message
Implemented by all ranging messages
Associated Constants
const PRELUDE: Prelude
A prelude that identifies the message
const PRELUDE_LEN: usize
The length of the message's prelude
This is a bit of a hack that we need until slice::<impl [T]>::len
is
stable as a const fn.
const LEN: usize
The length of the whole message, including prelude and data
Provided methods
fn decode<SPI, CS>(
message: &Message
) -> Result<Option<RxMessage<Self>>, Error<SPI, CS>> where
SPI: Transfer<u8> + Write<u8>,
CS: OutputPin,
message: &Message
) -> Result<Option<RxMessage<Self>>, Error<SPI, CS>> where
SPI: Transfer<u8> + Write<u8>,
CS: OutputPin,
Decodes a received message of this type
The user is responsible for receiving a message using
DW1000::receive
. Once a message has been received, this method can
be used to check what type of message this is.
Returns Ok(None)
, if the message is not of the right type. Otherwise,
returns `Ok(Some(RxMessage