Struct rubble::phy::DataChannel[][src]

pub struct DataChannel(u8);
Expand description

One of 37 data channels on which data channel PDUs are sent between connected devices.

(channel indices 0..=36)

Tuple Fields

0: u8

Implementations

Creates a DataChannel from a raw index.

Panics

This will panic if index is not a valid data channel index. Valid indices are 0..=36.

Returns the data channel index.

The returned value is always in range 0..=36.

Returns the RF channel corresponding to this data channel index.

RF channels 1-11 and 13-38 are used for data transmission.

Returns the center frequency of this channel in MHz.

Calculates the initial value of the LFSR to use for data whitening.

The value is a 7-bit value. The MSb will always be 0, and the 2nd MSb always 1 (Position 0). The LSb contains Position 6. Refer to the specification for details about the bit positions.

The polynomial is always x^7 + x^4 + 1.

Whitening is applied to PDU and CRC.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Writes the defmt representation of self to fmt.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.