1#ifndef BLUETOE_SERVICES_DIS_HPP
2#define BLUETOE_SERVICES_DIS_HPP
4#include <bluetoe/service.hpp>
5#include <bluetoe/characteristic.hpp>
14 using service_uuid = service_uuid16< 0x180A >;
16 using manufacturer_name_uuid = characteristic_uuid16< 0x2A29 >;
17 using model_number_uuid = characteristic_uuid16< 0x2A24 >;
18 using serial_number_uuid = characteristic_uuid16< 0x2A25 >;
19 using hardware_revision_uuid = characteristic_uuid16< 0x2A27 >;
20 using firmware_revision_uuid = characteristic_uuid16< 0x2A26 >;
21 using software_revision_uuid = characteristic_uuid16< 0x2A28 >;
22 using system_uuid = characteristic_uuid16< 0x2A23 >;
23 using ieee_11073_20601_regulatory_certification_data_list_uuid = characteristic_uuid16< 0x2A2A >;
24 using pnp_uuid = characteristic_uuid16< 0x2A50 >;
29 template < const
char* Manufacturer >
30 using manufacturer_name =
33 manufacturer_name_uuid
40 template < const
char* ModelNumberString >
51 template < const
char* SerialNumberString >
62 template < const
char* HardwareRevisionString >
63 using hardware_revision =
66 hardware_revision_uuid
73 template < const
char* FirmwareRevisionString >
74 using firmware_revision =
77 firmware_revision_uuid
84 template < const
char* SoftwareRevisionString >
85 using software_revision =
88 software_revision_uuid
95 template < std::u
int64_t ManufacturerIdentifier, std::u
int32_t OrganizationallyUniqueIdentifier >
103 template <
typename Value >
111 enum class vendor_id_source_t : std::uint8_t
126 template < vendor_
id_source_t VendorIDSource, std::u
int16_t VendorID, std::u
int16_t ProductID, std::u
int16_t ProductVersion >
127 struct pnp_id_value :
bluetoe::cstring_wrapper< pnp_id_value< VendorIDSource, VendorID, ProductID, ProductVersion > >
129 static constexpr std::size_t data_size = 7u;
131 static constexpr std::uint8_t data[ data_size ] = {
132 static_cast< std::uint8_t
>( VendorIDSource ),
133 static_cast< std::uint8_t
>( VendorID & 0xff ),
134 static_cast< std::uint8_t
>( VendorID >> 8 ),
135 static_cast< std::uint8_t
>( ProductID & 0xff ),
136 static_cast< std::uint8_t
>( ProductID >> 8 ),
137 static_cast< std::uint8_t
>( ProductVersion & 0xff),
138 static_cast< std::uint8_t
>( ProductVersion >> 8 )
141 static constexpr std::uint8_t
const * value()
144 static_assert( data_size ==
sizeof data,
"" );
149 static constexpr std::size_t size()
155 template < vendor_
id_source_t VendorIDSource, std::u
int16_t VendorID, std::u
int16_t ProductID, std::u
int16_t ProductVersion >
156 constexpr std::uint8_t pnp_id_value< VendorIDSource, VendorID, ProductID, ProductVersion >::data[ data_size ];
163 template < vendor_
id_source_t VendorIDSource, std::u
int16_t VendorID, std::u
int16_t ProductID, std::u
int16_t ProductVersion >
166 details::pnp_id_value< VendorIDSource, VendorID, ProductID, ProductVersion >,
185 template <
typename ... Options >
A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
Definition: characteristic.hpp:160
a service with zero or more characteristics
Definition: service.hpp:150
a constant string characteristic with the value Name
Definition: characteristic_value.hpp:487
a constant string characteristic value
Definition: characteristic_value.hpp:429