jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Classes | Macros | Enumerations | Functions | Variables
test_datatype02.hpp File Reference
#include <cassert>
#include <cinttypes>
#include <cstring>
#include <random>
#include <jau/cpp_lang_util.hpp>
#include <jau/packed_attribute.hpp>
#include <jau/ordered_atomic.hpp>
#include <jau/basic_types.hpp>
#include <jau/darray.hpp>
Include dependency graph for test_datatype02.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GattCharacteristicPropertySpec
 
struct  GattCharacteristicSpec
 
struct  GattClientCharacteristicConfigSpec
 
struct  GattServiceCharacteristic
 

Macros

#define CASE_TO_STRING(V)   case V: return #V;
 
#define CHARACTERISTIC_PROP_ENUM(X)
 
#define CHARACTERISTIC_TYPE_ENUM(X)
 
#define REQUIREMENT_SPEC_ENUM(X)
 
#define SERVICE_TYPE_ENUM(X)
 

Enumerations

enum  GattCharacteristicProperty : uint8_t {
  Broadcast = 0x01 , Read = 0x02 , WriteNoAck = 0x04 , WriteWithAck = 0x08 ,
  Notify = 0x10 , Indicate = 0x20 , AuthSignedWrite = 0x40 , ExtProps = 0x80 ,
  ReliableWriteExt = 0x81 , AuxWriteExt = 0x82
}
 
enum  GattCharacteristicType : uint16_t {
  DEVICE_NAME = 0x2A00 , APPEARANCE = 0x2A01 , PERIPHERAL_PRIVACY_FLAG = 0x2A02 , RECONNECTION_ADDRESS = 0x2A03 ,
  PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS = 0x2A04 , TEMPERATURE = 0x2A6E , TEMPERATURE_CELSIUS = 0x2A1F , TEMPERATURE_FAHRENHEIT = 0x2A20 ,
  TEMPERATURE_MEASUREMENT = 0x2A1C , TEMPERATURE_TYPE = 0x2A1D , INTERMEDIATE_TEMPERATURE = 0x2A1E , MEASUREMENT_INTERVAL = 0x2A21 ,
  SYSTEM_ID = 0x2A23 , MODEL_NUMBER_STRING = 0x2A24 , SERIAL_NUMBER_STRING = 0x2A25 , FIRMWARE_REVISION_STRING = 0x2A26 ,
  HARDWARE_REVISION_STRING = 0x2A27 , SOFTWARE_REVISION_STRING = 0x2A28 , MANUFACTURER_NAME_STRING = 0x2A29 , REGULATORY_CERT_DATA_LIST = 0x2A2A ,
  PNP_ID = 0x2A50
}
 
enum  GattRequirementSpec : uint8_t {
  Excluded = 0x00 , Mandatory = 0x01 , Optional = 0x02 , Conditional = 0x03 ,
  if_characteristic_supported = 0x11 , if_notify_or_indicate_supported = 0x12 , C1 = 0x21
}
 
enum  GattServiceType : uint16_t {
  GENERIC_ACCESS = 0x1800 , GENERIC_ATTRIBUTE = 0x1801 , IMMEDIATE_ALERT = 0x1802 , LINK_LOSS = 0x1803 ,
  HEALTH_THERMOMETER = 0x1809 , DEVICE_INFORMATION = 0x180A , BATTERY_SERVICE = 0x180F
}
 

Functions

std::string GattCharacteristicPropertyToString (const GattCharacteristicProperty v) noexcept
 
std::string GattCharacteristicTypeToString (const GattCharacteristicType v) noexcept
 
std::string GattRequirementSpecToString (const GattRequirementSpec v) noexcept
 
std::string GattServiceTypeToString (const GattServiceType v) noexcept
 

Variables

const GattServiceCharacteristic GATT_DEVICE_INFORMATION_SRVC
 
const GattServiceCharacteristic GATT_GENERIC_ACCESS_SRVC
 
const GattServiceCharacteristic GATT_HEALTH_THERMOMETER_SRVC
 https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org.bluetooth.service.health_thermometer.xml More...
 
const jau::darray< const GattServiceCharacteristic * > GATT_SERVICES
 

Macro Definition Documentation

◆ CASE_TO_STRING

#define CASE_TO_STRING (   V)    case V: return #V;

Definition at line 334 of file test_datatype02.hpp.

◆ SERVICE_TYPE_ENUM

#define SERVICE_TYPE_ENUM (   X)
Value:
@ GENERIC_ACCESS
This service contains generic information about the device.
@ BATTERY_SERVICE
This service exposes the state of a battery within a device.
@ HEALTH_THERMOMETER
This service exposes temperature and other data from a thermometer intended for healthcare and fitnes...
@ DEVICE_INFORMATION
This service exposes manufacturer and/or vendor information about a device.

Definition at line 336 of file test_datatype02.hpp.

◆ CHARACTERISTIC_TYPE_ENUM

#define CHARACTERISTIC_TYPE_ENUM (   X)
Value:
X(SYSTEM_ID) \
X(PNP_ID)
@ SOFTWARE_REVISION_STRING
@ REGULATORY_CERT_DATA_LIST
@ SERIAL_NUMBER_STRING
@ MODEL_NUMBER_STRING
@ DEVICE_NAME
@ APPEARANCE
@ MANUFACTURER_NAME_STRING
@ PNP_ID
@ TEMPERATURE_FAHRENHEIT
@ PERIPHERAL_PRIVACY_FLAG
@ PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS
@ TEMPERATURE_MEASUREMENT
@ FIRMWARE_REVISION_STRING
@ TEMPERATURE_TYPE
Mandatory: 8bit: 1 armpit, 2 body (general), 3(ear), 4 (finger), ...
@ TEMPERATURE
Mandatory: sint16 10^-2: Celsius.
@ RECONNECTION_ADDRESS
@ SYSTEM_ID
Mandatory: uint40.
@ MEASUREMENT_INTERVAL
@ TEMPERATURE_CELSIUS
Mandatory: sint16 10^-1: Celsius.
@ INTERMEDIATE_TEMPERATURE
@ HARDWARE_REVISION_STRING

Definition at line 350 of file test_datatype02.hpp.

◆ CHARACTERISTIC_PROP_ENUM

#define CHARACTERISTIC_PROP_ENUM (   X)
Value:
X(Broadcast) \
X(Read) \
X(Notify) \
X(Indicate) \
X(ExtProps) \
@ Notify
@ ReliableWriteExt
FIXME: extension?
@ Indicate
@ ExtProps
@ AuthSignedWrite
@ WriteNoAck
@ Read
@ Broadcast
@ AuxWriteExt
FIXME: extension?
@ WriteWithAck

Definition at line 382 of file test_datatype02.hpp.

◆ REQUIREMENT_SPEC_ENUM

#define REQUIREMENT_SPEC_ENUM (   X)
Value:
X(Excluded) \
X(Mandatory) \
X(Optional) \
X(C1)
@ Optional
@ if_characteristic_supported
@ Conditional
@ if_notify_or_indicate_supported
@ Mandatory
@ Excluded

Definition at line 402 of file test_datatype02.hpp.

Enumeration Type Documentation

◆ GattServiceType

enum GattServiceType : uint16_t
Enumerator
GENERIC_ACCESS 

This service contains generic information about the device.

This is a mandatory service.

GENERIC_ATTRIBUTE 

The service allows receiving indications of changed services.

This is a mandatory service.

IMMEDIATE_ALERT 

This service exposes a control point to change the peripheral alert behavior.

LINK_LOSS 

The service defines behavior on the device when a link is lost between two devices.

HEALTH_THERMOMETER 

This service exposes temperature and other data from a thermometer intended for healthcare and fitness applications.

DEVICE_INFORMATION 

This service exposes manufacturer and/or vendor information about a device.

BATTERY_SERVICE 

This service exposes the state of a battery within a device.

Definition at line 41 of file test_datatype02.hpp.

◆ GattCharacteristicType

enum GattCharacteristicType : uint16_t
Enumerator
DEVICE_NAME 
APPEARANCE 
PERIPHERAL_PRIVACY_FLAG 
RECONNECTION_ADDRESS 
PERIPHERAL_PREFERRED_CONNECTION_PARAMETERS 
TEMPERATURE 

Mandatory: sint16 10^-2: Celsius.

TEMPERATURE_CELSIUS 

Mandatory: sint16 10^-1: Celsius.

TEMPERATURE_FAHRENHEIT 
TEMPERATURE_MEASUREMENT 
TEMPERATURE_TYPE 

Mandatory: 8bit: 1 armpit, 2 body (general), 3(ear), 4 (finger), ...

INTERMEDIATE_TEMPERATURE 
MEASUREMENT_INTERVAL 
SYSTEM_ID 

Mandatory: uint40.

MODEL_NUMBER_STRING 
SERIAL_NUMBER_STRING 
FIRMWARE_REVISION_STRING 
HARDWARE_REVISION_STRING 
SOFTWARE_REVISION_STRING 
MANUFACTURER_NAME_STRING 
REGULATORY_CERT_DATA_LIST 
PNP_ID 

Definition at line 59 of file test_datatype02.hpp.

◆ GattCharacteristicProperty

Enumerator
Broadcast 
Read 
WriteNoAck 
WriteWithAck 
Notify 
Indicate 
AuthSignedWrite 
ExtProps 
ReliableWriteExt 

FIXME: extension?

AuxWriteExt 

FIXME: extension?

Definition at line 101 of file test_datatype02.hpp.

◆ GattRequirementSpec

enum GattRequirementSpec : uint8_t
Enumerator
Excluded 
Mandatory 
Optional 
Conditional 
if_characteristic_supported 
if_notify_or_indicate_supported 
C1 

Definition at line 117 of file test_datatype02.hpp.

Function Documentation

◆ GattServiceTypeToString()

std::string GattServiceTypeToString ( const GattServiceType  v)
noexcept

Definition at line 342 of file test_datatype02.hpp.

Here is the caller graph for this function:

◆ GattCharacteristicTypeToString()

std::string GattCharacteristicTypeToString ( const GattCharacteristicType  v)
noexcept

Definition at line 374 of file test_datatype02.hpp.

Here is the caller graph for this function:

◆ GattCharacteristicPropertyToString()

std::string GattCharacteristicPropertyToString ( const GattCharacteristicProperty  v)
noexcept

Definition at line 394 of file test_datatype02.hpp.

Here is the caller graph for this function:

◆ GattRequirementSpecToString()

std::string GattRequirementSpecToString ( const GattRequirementSpec  v)
noexcept

Definition at line 411 of file test_datatype02.hpp.

Here is the caller graph for this function:

Variable Documentation

◆ GATT_GENERIC_ACCESS_SRVC

const GattServiceCharacteristic GATT_GENERIC_ACCESS_SRVC

Definition at line 177 of file test_datatype02.hpp.

◆ GATT_HEALTH_THERMOMETER_SRVC

const GattServiceCharacteristic GATT_HEALTH_THERMOMETER_SRVC

◆ GATT_DEVICE_INFORMATION_SRVC

const GattServiceCharacteristic GATT_DEVICE_INFORMATION_SRVC

Definition at line 256 of file test_datatype02.hpp.

◆ GATT_SERVICES

const jau::darray<const GattServiceCharacteristic*> GATT_SERVICES
Initial value:
= {
const GattServiceCharacteristic GATT_HEALTH_THERMOMETER_SRVC
https://www.bluetooth.com/wp-content/uploads/Sitecore-Media-Library/Gatt/Xml/Services/org....
const GattServiceCharacteristic GATT_DEVICE_INFORMATION_SRVC
const GattServiceCharacteristic GATT_GENERIC_ACCESS_SRVC

Definition at line 331 of file test_datatype02.hpp.