BlueToe
an alternative GATT/BLE implementation
|
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 |
map that keeps track of the list of used channels and calculates the next channel based on the last used 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
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.
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.
|
staticconstexpr |
the number of channels, used as data channel.