1#ifndef BLUETOE_APPEARANCE_HPP
2#define BLUETOE_APPEARANCE_HPP
4#include <bluetoe/meta_types.hpp>
9 struct device_appearance_meta_type {};
10 struct advertise_appearance_meta_type {};
16 template < std::u
int16_t A >
21 details::device_appearance_meta_type,
22 details::valid_server_option_meta_type {};
24 static constexpr std::uint16_t value = A;
164 details::advertise_appearance_meta_type,
165 details::valid_server_option_meta_type {};
167 template <
typename Adv >
168 static std::uint8_t* advertising_data( std::uint8_t* begin, std::uint8_t* end )
170 static constexpr std::size_t adv_data_size = 4u;
172 if ( std::size_t(end - begin) >= adv_data_size )
174 *begin =
static_cast< std::uint8_t
>( adv_data_size - 1 );
176 *begin = bits( details::gap_types::appearance );
178 begin = details::write_16bit( begin, Adv::value );
188 struct no_advertise_appearance
191 details::advertise_appearance_meta_type,
192 details::valid_server_option_meta_type {};
194 template <
typename >
195 static std::uint8_t* advertising_data( std::uint8_t* begin, std::uint8_t* )
add the appearance of the device to the advertising data
Definition: appearance.hpp:161
enumeration of appearances (org.bluetooth.characteristic.gap.appearance)
Definition: appearance.hpp:52
type to keep a bluetoe::appearance value
Definition: appearance.hpp:18