Coverage for src / bluetooth_sig / types / gatt_enums.py: 100%

606 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 20:14 +0000

1"""Core GATT enumerations for strong typing. 

2 

3Defines enums for GATT properties, value types, characteristic names, 

4and other core BLE concepts to replace string usage with type-safe 

5alternatives. 

6""" 

7 

8from __future__ import annotations 

9 

10import logging 

11from enum import Enum, IntEnum, IntFlag 

12 

13logger = logging.getLogger(__name__) 

14 

15 

16class DayOfWeek(IntEnum): 

17 """Day of week enumeration per ISO 8601. 

18 

19 Used by Current Time Service and other time-related characteristics. 

20 Values follow ISO 8601 standard (Monday=1, Sunday=7, Unknown=0). 

21 """ 

22 

23 UNKNOWN = 0 

24 MONDAY = 1 

25 TUESDAY = 2 

26 WEDNESDAY = 3 

27 THURSDAY = 4 

28 FRIDAY = 5 

29 SATURDAY = 6 

30 SUNDAY = 7 

31 

32 

33class AdjustReason(IntFlag): 

34 """Time adjustment reason flags. 

35 

36 Used by Current Time Service to indicate why time was adjusted. 

37 Can be combined as bitfield flags. 

38 """ 

39 

40 MANUAL_TIME_UPDATE = 1 << 0 # Bit 0 

41 EXTERNAL_REFERENCE_TIME_UPDATE = 1 << 1 # Bit 1 

42 CHANGE_OF_TIME_ZONE = 1 << 2 # Bit 2 

43 CHANGE_OF_DST = 1 << 3 # Bit 3 

44 # Bits 4-7: Reserved for future use 

45 

46 @classmethod 

47 def from_raw(cls, value: int) -> AdjustReason: 

48 """Create AdjustReason from raw byte value, masking reserved bits.""" 

49 if value & 0xF0: 

50 logger.warning("AdjustReason: Reserved bits set in raw value %d, masking to valid bits only", value) 

51 # Only bits 0-3 are defined, mask out bits 4-7 for forward compatibility 

52 masked_value = value & 0x0F 

53 return cls(masked_value) 

54 

55 

56class GattProperty(Enum): 

57 """GATT characteristic properties defined by Bluetooth SIG.""" 

58 

59 BROADCAST = "broadcast" 

60 READ = "read" 

61 WRITE_WITHOUT_RESPONSE = "write-without-response" 

62 WRITE = "write" 

63 NOTIFY = "notify" 

64 INDICATE = "indicate" 

65 AUTHENTICATED_SIGNED_WRITES = "authenticated-signed-writes" 

66 EXTENDED_PROPERTIES = "extended-properties" 

67 RELIABLE_WRITE = "reliable-write" 

68 WRITABLE_AUXILIARIES = "writable-auxiliaries" 

69 # Encryption and authentication properties 

70 ENCRYPT_READ = "encrypt-read" 

71 ENCRYPT_WRITE = "encrypt-write" 

72 ENCRYPT_NOTIFY = "encrypt-notify" 

73 AUTH_READ = "auth-read" 

74 AUTH_WRITE = "auth-write" 

75 AUTH_NOTIFY = "auth-notify" 

76 

77 

78class ValueType(Enum): 

79 """Data types for characteristic values.""" 

80 

81 STRING = "string" 

82 INT = "int" 

83 FLOAT = "float" 

84 BYTES = "bytes" 

85 BITFIELD = "bitfield" 

86 BOOL = "bool" 

87 DATETIME = "datetime" 

88 UUID = "uuid" 

89 DICT = "dict" 

90 VARIOUS = "various" 

91 UNKNOWN = "unknown" 

92 

93 

94class DataType(Enum): 

95 """Bluetooth SIG data types from GATT specifications.""" 

96 

97 BOOLEAN = "boolean" 

98 UINT8 = "uint8" 

99 UINT16 = "uint16" 

100 UINT24 = "uint24" 

101 UINT32 = "uint32" 

102 UINT64 = "uint64" 

103 SINT8 = "sint8" 

104 SINT16 = "sint16" 

105 SINT24 = "sint24" 

106 SINT32 = "sint32" 

107 SINT64 = "sint64" 

108 FLOAT32 = "float32" 

109 FLOAT64 = "float64" 

110 UTF8S = "utf8s" 

111 UTF16S = "utf16s" 

112 STRUCT = "struct" 

113 MEDFLOAT16 = "medfloat16" 

114 MEDFLOAT32 = "medfloat32" 

115 VARIOUS = "various" 

116 UNKNOWN = "unknown" 

117 

118 @classmethod 

119 def from_string(cls, type_str: str | None) -> DataType: 

120 """Convert string representation to DataType enum. 

121 

122 Args: 

123 type_str: String representation of data type (case-insensitive) 

124 

125 Returns: 

126 Corresponding DataType enum, or DataType.UNKNOWN if not found 

127 """ 

128 if not type_str: 

129 return cls.UNKNOWN 

130 

131 # Handle common aliases 

132 type_str = type_str.lower() 

133 aliases = { 

134 "utf16s": cls.UTF16S, # UTF-16 string support 

135 "sfloat": cls.MEDFLOAT16, # IEEE-11073 16-bit SFLOAT 

136 "float": cls.FLOAT32, # IEEE-11073 32-bit FLOAT 

137 "variable": cls.STRUCT, # variable maps to STRUCT 

138 } 

139 

140 if type_str in aliases: 

141 return aliases[type_str] 

142 

143 # Try direct match 

144 for member in cls: 

145 if member.value == type_str: 

146 return member 

147 

148 return cls.UNKNOWN 

149 

150 def to_value_type(self) -> ValueType: 

151 """Convert DataType to internal ValueType enum. 

152 

153 Returns: 

154 Corresponding ValueType for this data type 

155 """ 

156 mapping = { 

157 # Integer types 

158 self.SINT8: ValueType.INT, 

159 self.UINT8: ValueType.INT, 

160 self.SINT16: ValueType.INT, 

161 self.UINT16: ValueType.INT, 

162 self.SINT24: ValueType.INT, 

163 self.UINT24: ValueType.INT, 

164 self.SINT32: ValueType.INT, 

165 self.UINT32: ValueType.INT, 

166 self.UINT64: ValueType.INT, 

167 self.SINT64: ValueType.INT, 

168 # Float types 

169 self.FLOAT32: ValueType.FLOAT, 

170 self.FLOAT64: ValueType.FLOAT, 

171 self.MEDFLOAT16: ValueType.FLOAT, 

172 self.MEDFLOAT32: ValueType.FLOAT, 

173 # String types 

174 self.UTF8S: ValueType.STRING, 

175 self.UTF16S: ValueType.STRING, 

176 # Boolean type 

177 self.BOOLEAN: ValueType.BOOL, 

178 # Struct/opaque data 

179 self.STRUCT: ValueType.BYTES, 

180 # Meta types 

181 self.VARIOUS: ValueType.VARIOUS, 

182 self.UNKNOWN: ValueType.UNKNOWN, 

183 } 

184 return mapping.get(self, ValueType.UNKNOWN) 

185 

186 def to_python_type(self) -> str: 

187 """Convert DataType to Python type string. 

188 

189 Returns: 

190 Corresponding Python type string 

191 """ 

192 mapping = { 

193 # Integer types 

194 self.UINT8: "int", 

195 self.UINT16: "int", 

196 self.UINT24: "int", 

197 self.UINT32: "int", 

198 self.UINT64: "int", 

199 self.SINT8: "int", 

200 self.SINT16: "int", 

201 self.SINT24: "int", 

202 self.SINT32: "int", 

203 self.SINT64: "int", 

204 # Float types 

205 self.FLOAT32: "float", 

206 self.FLOAT64: "float", 

207 self.MEDFLOAT16: "float", 

208 self.MEDFLOAT32: "float", 

209 # String types 

210 self.UTF8S: "string", 

211 self.UTF16S: "string", 

212 # Boolean type 

213 self.BOOLEAN: "boolean", 

214 # Struct/opaque data 

215 self.STRUCT: "bytes", 

216 # Meta types 

217 self.VARIOUS: "various", 

218 self.UNKNOWN: "unknown", 

219 } 

220 return mapping.get(self, "bytes") 

221 

222 

223class CharacteristicName(Enum): 

224 """Enumeration of all supported GATT characteristic names.""" 

225 

226 BATTERY_LEVEL = "Battery Level" 

227 BATTERY_LEVEL_STATUS = "Battery Level Status" 

228 TEMPERATURE = "Temperature" 

229 TEMPERATURE_MEASUREMENT = "Temperature Measurement" 

230 HUMIDITY = "Humidity" 

231 PRESSURE = "Pressure" 

232 UV_INDEX = "UV Index" 

233 ILLUMINANCE = "Illuminance" 

234 POWER_SPECIFICATION = "Power Specification" 

235 HEART_RATE_MEASUREMENT = "Heart Rate Measurement" 

236 BLOOD_PRESSURE_MEASUREMENT = "Blood Pressure Measurement" 

237 INTERMEDIATE_CUFF_PRESSURE = "Intermediate Cuff Pressure" 

238 BLOOD_PRESSURE_FEATURE = "Blood Pressure Feature" 

239 CSC_MEASUREMENT = "CSC Measurement" 

240 CSC_FEATURE = "CSC Feature" 

241 RSC_MEASUREMENT = "RSC Measurement" 

242 RSC_FEATURE = "RSC Feature" 

243 CYCLING_POWER_MEASUREMENT = "Cycling Power Measurement" 

244 CYCLING_POWER_FEATURE = "Cycling Power Feature" 

245 CYCLING_POWER_VECTOR = "Cycling Power Vector" 

246 CYCLING_POWER_CONTROL_POINT = "Cycling Power Control Point" 

247 GLUCOSE_MEASUREMENT = "Glucose Measurement" 

248 GLUCOSE_MEASUREMENT_CONTEXT = "Glucose Measurement Context" 

249 GLUCOSE_FEATURE = "Glucose Feature" 

250 MANUFACTURER_NAME_STRING = "Manufacturer Name String" 

251 MODEL_NUMBER_STRING = "Model Number String" 

252 SERIAL_NUMBER_STRING = "Serial Number String" 

253 FIRMWARE_REVISION_STRING = "Firmware Revision String" 

254 HARDWARE_REVISION_STRING = "Hardware Revision String" 

255 SOFTWARE_REVISION_STRING = "Software Revision String" 

256 DEVICE_NAME = "Device Name" 

257 APPEARANCE = "Appearance" 

258 WEIGHT_MEASUREMENT = "Weight Measurement" 

259 WEIGHT_SCALE_FEATURE = "Weight Scale Feature" 

260 BODY_COMPOSITION_MEASUREMENT = "Body Composition Measurement" 

261 BODY_COMPOSITION_FEATURE = "Body Composition Feature" 

262 BODY_SENSOR_LOCATION = "Body Sensor Location" 

263 # Environmental characteristics 

264 DEW_POINT = "Dew Point" 

265 HEAT_INDEX = "Heat Index" 

266 WIND_CHILL = "Wind Chill" 

267 TRUE_WIND_SPEED = "True Wind Speed" 

268 TRUE_WIND_DIRECTION = "True Wind Direction" 

269 APPARENT_WIND_SPEED = "Apparent Wind Speed" 

270 APPARENT_WIND_DIRECTION = "Apparent Wind Direction" 

271 MAGNETIC_DECLINATION = "Magnetic Declination" 

272 ELEVATION = "Elevation" 

273 MAGNETIC_FLUX_DENSITY_2D = "Magnetic Flux Density - 2D" 

274 MAGNETIC_FLUX_DENSITY_3D = "Magnetic Flux Density - 3D" 

275 BAROMETRIC_PRESSURE_TREND = "Barometric Pressure Trend" 

276 POLLEN_CONCENTRATION = "Pollen Concentration" 

277 RAINFALL = "Rainfall" 

278 TIME_ZONE = "Time Zone" 

279 LOCAL_TIME_INFORMATION = "Local Time Information" 

280 # Gas sensor characteristics 

281 AMMONIA_CONCENTRATION = "Ammonia Concentration" 

282 CO2_CONCENTRATION = r"CO\textsubscript{2} Concentration" 

283 METHANE_CONCENTRATION = "Methane Concentration" 

284 NITROGEN_DIOXIDE_CONCENTRATION = "Nitrogen Dioxide Concentration" 

285 NON_METHANE_VOC_CONCENTRATION = "Non-Methane Volatile Organic Compounds Concentration" 

286 OZONE_CONCENTRATION = "Ozone Concentration" 

287 PM1_CONCENTRATION = "Particulate Matter - PM1 Concentration" 

288 PM10_CONCENTRATION = "Particulate Matter - PM10 Concentration" 

289 PM25_CONCENTRATION = "Particulate Matter - PM2.5 Concentration" 

290 SULFUR_DIOXIDE_CONCENTRATION = "Sulfur Dioxide Concentration" 

291 VOC_CONCENTRATION = "VOC Concentration" 

292 # Power characteristics 

293 ELECTRIC_CURRENT = "Electric Current" 

294 ELECTRIC_CURRENT_RANGE = "Electric Current Range" 

295 ELECTRIC_CURRENT_SPECIFICATION = "Electric Current Specification" 

296 ELECTRIC_CURRENT_STATISTICS = "Electric Current Statistics" 

297 VOLTAGE = "Voltage" 

298 VOLTAGE_FREQUENCY = "Voltage Frequency" 

299 VOLTAGE_SPECIFICATION = "Voltage Specification" 

300 VOLTAGE_STATISTICS = "Voltage Statistics" 

301 HIGH_VOLTAGE = "High Voltage" 

302 AVERAGE_CURRENT = "Average Current" 

303 AVERAGE_VOLTAGE = "Average Voltage" 

304 SUPPORTED_POWER_RANGE = "Supported Power Range" 

305 # Audio characteristics 

306 NOISE = "Noise" 

307 # Pulse oximetry 

308 PLX_CONTINUOUS_MEASUREMENT = "PLX Continuous Measurement" 

309 PLX_SPOT_CHECK_MEASUREMENT = "PLX Spot-Check Measurement" 

310 PLX_FEATURES = "PLX Features" 

311 LOCATION_AND_SPEED = "Location and Speed" 

312 NAVIGATION = "Navigation" 

313 POSITION_QUALITY = "Position Quality" 

314 LN_FEATURE = "LN Feature" 

315 LN_CONTROL_POINT = "LN Control Point" 

316 SERVICE_CHANGED = "Service Changed" 

317 ALERT_LEVEL = "Alert Level" 

318 ALERT_CATEGORY_ID_BIT_MASK = "Alert Category ID Bit Mask" 

319 ALERT_CATEGORY_ID = "Alert Category ID" 

320 ALERT_STATUS = "Alert Status" 

321 RINGER_SETTING = "Ringer Setting" 

322 RINGER_CONTROL_POINT = "Ringer Control Point" 

323 # Alert Notification Service characteristics 

324 NEW_ALERT = "New Alert" 

325 SUPPORTED_NEW_ALERT_CATEGORY = "Supported New Alert Category" 

326 UNREAD_ALERT_STATUS = "Unread Alert Status" 

327 SUPPORTED_UNREAD_ALERT_CATEGORY = "Supported Unread Alert Category" 

328 ALERT_NOTIFICATION_CONTROL_POINT = "Alert Notification Control Point" 

329 # Time characteristics 

330 CURRENT_TIME = "Current Time" 

331 REFERENCE_TIME_INFORMATION = "Reference Time Information" 

332 TIME_WITH_DST = "Time with DST" 

333 TIME_UPDATE_CONTROL_POINT = "Time Update Control Point" 

334 TIME_UPDATE_STATE = "Time Update State" 

335 # Power level 

336 TX_POWER_LEVEL = "Tx Power Level" 

337 SCAN_INTERVAL_WINDOW = "Scan Interval Window" 

338 BOND_MANAGEMENT_FEATURE = "Bond Management Feature" 

339 BOND_MANAGEMENT_CONTROL_POINT = "Bond Management Control Point" 

340 # Indoor positioning characteristics 

341 INDOOR_POSITIONING_CONFIGURATION = "Indoor Positioning Configuration" 

342 LATITUDE = "Latitude" 

343 LONGITUDE = "Longitude" 

344 FLOOR_NUMBER = "Floor Number" 

345 LOCATION_NAME = "Location Name" 

346 HID_INFORMATION = "HID Information" 

347 REPORT_MAP = "Report Map" 

348 HID_CONTROL_POINT = "HID Control Point" 

349 REPORT = "Report" 

350 PROTOCOL_MODE = "Protocol Mode" 

351 FITNESS_MACHINE_FEATURE = "Fitness Machine Feature" 

352 TREADMILL_DATA = "Treadmill Data" 

353 CROSS_TRAINER_DATA = "Cross Trainer Data" 

354 STEP_CLIMBER_DATA = "Step Climber Data" 

355 STAIR_CLIMBER_DATA = "Stair Climber Data" 

356 ROWER_DATA = "Rower Data" 

357 INDOOR_BIKE_DATA = "Indoor Bike Data" 

358 TRAINING_STATUS = "Training Status" 

359 SUPPORTED_SPEED_RANGE = "Supported Speed Range" 

360 SUPPORTED_INCLINATION_RANGE = "Supported Inclination Range" 

361 SUPPORTED_RESISTANCE_LEVEL_RANGE = "Supported Resistance Level Range" 

362 SUPPORTED_HEART_RATE_RANGE = "Supported Heart Rate Range" 

363 FITNESS_MACHINE_CONTROL_POINT = "Fitness Machine Control Point" 

364 FITNESS_MACHINE_STATUS = "Fitness Machine Status" 

365 # User Data Service characteristics 

366 ACTIVITY_GOAL = "Activity Goal" 

367 AEROBIC_HEART_RATE_LOWER_LIMIT = "Aerobic Heart Rate Lower Limit" 

368 AEROBIC_HEART_RATE_UPPER_LIMIT = "Aerobic Heart Rate Upper Limit" 

369 AEROBIC_THRESHOLD = "Aerobic Threshold" 

370 AGE = "Age" 

371 ANAEROBIC_HEART_RATE_LOWER_LIMIT = "Anaerobic Heart Rate Lower Limit" 

372 ANAEROBIC_HEART_RATE_UPPER_LIMIT = "Anaerobic Heart Rate Upper Limit" 

373 ANAEROBIC_THRESHOLD = "Anaerobic Threshold" 

374 CALORIC_INTAKE = "Caloric Intake" 

375 DATE_OF_BIRTH = "Date of Birth" 

376 DATE_OF_THRESHOLD_ASSESSMENT = "Date of Threshold Assessment" 

377 DEVICE_WEARING_POSITION = "Device Wearing Position" 

378 EMAIL_ADDRESS = "Email Address" 

379 FAT_BURN_HEART_RATE_LOWER_LIMIT = "Fat Burn Heart Rate Lower Limit" 

380 FAT_BURN_HEART_RATE_UPPER_LIMIT = "Fat Burn Heart Rate Upper Limit" 

381 FIRST_NAME = "First Name" 

382 FIVE_ZONE_HEART_RATE_LIMITS = "Five Zone Heart Rate Limits" 

383 FOUR_ZONE_HEART_RATE_LIMITS = "Four Zone Heart Rate Limits" 

384 GENDER = "Gender" 

385 HANDEDNESS = "Handedness" 

386 HEART_RATE_MAX = "Heart Rate Max" 

387 HEIGHT = "Height" 

388 HIGH_INTENSITY_EXERCISE_THRESHOLD = "High Intensity Exercise Threshold" 

389 HIGH_RESOLUTION_HEIGHT = "High Resolution Height" 

390 HIP_CIRCUMFERENCE = "Hip Circumference" 

391 LANGUAGE = "Language" 

392 LAST_NAME = "Last Name" 

393 MAXIMUM_RECOMMENDED_HEART_RATE = "Maximum Recommended Heart Rate" 

394 MIDDLE_NAME = "Middle Name" 

395 PREFERRED_UNITS = "Preferred Units" 

396 RESTING_HEART_RATE = "Resting Heart Rate" 

397 SEDENTARY_INTERVAL_NOTIFICATION = "Sedentary Interval Notification" 

398 SPORT_TYPE_FOR_AEROBIC_AND_ANAEROBIC_THRESHOLDS = "Sport Type for Aerobic and Anaerobic Thresholds" 

399 STRIDE_LENGTH = "Stride Length" 

400 THREE_ZONE_HEART_RATE_LIMITS = "Three Zone Heart Rate Limits" 

401 TWO_ZONE_HEART_RATE_LIMITS = "Two Zone Heart Rate Limits" 

402 VO2_MAX = "VO2 Max" 

403 WAIST_CIRCUMFERENCE = "Waist Circumference" 

404 WEIGHT = "Weight" 

405 

406 # Not implemented characteristics - listed for completeness 

407 ACS_CONTROL_POINT = "ACS Control Point" 

408 ACS_DATA_IN = "ACS Data In" 

409 ACS_DATA_OUT_INDICATE = "ACS Data Out Indicate" 

410 ACS_DATA_OUT_NOTIFY = "ACS Data Out Notify" 

411 ACS_STATUS = "ACS Status" 

412 AP_SYNC_KEY_MATERIAL = "AP Sync Key Material" 

413 ASE_CONTROL_POINT = "ASE Control Point" 

414 ACCELERATION = "Acceleration" 

415 ACCELERATION_3D = "Acceleration 3D" 

416 ACCELERATION_DETECTION_STATUS = "Acceleration Detection Status" 

417 ACTIVE_PRESET_INDEX = "Active Preset Index" 

418 ADVERTISING_CONSTANT_TONE_EXTENSION_INTERVAL = "Advertising Constant Tone Extension Interval" 

419 ADVERTISING_CONSTANT_TONE_EXTENSION_MINIMUM_LENGTH = "Advertising Constant Tone Extension Minimum Length" 

420 ADVERTISING_CONSTANT_TONE_EXTENSION_MINIMUM_TRANSMIT_COUNT = ( 

421 "Advertising Constant Tone Extension Minimum Transmit Count" 

422 ) 

423 ADVERTISING_CONSTANT_TONE_EXTENSION_PHY = "Advertising Constant Tone Extension PHY" 

424 ADVERTISING_CONSTANT_TONE_EXTENSION_TRANSMIT_DURATION = "Advertising Constant Tone Extension Transmit Duration" 

425 AGGREGATE = "Aggregate" 

426 ALTITUDE = "Altitude" 

427 APPARENT_ENERGY_32 = "Apparent Energy 32" 

428 APPARENT_POWER = "Apparent Power" 

429 AUDIO_INPUT_CONTROL_POINT = "Audio Input Control Point" 

430 AUDIO_INPUT_DESCRIPTION = "Audio Input Description" 

431 AUDIO_INPUT_STATE = "Audio Input State" 

432 AUDIO_INPUT_STATUS = "Audio Input Status" 

433 AUDIO_INPUT_TYPE = "Audio Input Type" 

434 AUDIO_LOCATION = "Audio Location" 

435 AUDIO_OUTPUT_DESCRIPTION = "Audio Output Description" 

436 AVAILABLE_AUDIO_CONTEXTS = "Available Audio Contexts" 

437 BGR_FEATURES = "BGR Features" 

438 BGS_FEATURES = "BGS Features" 

439 BR_EDR_HANDOVER_DATA = "BR-EDR Handover Data" 

440 BSS_CONTROL_POINT = "BSS Control Point" 

441 BSS_RESPONSE = "BSS Response" 

442 BATTERY_CRITICAL_STATUS = "Battery Critical Status" 

443 BATTERY_ENERGY_STATUS = "Battery Energy Status" 

444 BATTERY_HEALTH_INFORMATION = "Battery Health Information" 

445 BATTERY_HEALTH_STATUS = "Battery Health Status" 

446 BATTERY_INFORMATION = "Battery Information" 

447 BATTERY_TIME_STATUS = "Battery Time Status" 

448 BEARER_LIST_CURRENT_CALLS = "Bearer List Current Calls" 

449 BEARER_PROVIDER_NAME = "Bearer Provider Name" 

450 BEARER_SIGNAL_STRENGTH = "Bearer Signal Strength" 

451 BEARER_SIGNAL_STRENGTH_REPORTING_INTERVAL = "Bearer Signal Strength Reporting Interval" 

452 BEARER_TECHNOLOGY = "Bearer Technology" 

453 BEARER_UCI = "Bearer UCI" 

454 BEARER_URI_SCHEMES_SUPPORTED_LIST = "Bearer URI Schemes Supported List" 

455 BLOOD_PRESSURE_RECORD = "Blood Pressure Record" 

456 BLUETOOTH_SIG_DATA = "Bluetooth SIG Data" 

457 BOOLEAN = "Boolean" 

458 BOOT_KEYBOARD_INPUT_REPORT = "Boot Keyboard Input Report" 

459 BOOT_KEYBOARD_OUTPUT_REPORT = "Boot Keyboard Output Report" 

460 BOOT_MOUSE_INPUT_REPORT = "Boot Mouse Input Report" 

461 BROADCAST_AUDIO_SCAN_CONTROL_POINT = "Broadcast Audio Scan Control Point" 

462 BROADCAST_RECEIVE_STATE = "Broadcast Receive State" 

463 CGM_FEATURE = "CGM Feature" 

464 CGM_MEASUREMENT = "CGM Measurement" 

465 CGM_SESSION_RUN_TIME = "CGM Session Run Time" 

466 CGM_SESSION_START_TIME = "CGM Session Start Time" 

467 CGM_SPECIFIC_OPS_CONTROL_POINT = "CGM Specific Ops Control Point" 

468 CGM_STATUS = "CGM Status" 

469 CIE_13_3_1995_COLOR_RENDERING_INDEX = "CIE 13.3-1995 Color Rendering Index" 

470 CALL_CONTROL_POINT = "Call Control Point" 

471 CALL_CONTROL_POINT_OPTIONAL_OPCODES = "Call Control Point Optional Opcodes" 

472 CALL_FRIENDLY_NAME = "Call Friendly Name" 

473 CALL_STATE = "Call State" 

474 CARBON_MONOXIDE_CONCENTRATION = "Carbon Monoxide Concentration" 

475 CARDIORESPIRATORY_ACTIVITY_INSTANTANEOUS_DATA = "CardioRespiratory Activity Instantaneous Data" 

476 CARDIORESPIRATORY_ACTIVITY_SUMMARY_DATA = "CardioRespiratory Activity Summary Data" 

477 CENTRAL_ADDRESS_RESOLUTION = "Central Address Resolution" 

478 CHROMATIC_DISTANCE_FROM_PLANCKIAN = "Chromatic Distance from Planckian" 

479 CHROMATICITY_COORDINATE = "Chromaticity Coordinate" 

480 CHROMATICITY_COORDINATES = "Chromaticity Coordinates" 

481 CHROMATICITY_TOLERANCE = "Chromaticity Tolerance" 

482 CHROMATICITY_IN_CCT_AND_DUV_VALUES = "Chromaticity in CCT and Duv Values" 

483 CLIENT_SUPPORTED_FEATURES = "Client Supported Features" 

484 COEFFICIENT = "Coefficient" 

485 CONSTANT_TONE_EXTENSION_ENABLE = "Constant Tone Extension Enable" 

486 CONTACT_STATUS_8 = "Contact Status 8" 

487 CONTENT_CONTROL_ID = "Content Control ID" 

488 COORDINATED_SET_SIZE = "Coordinated Set Size" 

489 CORRELATED_COLOR_TEMPERATURE = "Correlated Color Temperature" 

490 COSINE_OF_THE_ANGLE = "Cosine of the Angle" 

491 COUNT_16 = "Count 16" 

492 COUNT_24 = "Count 24" 

493 COUNTRY_CODE = "Country Code" 

494 CURRENT_ELAPSED_TIME = "Current Elapsed Time" 

495 CURRENT_GROUP_OBJECT_ID = "Current Group Object ID" 

496 CURRENT_TRACK_OBJECT_ID = "Current Track Object ID" 

497 CURRENT_TRACK_SEGMENTS_OBJECT_ID = "Current Track Segments Object ID" 

498 DST_OFFSET = "DST Offset" 

499 DATABASE_CHANGE_INCREMENT = "Database Change Increment" 

500 DATABASE_HASH = "Database Hash" 

501 DATE_TIME = "Date Time" 

502 DATE_UTC = "Date UTC" 

503 DAY_DATE_TIME = "Day Date Time" 

504 DAY_OF_WEEK = "Day of Week" 

505 DESCRIPTOR_VALUE_CHANGED = "Descriptor Value Changed" 

506 DEVICE_TIME = "Device Time" 

507 DEVICE_TIME_CONTROL_POINT = "Device Time Control Point" 

508 DEVICE_TIME_FEATURE = "Device Time Feature" 

509 DEVICE_TIME_PARAMETERS = "Device Time Parameters" 

510 DOOR_WINDOW_STATUS = "Door/Window Status" 

511 ESL_ADDRESS = "ESL Address" 

512 ESL_CONTROL_POINT = "ESL Control Point" 

513 ESL_CURRENT_ABSOLUTE_TIME = "ESL Current Absolute Time" 

514 ESL_DISPLAY_INFORMATION = "ESL Display Information" 

515 ESL_IMAGE_INFORMATION = "ESL Image Information" 

516 ESL_LED_INFORMATION = "ESL LED Information" 

517 ESL_RESPONSE_KEY_MATERIAL = "ESL Response Key Material" 

518 ESL_SENSOR_INFORMATION = "ESL Sensor Information" 

519 EMERGENCY_ID = "Emergency ID" 

520 EMERGENCY_TEXT = "Emergency Text" 

521 ENCRYPTED_DATA_KEY_MATERIAL = "Encrypted Data Key Material" 

522 ENERGY = "Energy" 

523 ENERGY_32 = "Energy 32" 

524 ENERGY_IN_A_PERIOD_OF_DAY = "Energy in a Period of Day" 

525 ENHANCED_BLOOD_PRESSURE_MEASUREMENT = "Enhanced Blood Pressure Measurement" 

526 ENHANCED_INTERMEDIATE_CUFF_PRESSURE = "Enhanced Intermediate Cuff Pressure" 

527 ESTIMATED_SERVICE_DATE = "Estimated Service Date" 

528 EVENT_STATISTICS = "Event Statistics" 

529 EXACT_TIME_256 = "Exact Time 256" 

530 FIRST_USE_DATE = "First Use Date" 

531 FIXED_STRING_16 = "Fixed String 16" 

532 FIXED_STRING_24 = "Fixed String 24" 

533 FIXED_STRING_36 = "Fixed String 36" 

534 FIXED_STRING_64 = "Fixed String 64" 

535 FIXED_STRING_8 = "Fixed String 8" 

536 FORCE = "Force" 

537 GHS_CONTROL_POINT = "GHS Control Point" 

538 GMAP_ROLE = "GMAP Role" 

539 GAIN_SETTINGS_ATTRIBUTE = "Gain Settings Attribute" 

540 GENERAL_ACTIVITY_INSTANTANEOUS_DATA = "General Activity Instantaneous Data" 

541 GENERAL_ACTIVITY_SUMMARY_DATA = "General Activity Summary Data" 

542 GENERIC_LEVEL = "Generic Level" 

543 GLOBAL_TRADE_ITEM_NUMBER = "Global Trade Item Number" 

544 GUST_FACTOR = "Gust Factor" 

545 HID_ISO_PROPERTIES = "HID ISO Properties" 

546 HTTP_CONTROL_POINT = "HTTP Control Point" 

547 HTTP_ENTITY_BODY = "HTTP Entity Body" 

548 HTTP_HEADERS = "HTTP Headers" 

549 HTTP_STATUS_CODE = "HTTP Status Code" 

550 HTTPS_SECURITY = "HTTPS Security" 

551 HEALTH_SENSOR_FEATURES = "Health Sensor Features" 

552 HEARING_AID_FEATURES = "Hearing Aid Features" 

553 HEARING_AID_PRESET_CONTROL_POINT = "Hearing Aid Preset Control Point" 

554 HEART_RATE_CONTROL_POINT = "Heart Rate Control Point" 

555 HIGH_TEMPERATURE = "High Temperature" 

556 HUMIDITY_8 = "Humidity 8" 

557 IDD_ANNUNCIATION_STATUS = "IDD Annunciation Status" 

558 IDD_COMMAND_CONTROL_POINT = "IDD Command Control Point" 

559 IDD_COMMAND_DATA = "IDD Command Data" 

560 IDD_FEATURES = "IDD Features" 

561 IDD_HISTORY_DATA = "IDD History Data" 

562 IDD_RECORD_ACCESS_CONTROL_POINT = "IDD Record Access Control Point" 

563 IDD_STATUS = "IDD Status" 

564 IDD_STATUS_CHANGED = "IDD Status Changed" 

565 IDD_STATUS_READER_CONTROL_POINT = "IDD Status Reader Control Point" 

566 IEEE_11073_20601_REGULATORY_CERTIFICATION_DATA_LIST = "IEEE 11073-20601 Regulatory Certification Data List" 

567 IMD_CONTROL = "IMD Control" 

568 IMD_HISTORICAL_DATA = "IMD Historical Data" 

569 IMD_STATUS = "IMD Status" 

570 IMDS_DESCRIPTOR_VALUE_CHANGED = "IMDS Descriptor Value Changed" 

571 ILLUMINANCE_16 = "Illuminance 16" 

572 INCOMING_CALL = "Incoming Call" 

573 INCOMING_CALL_TARGET_BEARER_URI = "Incoming Call Target Bearer URI" 

574 INTERMEDIATE_TEMPERATURE = "Intermediate Temperature" 

575 IRRADIANCE = "Irradiance" 

576 LE_GATT_SECURITY_LEVELS = "LE GATT Security Levels" 

577 LE_HID_OPERATION_MODE = "LE HID Operation Mode" 

578 LENGTH = "Length" 

579 LIFE_CYCLE_DATA = "Life Cycle Data" 

580 LIGHT_DISTRIBUTION = "Light Distribution" 

581 LIGHT_OUTPUT = "Light Output" 

582 LIGHT_SOURCE_TYPE = "Light Source Type" 

583 LINEAR_POSITION = "Linear Position" 

584 LIVE_HEALTH_OBSERVATIONS = "Live Health Observations" 

585 LOCAL_EAST_COORDINATE = "Local East Coordinate" 

586 LOCAL_NORTH_COORDINATE = "Local North Coordinate" 

587 LUMINOUS_EFFICACY = "Luminous Efficacy" 

588 LUMINOUS_ENERGY = "Luminous Energy" 

589 LUMINOUS_EXPOSURE = "Luminous Exposure" 

590 LUMINOUS_FLUX = "Luminous Flux" 

591 LUMINOUS_FLUX_RANGE = "Luminous Flux Range" 

592 LUMINOUS_INTENSITY = "Luminous Intensity" 

593 MASS_FLOW = "Mass Flow" 

594 MEASUREMENT_INTERVAL = "Measurement Interval" 

595 MEDIA_CONTROL_POINT = "Media Control Point" 

596 MEDIA_CONTROL_POINT_OPCODES_SUPPORTED = "Media Control Point Opcodes Supported" 

597 MEDIA_PLAYER_ICON_OBJECT_ID = "Media Player Icon Object ID" 

598 MEDIA_PLAYER_ICON_URL = "Media Player Icon URL" 

599 MEDIA_PLAYER_NAME = "Media Player Name" 

600 MEDIA_STATE = "Media State" 

601 MESH_PROVISIONING_DATA_IN = "Mesh Provisioning Data In" 

602 MESH_PROVISIONING_DATA_OUT = "Mesh Provisioning Data Out" 

603 MESH_PROXY_DATA_IN = "Mesh Proxy Data In" 

604 MESH_PROXY_DATA_OUT = "Mesh Proxy Data Out" 

605 MUTE = "Mute" 

606 NEXT_TRACK_OBJECT_ID = "Next Track Object ID" 

607 OTS_FEATURE = "OTS Feature" 

608 OBJECT_ACTION_CONTROL_POINT = "Object Action Control Point" 

609 OBJECT_CHANGED = "Object Changed" 

610 OBJECT_FIRST_CREATED = "Object First-Created" 

611 OBJECT_ID = "Object ID" 

612 OBJECT_LAST_MODIFIED = "Object Last-Modified" 

613 OBJECT_LIST_CONTROL_POINT = "Object List Control Point" 

614 OBJECT_LIST_FILTER = "Object List Filter" 

615 OBJECT_NAME = "Object Name" 

616 OBJECT_PROPERTIES = "Object Properties" 

617 OBJECT_SIZE = "Object Size" 

618 OBJECT_TYPE = "Object Type" 

619 OBSERVATION_SCHEDULE_CHANGED = "Observation Schedule Changed" 

620 ON_DEMAND_RANGING_DATA = "On-demand Ranging Data" 

621 PARENT_GROUP_OBJECT_ID = "Parent Group Object ID" 

622 PERCEIVED_LIGHTNESS = "Perceived Lightness" 

623 PERCENTAGE_8 = "Percentage 8" 

624 PERCENTAGE_8_STEPS = "Percentage 8 Steps" 

625 PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS = "Peripheral Preferred Connection Parameters" 

626 PERIPHERAL_PRIVACY_FLAG = "Peripheral Privacy Flag" 

627 PHYSICAL_ACTIVITY_CURRENT_SESSION = "Physical Activity Current Session" 

628 PHYSICAL_ACTIVITY_MONITOR_CONTROL_POINT = "Physical Activity Monitor Control Point" 

629 PHYSICAL_ACTIVITY_MONITOR_FEATURES = "Physical Activity Monitor Features" 

630 PHYSICAL_ACTIVITY_SESSION_DESCRIPTOR = "Physical Activity Session Descriptor" 

631 PLAYBACK_SPEED = "Playback Speed" 

632 PLAYING_ORDER = "Playing Order" 

633 PLAYING_ORDERS_SUPPORTED = "Playing Orders Supported" 

634 PNP_ID = "PnP ID" 

635 POWER = "Power" 

636 PRECISE_ACCELERATION_3D = "Precise Acceleration 3D" 

637 PUSHBUTTON_STATUS_8 = "Pushbutton Status 8" 

638 RAS_CONTROL_POINT = "RAS Control Point" 

639 RAS_FEATURES = "RAS Features" 

640 RC_FEATURE = "RC Feature" 

641 RC_SETTINGS = "RC Settings" 

642 RANGING_DATA_OVERWRITTEN = "Ranging Data Overwritten" 

643 RANGING_DATA_READY = "Ranging Data Ready" 

644 REAL_TIME_RANGING_DATA = "Real-time Ranging Data" 

645 RECONNECTION_ADDRESS = "Reconnection Address" 

646 RECONNECTION_CONFIGURATION_CONTROL_POINT = "Reconnection Configuration Control Point" 

647 RECORD_ACCESS_CONTROL_POINT = "Record Access Control Point" 

648 REGISTERED_USER = "Registered User" 

649 RELATIVE_RUNTIME_IN_A_CORRELATED_COLOR_TEMPERATURE_RANGE = ( 

650 "Relative Runtime in a Correlated Color Temperature Range" 

651 ) 

652 RELATIVE_RUNTIME_IN_A_CURRENT_RANGE = "Relative Runtime in a Current Range" 

653 RELATIVE_RUNTIME_IN_A_GENERIC_LEVEL_RANGE = "Relative Runtime in a Generic Level Range" 

654 RELATIVE_VALUE_IN_A_PERIOD_OF_DAY = "Relative Value in a Period of Day" 

655 RELATIVE_VALUE_IN_A_TEMPERATURE_RANGE = "Relative Value in a Temperature Range" 

656 RELATIVE_VALUE_IN_A_VOLTAGE_RANGE = "Relative Value in a Voltage Range" 

657 RELATIVE_VALUE_IN_AN_ILLUMINANCE_RANGE = "Relative Value in an Illuminance Range" 

658 RESOLVABLE_PRIVATE_ADDRESS_ONLY = "Resolvable Private Address Only" 

659 ROTATIONAL_SPEED = "Rotational Speed" 

660 SC_CONTROL_POINT = "SC Control Point" 

661 SCAN_REFRESH = "Scan Refresh" 

662 SEARCH_CONTROL_POINT = "Search Control Point" 

663 SEARCH_RESULTS_OBJECT_ID = "Search Results Object ID" 

664 SEEKING_SPEED = "Seeking Speed" 

665 SENSOR_LOCATION = "Sensor Location" 

666 SERVER_SUPPORTED_FEATURES = "Server Supported Features" 

667 SERVICE_CYCLE_DATA = "Service Cycle Data" 

668 SET_IDENTITY_RESOLVING_KEY = "Set Identity Resolving Key" 

669 SET_MEMBER_LOCK = "Set Member Lock" 

670 SET_MEMBER_RANK = "Set Member Rank" 

671 SINK_ASE = "Sink ASE" 

672 SINK_AUDIO_LOCATIONS = "Sink Audio Locations" 

673 SINK_PAC = "Sink PAC" 

674 SLEEP_ACTIVITY_INSTANTANEOUS_DATA = "Sleep Activity Instantaneous Data" 

675 SLEEP_ACTIVITY_SUMMARY_DATA = "Sleep Activity Summary Data" 

676 SOURCE_ASE = "Source ASE" 

677 SOURCE_AUDIO_LOCATIONS = "Source Audio Locations" 

678 SOURCE_PAC = "Source PAC" 

679 STATUS_FLAGS = "Status Flags" 

680 STEP_COUNTER_ACTIVITY_SUMMARY_DATA = "Step Counter Activity Summary Data" 

681 STORED_HEALTH_OBSERVATIONS = "Stored Health Observations" 

682 SULFUR_HEXAFLUORIDE_CONCENTRATION = "Sulfur Hexafluoride Concentration" 

683 SUPPORTED_AUDIO_CONTEXTS = "Supported Audio Contexts" 

684 SYSTEM_ID = "System ID" 

685 TDS_CONTROL_POINT = "TDS Control Point" 

686 TMAP_ROLE = "TMAP Role" 

687 TEMPERATURE_8 = "Temperature 8" 

688 TEMPERATURE_8_STATISTICS = "Temperature 8 Statistics" 

689 TEMPERATURE_8_IN_A_PERIOD_OF_DAY = "Temperature 8 in a Period of Day" 

690 TEMPERATURE_RANGE = "Temperature Range" 

691 TEMPERATURE_STATISTICS = "Temperature Statistics" 

692 TEMPERATURE_TYPE = "Temperature Type" 

693 TERMINATION_REASON = "Termination Reason" 

694 TIME_ACCURACY = "Time Accuracy" 

695 TIME_CHANGE_LOG_DATA = "Time Change Log Data" 

696 TIME_DECIHOUR_8 = "Time Decihour 8" 

697 TIME_EXPONENTIAL_8 = "Time Exponential 8" 

698 TIME_HOUR_24 = "Time Hour 24" 

699 TIME_MILLISECOND_24 = "Time Millisecond 24" 

700 TIME_SECOND_16 = "Time Second 16" 

701 TIME_SECOND_32 = "Time Second 32" 

702 TIME_SECOND_8 = "Time Second 8" 

703 TIME_SOURCE = "Time Source" 

704 TORQUE = "Torque" 

705 TRACK_CHANGED = "Track Changed" 

706 TRACK_DURATION = "Track Duration" 

707 TRACK_POSITION = "Track Position" 

708 TRACK_TITLE = "Track Title" 

709 UDI_FOR_MEDICAL_DEVICES = "UDI for Medical Devices" 

710 UGG_FEATURES = "UGG Features" 

711 UGT_FEATURES = "UGT Features" 

712 URI = "URI" 

713 UNCERTAINTY = "Uncertainty" 

714 USER_CONTROL_POINT = "User Control Point" 

715 USER_INDEX = "User Index" 

716 VOLUME_CONTROL_POINT = "Volume Control Point" 

717 VOLUME_FLAGS = "Volume Flags" 

718 VOLUME_FLOW = "Volume Flow" 

719 VOLUME_OFFSET_CONTROL_POINT = "Volume Offset Control Point" 

720 VOLUME_OFFSET_STATE = "Volume Offset State" 

721 VOLUME_STATE = "Volume State" 

722 WORK_CYCLE_DATA = "Work Cycle Data" 

723 

724 

725class ServiceName(Enum): 

726 """Enumeration of all supported GATT service names.""" 

727 

728 GAP = "GAP" 

729 GATT = "GATT" 

730 IMMEDIATE_ALERT = "Immediate Alert" 

731 LINK_LOSS = "Link Loss" 

732 TX_POWER = "Tx Power" 

733 NEXT_DST_CHANGE = "Next DST Change" 

734 DEVICE_INFORMATION = "Device Information" 

735 BATTERY = "Battery" 

736 HEART_RATE = "Heart Rate" 

737 BLOOD_PRESSURE = "Blood Pressure" 

738 HEALTH_THERMOMETER = "Health Thermometer" 

739 GLUCOSE = "Glucose" 

740 CYCLING_SPEED_AND_CADENCE = "Cycling Speed and Cadence" 

741 CYCLING_POWER = "Cycling Power" 

742 RUNNING_SPEED_AND_CADENCE = "Running Speed and Cadence" 

743 AUTOMATION_IO = "Automation IO" 

744 ENVIRONMENTAL_SENSING = "Environmental Sensing" 

745 ALERT_NOTIFICATION = "Alert Notification" 

746 BODY_COMPOSITION = "Body Composition" 

747 USER_DATA = "User Data" 

748 WEIGHT_SCALE = "Weight Scale" 

749 LOCATION_AND_NAVIGATION = "Location and Navigation" 

750 PHONE_ALERT_STATUS = "Phone Alert Status" 

751 REFERENCE_TIME_UPDATE = "Reference Time Update" 

752 CURRENT_TIME = "Current Time" 

753 SCAN_PARAMETERS = "Scan Parameters" 

754 BOND_MANAGEMENT = "Bond Management" 

755 INDOOR_POSITIONING = "Indoor Positioning" 

756 HUMAN_INTERFACE_DEVICE = "Human Interface Device" 

757 PULSE_OXIMETER = "Pulse Oximeter" 

758 FITNESS_MACHINE = "Fitness Machine"