This examples shows, how to define priorities for charactertic notifications and indications.
#include <bluetoe/server.hpp>
#include <bluetoe/service.hpp>
#include <bluetoe/characteristic.hpp>
#include <bluetoe/outgoing_priority.hpp>
#include <cstdint>
enum class axis {
X, Y, Z
};
template < axis X >
struct acceleration_measurement_handler
{
std::uint8_t read_sensor_value( std::size_t, std::uint8_t* out_buffer, std::size_t& out_size );
std::uint8_t temperature_alarm( std::size_t, std::uint8_t* out_buffer, std::size_t& out_size );
};
template < class UUID, axis X >
UUID,
acceleration_measurement_handler< X >,
&acceleration_measurement_handler< X >::read_sensor_value >,
>,
acceleration_measurement_handler< X >,
&acceleration_measurement_handler< X >::temperature_alarm >,
>,
>
>;
acceleration_measurement_service<
axis::X
>,
>,
acceleration_measurement_service<
axis::Y
>,
acceleration_measurement_service<
axis::Z
>
>;
int main()
{}
A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
Definition: characteristic.hpp:160
Root of the declaration of a GATT server.
Definition: server.hpp:85
a 128-Bit UUID used to identify a service.
Definition: service.hpp:57
a service with zero or more characteristics
Definition: service.hpp:150
a 128-Bit UUID used to identify a characteristic.
Definition: characteristic.hpp:62
Defines priorities of notified or indicated characteristics.
Definition: outgoing_priority.hpp:160
Definition: characteristic_value.hpp:1071
class to be mixed into the server instance
Definition: mixin.hpp:78
adds the ability to notify this characteristic.
Definition: characteristic_value.hpp:89