[−][src]Struct rubble::phy::DataChannel
One of 37 data channels on which data channel PDUs are sent between connected devices.
(channel indices 0..=36)
Methods
impl DataChannel
[src]
pub fn new(index: u8) -> Self
[src]
Creates a DataChannelIndex
from a raw index.
Panics
This will panic if index
is not a valid data channel index. Valid indices are 0..=36.
pub fn index(&self) -> u8
[src]
Returns the data channel index.
The returned value is always in range 0..=36.
pub fn rf_channel(&self) -> u8
[src]
Returns the RF channel corresponding to this data channel index.
RF channels 1-11 and 13-38 are used for data transmission.
pub fn freq(&self) -> u16
[src]
Returns the center frequency of this channel in MHz.
pub fn whitening_iv(&self) -> u8
[src]
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
impl Clone for DataChannel
[src]
fn clone(&self) -> DataChannel
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for DataChannel
[src]
impl Debug for DataChannel
[src]
Auto Trait Implementations
impl Send for DataChannel
impl Sync for DataChannel
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,