[][src]Struct dw1000::ranging::TxMessage

pub struct TxMessage<T: Message> {
    pub recipient: Address,
    pub tx_time: Instant,
    pub payload: T,
}

An outgoing ranging message

Contains the payload to be sent, as well as some metadata.

Fields

recipient: Address

The recipient of the message

This is an IEEE 802.15.4 MAC address. This could be a broadcast address, for messages that are sent to all other nodes in range.

tx_time: Instant

The time this message is going to be sent

When creating this struct, this is going to be an instant in the near future. When sending the message, the sending is delayed to make sure it it sent at exactly this instant.

payload: T

The actual message payload

Methods

impl<T> TxMessage<T> where
    T: Message
[src]

pub fn send<'r, SPI, CS>(
    &self,
    dw1000: DW1000<SPI, CS, Ready>
) -> Result<DW1000<SPI, CS, Sending>, Error<SPI, CS>> where
    SPI: Transfer<u8> + Write<u8>,
    CS: OutputPin
[src]

Send this message via the DW1000

Serializes the message payload and uses DW1000::send internally to send it.

Trait Implementations

impl<T: Debug + Message> Debug for TxMessage<T>[src]

Auto Trait Implementations

impl<T> Send for TxMessage<T> where
    T: Send

impl<T> Sync for TxMessage<T> where
    T: Sync

impl<T> Unpin for TxMessage<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.