BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
bluetoe::link_layer::channel_map Class Reference

map that keeps track of the list of used channels and calculates the next channel based on the last used channel More...

#include <bluetoe/link_layer/include/bluetoe/channel_map.hpp>

Public Member Functions

bool reset (const std::uint8_t *map, const unsigned hop)
 sets a new list of used channels and a new hop value.
 
bool reset (const std::uint8_t *map)
 sets a new list of used channels and keeps the old hop value.
 
unsigned data_channel (unsigned index) const
 

Static Public Attributes

static constexpr unsigned max_number_of_data_channels = 37
 

Detailed Description

map that keeps track of the list of used channels and calculates the next channel based on the last used channel

Member Function Documentation

◆ data_channel()

unsigned bluetoe::link_layer::channel_map::data_channel ( unsigned  index) const

the BLE channel hop sequence is 37 entries long, after 37 hops, the sequence starts again. This function returns the entries in this sequence. The channel for the first entry is given by calling the function with index = 0, the last entry with index = max_number_of_data_channels -1

◆ reset() [1/2]

bool bluetoe::link_layer::channel_map::reset ( const std::uint8_t *  map)

sets a new list of used channels and keeps the old hop value.

Precondition
reset( const std::uint8_t* map, const unsigned hop ) must have been called before, to have an old hop value

◆ reset() [2/2]

bool bluetoe::link_layer::channel_map::reset ( const std::uint8_t *  map,
const unsigned  hop 
)

sets a new list of used channels and a new hop value.

The function returns true, if the given parameters are valid. A valid map contains at least 2 channel. A hop increment shall have a value in the range of 5 to 16.

Member Data Documentation

◆ max_number_of_data_channels

constexpr unsigned bluetoe::link_layer::channel_map::max_number_of_data_channels = 37
staticconstexpr

the number of channels, used as data channel.


The documentation for this class was generated from the following file: