BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
channel_map.hpp
1#ifndef BLUETOE_LINK_LAYER_CHANNEL_MAP_HPP
2#define BLUETOE_LINK_LAYER_CHANNEL_MAP_HPP
3
4#include <cstdint>
5
6namespace bluetoe {
7namespace link_layer {
8
13 {
14 public:
16
24 bool reset( const std::uint8_t* map, const unsigned hop );
25
31 bool reset( const std::uint8_t* map );
32
38 unsigned data_channel( unsigned index ) const;
39
43 static constexpr unsigned max_number_of_data_channels = 37;
44 private:
45 unsigned build_used_channel_map( const std::uint8_t* map, std::uint8_t* used ) const;
46
47 std::uint8_t map_[ max_number_of_data_channels ];
48 std::uint8_t hop_;
49 };
50}
51}
52#endif // include guard