[−][src]Struct rubble::phy::AdvertisingChannel
One of the three advertising channels (channel indices 37, 38 or 39).
Methods
impl AdvertisingChannel
[src]
pub fn first() -> Self
[src]
Returns the first (lowest-numbered) advertising channel.
pub fn iter_all() -> impl Iterator<Item = Self>
[src]
Returns an iterator that yields all 3 advertising channels in ascending order.
pub fn cycle(&self) -> Self
[src]
Returns the next advertising channel, or the first one if self
is the last channel.
pub fn rf_channel(&self) -> u8
[src]
Returns the RF channel corresponding to this advertising channel index.
RF channels 0, 12 and 39 are used for advertising.
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 Debug for AdvertisingChannel
[src]
impl Copy for AdvertisingChannel
[src]
impl Clone for AdvertisingChannel
[src]
fn clone(&self) -> AdvertisingChannel
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for AdvertisingChannel
impl Sync for AdvertisingChannel
Blanket Implementations
impl<T> From for T
[src]
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, 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,