dot15d4_frame

Struct TschTimeslotTimings

Source
pub struct TschTimeslotTimings { /* private fields */ }
Expand description

A TSCH time slot timings (figure 6-30 in IEEE 802.15.4-2020).

If the time slot ID is 0, the default timings are used.

+----+------------+-----+-----------+-----------+--------------+--------------+---------+----------+-------+---------+--------+------------------+
| ID | CCA offset | CCA | TX offset | RX offset | RX ACK delay | TX ACK delay | RX wait | ACK wait | RX/TX | Max ACK | Max TX | Time slot length |
+----+------------+-----+-----------+-----------+--------------+--------------+---------+----------+-------+---------+--------+------------------+

Implementations§

Source§

impl TschTimeslotTimings

Source

pub const DEFAULT_GUARD_TIME: Duration = _

The default guard time (2200us) in microseconds.

Source

pub fn new(id: u8, guard_time: Duration) -> Self

Create a new set of time slot timings.

Source

pub const fn cca_offset(&self) -> Duration

Return the CCA offset in microseconds.

Source

pub fn set_cca_offset(&mut self, cca_offset: Duration)

Set the CCA offset in microseconds.

Source

pub const fn cca(&self) -> Duration

Return the CCA duration in microseconds.

Source

pub fn set_cca(&mut self, cca: Duration)

Set the CCA duration in microseconds.

Source

pub const fn tx_offset(&self) -> Duration

Return the TX offset in microseconds.

Source

pub fn set_tx_offset(&mut self, tx_offset: Duration)

Set the TX offset in microseconds.

Source

pub const fn rx_offset(&self) -> Duration

Return the RX offset in microseconds.

Source

pub fn set_rx_offset(&mut self, rx_offset: Duration)

Set the RX offset in microseconds.

Source

pub const fn rx_ack_delay(&self) -> Duration

Return the RX ACK delay in microseconds.

Source

pub fn set_rx_ack_delay(&mut self, rx_ack_delay: Duration)

Set the RX ACK delay in microseconds.

Source

pub const fn tx_ack_delay(&self) -> Duration

Return the TX ACK delay in microseconds.

Source

pub fn set_tx_ack_delay(&mut self, tx_ack_delay: Duration)

Set the TX ACK delay in microseconds.

Source

pub const fn rx_wait(&self) -> Duration

Return the RX wait in microseconds.

Source

pub fn set_rx_wait(&mut self, rx_wait: Duration)

Set the RX wait in microseconds.

Source

pub const fn ack_wait(&self) -> Duration

Return the ACK wait in microseconds.

Source

pub fn set_ack_wait(&mut self, ack_wait: Duration)

Set the ACK wait in microseconds.

Source

pub const fn rx_tx(&self) -> Duration

Return the RX/TX in microseconds.

Source

pub fn set_rx_tx(&mut self, rx_tx: Duration)

Set the RX/TX in microseconds.

Source

pub const fn max_ack(&self) -> Duration

Return the maximum ACK in microseconds.

Source

pub fn set_max_ack(&mut self, max_ack: Duration)

Set the maximum ACK in microseconds.

Source

pub const fn max_tx(&self) -> Duration

Return the maximum TX in microseconds.

Source

pub fn set_max_tx(&mut self, max_tx: Duration)

Set the maximum TX in microseconds.

Source

pub const fn time_slot_length(&self) -> Duration

Return the time slot length in microseconds.

Source

pub fn set_time_slot_length(&mut self, time_slot_length: Duration)

Set the time slot length in microseconds.

Source

pub fn emit(&self, buffer: &mut [u8])

Emit the time slot timings into a buffer.

Trait Implementations§

Source§

impl Debug for TschTimeslotTimings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TschTimeslotTimings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for TschTimeslotTimings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.