19#ifndef __GATT_CHARACTERISTIC_H__
20#define __GATT_CHARACTERISTIC_H__
24#include "ble/gatt/GattAttribute.h"
25#include "ble/gatt/GattCallbackParamTypes.h"
30#if !defined(DOXYGEN_ONLY)
1301 const uint8_t writable =
1306 return properties & writable;
1320 return properties & readable;
1411 uint8_t *valuePtr =
nullptr,
1413 uint16_t maxLen = 0,
1416 unsigned numDescriptors = 0,
1417 bool hasVariableLen =
true
1418 ) : _valueAttribute(uuid, valuePtr, len, maxLen, hasVariableLen),
1420 _descriptors(descriptors),
1421 _descriptorCount(numDescriptors),
1422 readAuthorizationCallback(),
1423 writeAuthorizationCallback(),
1428#if BLE_FEATURE_SECURITY
1443 delete _implicit_cccd;
1444 _implicit_cccd =
nullptr;
1498#if BLE_FEATURE_SECURITY
1529 _update_security = security.
value();
1559 writeAuthorizationCallback.
attach(callback);
1574 template <
typename T>
1579 writeAuthorizationCallback.
attach(
object, member);
1590 return writeAuthorizationCallback;
1606 readAuthorizationCallback.
attach(callback);
1622 template <
typename T>
1627 readAuthorizationCallback.
attach(
object, member);
1638 return readAuthorizationCallback;
1663 writeAuthorizationCallback.
call(params);
1708 readAuthorizationCallback.
call(params);
1720 return _valueAttribute;
1730 return _valueAttribute;
1765 return (_implicit_cccd ==
nullptr? _descriptorCount : _descriptorCount+1);
1778 return readAuthorizationCallback;
1791 return writeAuthorizationCallback;
1809 if(index == _descriptorCount) {
1811 return _implicit_cccd;
1813 else if (index > _descriptorCount) {
1817 return _descriptors[index];
1823 friend ble::impl::GattServer;
1825#if !defined(DOXYGEN_ONLY)
1835 _implicit_cccd = implicit_cccd;
1851 uint8_t _properties;
1861 uint8_t _descriptorCount;
1877 readAuthorizationCallback;
1883 writeAuthorizationCallback;
1897template <
typename T>
1923 unsigned numDescriptors = 0
1926 reinterpret_cast<uint8_t *>(valuePtr),
1940template <
typename T>
1966 unsigned numDescriptors = 0
1969 reinterpret_cast<uint8_t *>(valuePtr),
1982template <
typename T>
2008 unsigned numDescriptors = 0
2011 reinterpret_cast<uint8_t *>(valuePtr),
2025template <
typename T,
unsigned NUM_ELEMENTS>
2048 T valuePtr[NUM_ELEMENTS],
2051 unsigned numDescriptors = 0
2054 reinterpret_cast<uint8_t *>(valuePtr),
2055 sizeof(T) * NUM_ELEMENTS,
2056 sizeof(T) * NUM_ELEMENTS,
2068template <
typename T,
unsigned NUM_ELEMENTS>
2092 T valuePtr[NUM_ELEMENTS],
2095 unsigned numDescriptors = 0
2098 reinterpret_cast<uint8_t *>(valuePtr),
2099 sizeof(T) * NUM_ELEMENTS,
2100 sizeof(T) * NUM_ELEMENTS,
2113template <
typename T,
unsigned NUM_ELEMENTS>
2137 T valuePtr[NUM_ELEMENTS],
2140 unsigned numDescriptors = 0
2143 reinterpret_cast<uint8_t *>(valuePtr),
2144 sizeof(T) * NUM_ELEMENTS,
2145 sizeof(T) * NUM_ELEMENTS,
Function like object adapter over freestanding and member functions.
void attach(void(*function)(ContextType context)=NULL)
Adapt a freestanding function.
void call(ContextType context) const
Call the adapted function and functions chained to the instance.
Representation of a GattServer attribute.
ble::attribute_handle_t Handle_t
Representation of an attribute handle.
void allowWrite(bool allow_write)
Allow or disallow write operation from a client.
Handle_t getHandle() const
Get the attribute's handle in the ATT table.
Security_t getWriteSecurityRequirement() const
Return the security level required by write operations.
void setWriteSecurityRequirement(Security_t requirement)
Set the security requirements of the write operations.
Security_t getReadSecurityRequirement() const
Return the security level required by read operations.
void setReadSecurityRequirement(Security_t requirement)
Set the security requirements of the read operations.
void allowRead(bool allow_read)
Allow or disallow read operation from a client.
Representation of a GattServer characteristic.
GattCharacteristic(const UUID &uuid, uint8_t *valuePtr=nullptr, uint16_t len=0, uint16_t maxLen=0, uint8_t props=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0, bool hasVariableLen=true)
Constructs a new GattCharacteristic.
GattAttribute::Handle_t getValueHandle() const
Get the characteristic's value attribute handle in the ATT table.
uint8_t getDescriptorCount() const
Get the total number of descriptors within this characteristic.
bool isWriteAuthorizationEnabled() const
Check whether write authorization is enabled.
static bool isWritable(uint8_t properties)
Indicates if the properties has at least one of the writable flags.
@ BLE_GATT_CHAR_PROPERTIES_WRITE
Permits writes of the characteristic value with response.
@ BLE_GATT_CHAR_PROPERTIES_NONE
No property defined.
@ BLE_GATT_CHAR_PROPERTIES_BROADCAST
Permits broadcasts of the characteristic value using the Server Characteristic Configuration descript...
@ BLE_GATT_CHAR_PROPERTIES_READ
Permits reads of the characteristic value.
@ BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE
Permits writes of the characteristic value without response.
@ BLE_GATT_CHAR_PROPERTIES_AUTHENTICATED_SIGNED_WRITES
Permits signed writes to the characteristic value.
@ BLE_GATT_CHAR_PROPERTIES_NOTIFY
Permits notifications of a characteristic value without acknowledgment.
@ BLE_GATT_CHAR_PROPERTIES_INDICATE
Permits indications of a characteristic value with acknowledgment.
@ BLE_GATT_CHAR_PROPERTIES_EXTENDED_PROPERTIES
The Characteristic Extended Properties descriptor defines additional characteristic properties.
const FunctionPointerWithContext< GattWriteAuthCallbackParams * > & getWriteAuthorizationCallback() const
Return the callback registered to handle client's write.
void setReadAuthorizationCallback(void(*callback)(GattReadAuthCallbackParams *))
Register the read requests event handler.
uint8_t getProperties() const
Get the characteristic's properties.
void setSecurityRequirements(SecurityRequirement_t read_security, SecurityRequirement_t write_security, SecurityRequirement_t update_security)
Set all security requirements of the characteristic.
SecurityRequirement_t getReadSecurityRequirement() const
Get the security requirement of the read operation.
static bool isReadable(uint8_t properties)
Indicates if the properties is readable.
GattAuthCallbackReply_t authorizeRead(GattReadAuthCallbackParams *params)
Invoke the read authorization callback.
@ BLE_GATT_UNIT_LENGTH_FOOT
Length, foot.
@ BLE_GATT_UNIT_RADIANT_INTENSITY_WATT_PER_STERADIAN
Radiant intensity, watt per steradian.
@ BLE_GATT_UNIT_VELOCITY_KNOT
Velocity, knot.
@ BLE_GATT_UNIT_PRESSURE_POUND_FORCE_PER_SQUARE_INCH
Pressure, pound-force per square inch.
@ BLE_GATT_UNIT_ENERGY_DENSITY_JOULE_PER_CUBIC_METRE
Energy density, joule per cubic meter.
@ BLE_GATT_UNIT_ENERGY_JOULE
Energy, joule.
@ BLE_GATT_UNIT_ACCELERATION_METRES_PER_SECOND_SQUARED
Acceleration, meters per second squared.
@ BLE_GATT_UNIT_PERMEABILITY_HENRY_PER_METRE
Permeability, henry per meter.
@ BLE_GATT_UNIT_MAGNETIC_FLUX_DENSITY_TESLA
Magnetic flux density, tesla.
@ BLE_GATT_UNIT_AREA_HECTARE
Area, hectare.
@ BLE_GATT_UNIT_NONE
No specified unit type.
@ BLE_GATT_UNIT_LUMINOUS_FLUX_LUMEN
Luminous flux, lumen.
@ BLE_GATT_UNIT_PRESSURE_PASCAL
Pressure, pascal.
@ BLE_GATT_UNIT_REFRACTIVE_INDEX
Refractive index.
@ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_KELVIN
Thermodynamic temperature, kelvin.
@ BLE_GATT_UNIT_TIME_YEAR
Time, year.
@ BLE_GATT_UNIT_ELECTRIC_CONDUCTANCE_SIEMENS
Electric conductance, siemens.
@ BLE_GATT_UNIT_TIME_SECOND
Time, second.
@ BLE_GATT_UNIT_MASS_DENSITY_MILLIGRAM_PER_DECILITRE
Mass density, milligram per deciliter.
@ BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_BEL
Logarithmic radio quantity, bel.
@ BLE_GATT_UNIT_INDUCTANCE_HENRY
Inductance, henry.
@ BLE_GATT_UNIT_CURRENT_DENSITY_AMPERE_PER_SQUARE_METRE
Current density (ampere per square meter).
@ BLE_GATT_UNIT_LENGTH_METRE
Length, meter.
@ BLE_GATT_UNIT_ELECTRIC_CHARGE_AMPERE_HOURS
Electric charge, ampere hours.
@ BLE_GATT_UNIT_SPECIFIC_ENERGY_JOULE_PER_KILOGRAM
Specific energy, joule per kilogram.
@ BLE_GATT_UNIT_DOSE_EQUIVALENT_SIEVERT
Dose equivalent, sievert.
@ BLE_GATT_UNIT_LENGTH_NAUTICAL_MILE
Length, nautical mile.
@ BLE_GATT_UNIT_TIME_DAY
Time, day.
@ BLE_GATT_UNIT_ELECTRIC_FLUX_DENSITY_COULOMB_PER_SQUARE_METRE
Electric flux density, coulomb per square meter.
@ BLE_GATT_UNIT_DENSITY_KILOGRAM_PER_CUBIC_METRE
Density, kilogram per cubic meter.
@ BLE_GATT_UNIT_ELECTRIC_CHARGE_COULOMB
Electrical charge, coulomb.
@ BLE_GATT_UNIT_ABSORBED_DOSE_GRAY
Absorbed dose, gray.
@ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_FAHRENHEIT
Thermodynamic temperature, degree Fahrenheit.
@ BLE_GATT_UNIT_PLANE_ANGLE_DEGREE
Plane angle, degree.
@ BLE_GATT_UNIT_ELECTRIC_CHARGE_DENSITY_COULOMB_PER_CUBIC_METRE
Electric charge density, coulomb per cubic meter.
@ BLE_GATT_UNIT_VOLUME_CUBIC_METRES
Volume, cubic meters.
@ BLE_GATT_UNIT_MAGNETIC_FLUX_WEBER
Magnetic flux, weber.
@ BLE_GATT_UNIT_FORCE_NEWTON
Force, newton.
@ BLE_GATT_UNIT_CATALYTIC_ACTIVITY_CONCENTRATION_KATAL_PER_CUBIC_METRE
Catalytic activity concentration, katal per cubic meter.
@ BLE_GATT_UNIT_LUMINANCE_CANDELA_PER_SQUARE_METRE
Luminance (candela per square meter).
@ BLE_GATT_UNIT_MOMENT_OF_FORCE_NEWTON_METRE
Moment of force, newton meter.
@ BLE_GATT_UNIT_CATALYTIC_ACTIVITY_KATAL
Catalytic activity, katal.
@ BLE_GATT_UNIT_HEAT_FLUX_DENSITY_WATT_PER_SQUARE_METRE
Heat flux density, watt per square meter.
@ BLE_GATT_UNIT_DYNAMIC_VISCOSITY_PASCAL_SECOND
Dynamic viscosity, pascal second.
@ BLE_GATT_UNIT_VELOCITY_KILOMETRE_PER_HOUR
Velocity, kilometer per hour.
@ BLE_GATT_UNIT_MOLAR_ENTROPY_JOULE_PER_MOLE_KELVIN
Molar entropy, joule per mole kelvin.
@ BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_NEPER
Logarithmic radio quantity, neper.
@ BLE_GATT_UNIT_HEAT_CAPACITY_JOULE_PER_KELVIN
Heat capacity, joule per kelvin.
@ BLE_GATT_UNIT_LENGTH_MILE
Length, mile.
@ BLE_GATT_UNIT_SURFACE_DENSITY_KILOGRAM_PER_SQUARE_METRE
Surface density (kilogram per square meter).
@ BLE_GATT_UNIT_LENGTH_PARSEC
Length, parsec.
@ BLE_GATT_UNIT_TIME_MONTH
Time, month.
@ BLE_GATT_UNIT_VELOCITY_MILE_PER_HOUR
Velocity, mile per hour.
@ BLE_GATT_UNIT_ACTIVITY_REFERRED_TO_A_RADIONUCLIDE_BECQUEREL
Activity referred to a radionuclide, becquerel.
@ BLE_GATT_UNIT_SPECIFIC_HEAT_CAPACITY_JOULE_PER_KILOGRAM_KELVIN
Specific heat capacity, joule per kilogram kelvin.
@ BLE_GATT_UNIT_MASS_CONCENTRATION_KILOGRAM_PER_CUBIC_METRE
Mass concentration (kilogram per cubic meter).
@ BLE_GATT_UNIT_LUMINOUS_INTENSITY_CANDELA
Luminous intensity, candela.
@ BLE_GATT_UNIT_SOLID_ANGLE_STERADIAN
Solid angle (steradian).
@ BLE_GATT_UNIT_LENGTH_YARD
Length, yard.
@ BLE_GATT_UNIT_LENGTH_INCH
Length, inch.
@ BLE_GATT_UNIT_VOLUME_LITRE
Volume, liter.
@ BLE_GATT_UNIT_PER_MILLE
Per mille.
@ BLE_GATT_UNIT_PLANE_ANGLE_MINUTE
Plane angle, minute.
@ BLE_GATT_UNIT_ILLUMINANCE_LUX
Illuminance, lux.
@ BLE_GATT_UNIT_AMOUNT_CONCENTRATION_MOLE_PER_CUBIC_METRE
Amount concentration (mole per cubic meter).
@ BLE_GATT_UNIT_FREQUENCY_HERTZ
Frequency, hertz.
@ BLE_GATT_UNIT_TIME_MINUTE
Time, minute.
@ BLE_GATT_UNIT_ELECTRIC_POTENTIAL_DIFFERENCE_VOLT
Electrical potential difference, voltage.
@ BLE_GATT_UNIT_ENERGY_GRAM_CALORIE
Energy, gram calorie.
@ BLE_GATT_UNIT_AREA_SQUARE_METRES
Area, square meters.
@ BLE_GATT_UNIT_ELECTRIC_CURRENT_AMPERE
Electric current, ampere.
@ BLE_GATT_UNIT_VELOCITY_METRES_PER_SECOND
Velocity, meters per second.
@ BLE_GATT_UNIT_ENERGY_KILOWATT_HOUR
Energy, killowatt hour.
@ BLE_GATT_UNIT_MOLAR_ENERGY_JOULE_PER_MOLE
Molar energy, joule per mole.
@ BLE_GATT_UNIT_ABSORBED_DOSE_RATE_GRAY_PER_SECOND
Absorbed dose rate, gray per second.
@ BLE_GATT_UNIT_CAPACITANCE_FARAD
Capacitance, farad.
@ BLE_GATT_UNIT_AREA_BARN
Area, barn.
@ BLE_GATT_UNIT_MASS_DENSITY_MILLIMOLE_PER_LITRE
Mass density, millimole per liter.
@ BLE_GATT_UNIT_PLANE_ANGLE_SECOND
Plane angle, seconds.
@ BLE_GATT_UNIT_LENGTH_ANGSTROM
Length, ngstrm.
@ BLE_GATT_UNIT_ANGULAR_ACCELERATION_RADIAN_PER_SECOND_SQUARED
Angular acceleration, radian per second squared.
@ BLE_GATT_UNIT_SURFACE_TENSION_NEWTON_PER_METRE
Surface tension, newton per meter.
@ BLE_GATT_UNIT_WAVENUMBER_RECIPROCAL_METRE
Wave number reciprocal, meter.
@ BLE_GATT_UNIT_PRESSURE_BAR
Pressure, bar.
@ BLE_GATT_UNIT_ANGULAR_VELOCITY_RADIAN_PER_SECOND
Angular velocity, radian per second.
@ BLE_GATT_UNIT_AMOUNT_OF_SUBSTANCE_MOLE
Amount of substance, mole.
@ BLE_GATT_UNIT_ELECTRIC_RESISTANCE_OHM
Electric resistance, ohm.
@ BLE_GATT_UNIT_POWER_WATT
Power, watt.
@ BLE_GATT_UNIT_CONCENTRATION_COUNT_PER_CUBIC_METRE
Concentration, count per cubic meter.
@ BLE_GATT_UNIT_PLANE_ANGLE_RADIAN
Plane angle (radian).
@ BLE_GATT_UNIT_PERCENTAGE
Percentage.
@ BLE_GATT_UNIT_ANGULAR_VELOCITY_REVOLUTION_PER_MINUTE
Angular Velocity, revolution per minute.
@ BLE_GATT_UNIT_MAGNETIC_FIELD_STRENGTH_AMPERE_PER_METRE
Magnetic field strength, ampere per meter.
@ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_CELSIUS
Celsius temperature, degree Celsius.
@ BLE_GATT_UNIT_ELECTRIC_FIELD_STRENGTH_VOLT_PER_METRE
Electric field strength, volt per meter.
@ BLE_GATT_UNIT_PERIOD_BEATS_PER_MINUTE
Period, beats per minute.
@ BLE_GATT_UNIT_RADIANCE_WATT_PER_SQUARE_METRE_STERADIAN
Radiance, watt per square meter steradian.
@ BLE_GATT_UNIT_PRESSURE_MILLIMETRE_OF_MERCURY
Pressure, millimeter of mercury.
@ BLE_GATT_UNIT_SURFACE_CHARGE_DENSITY_COULOMB_PER_SQUARE_METRE
Surface charge density, coulomb per square meter.
@ BLE_GATT_UNIT_THERMAL_CONDUCTIVITY_WATT_PER_METRE_KELVIN
Thermal conductivity, watt per meter kelvin.
@ BLE_GATT_UNIT_RELATIVE_PERMEABILITY
Relative permeability.
@ BLE_GATT_UNIT_MASS_KILOGRAM
Mass, kilogram.
@ BLE_GATT_UNIT_SPECIFIC_VOLUME_CUBIC_METRE_PER_KILOGRAM
Specific volume (cubic meter per kilogram).
@ BLE_GATT_UNIT_ENERGY_KILOGRAM_CALORIE
Energy, kilogram calorie.
@ BLE_GATT_UNIT_TIME_HOUR
Time, hour.
@ BLE_GATT_UNIT_PERMITTIVITY_FARAD_PER_METRE
Permittivity, farad per meter.
@ BLE_GATT_UNIT_IRRADIANCE_WATT_PER_SQUARE_METRE
Irradiance, watt per square meter.
@ BLE_GATT_UNIT_MASS_TONNE
Mass, ton.
@ BLE_GATT_UNIT_EXPOSURE_COULOMB_PER_KILOGRAM
Exposure, coulomb per kilogram.
const FunctionPointerWithContext< GattReadAuthCallbackParams * > & getReadAuthorizationCallback() const
Return the callback registered to handle client's read.
void setReadAuthorizationCallback(T *object, void(T::*member)(GattReadAuthCallbackParams *))
Register the read requests event handler.
GattAttribute * getDescriptor(uint8_t index)
Get this characteristic's descriptor at a specific index.
GattAuthCallbackReply_t authorizeWrite(GattWriteAuthCallbackParams *params)
Invoke the write authorization callback.
ble::att_security_requirement_t SecurityRequirement_t
Security level applied to GATT operations.
void setUpdateSecurityRequirement(SecurityRequirement_t security)
Set the security requirement of update operations.
const GattAttribute & getValueAttribute() const
Get the characteristic's value attribute.
bool isReadAuthorizationEnabled() const
Check whether read authorization is enabled.
void setReadSecurityRequirement(SecurityRequirement_t security)
Set the security of the read operation.
void setWriteAuthorizationCallback(T *object, void(T::*member)(GattWriteAuthCallbackParams *))
Register a callback handling client's write requests or commands.
void setWriteSecurityRequirement(SecurityRequirement_t security)
Set the security requirement of the write operations.
SecurityRequirement_t getWriteSecurityRequirement() const
Get the security requirement of write operations.
GattAttribute & getValueAttribute()
Get the characteristic's value attribute.
@ BLE_GATT_FORMAT_STRUCT
Opaque Structure.
@ BLE_GATT_FORMAT_UINT64
Unsigned 64-bit integer.
@ BLE_GATT_FORMAT_UINT12
Unsigned 12-bit integer.
@ BLE_GATT_FORMAT_SINT48
Signed 48-bit integer.
@ BLE_GATT_FORMAT_SINT24
Signed 24-bit integer.
@ BLE_GATT_FORMAT_UINT32
Unsigned 32-bit integer.
@ BLE_GATT_FORMAT_UINT16
Unsigned 16-bit integer.
@ BLE_GATT_FORMAT_NIBBLE
Unsigned 4-bit integer.
@ BLE_GATT_FORMAT_UINT128
Unsigned 128-bit integer.
@ BLE_GATT_FORMAT_SINT8
Signed 8-bit integer.
@ BLE_GATT_FORMAT_SINT16
Signed 16-bit integer.
@ BLE_GATT_FORMAT_DUINT16
IEEE-20601 format.
@ BLE_GATT_FORMAT_SFLOAT
IEEE-11073 16-bit SFLOAT.
@ BLE_GATT_FORMAT_FLOAT64
IEEE-754 64-bit floating point.
@ BLE_GATT_FORMAT_UINT48
Unsigned 48-bit integer.
@ BLE_GATT_FORMAT_2BIT
Unsigned 2-bit integer.
@ BLE_GATT_FORMAT_FLOAT32
IEEE-754 32-bit floating point.
@ BLE_GATT_FORMAT_RFU
Reserved for future use.
@ BLE_GATT_FORMAT_BOOLEAN
Boolean.
@ BLE_GATT_FORMAT_FLOAT
IEEE-11073 32-bit FLOAT.
@ BLE_GATT_FORMAT_UTF16S
UTF16 string.
@ BLE_GATT_FORMAT_UTF8S
UTF8 string.
@ BLE_GATT_FORMAT_SINT128
Signed 128-bit integer.
@ BLE_GATT_FORMAT_SINT32
Signed 32-bit integer.
@ BLE_GATT_FORMAT_SINT12
Signed 12-bit integer.
@ BLE_GATT_FORMAT_SINT64
Signed 64-bit integer.
@ BLE_GATT_FORMAT_UINT24
Unsigned 24-bit integer.
@ BLE_GATT_FORMAT_UINT8
Unsigned 8-bit integer.
void setWriteAuthorizationCallback(void(*callback)(GattWriteAuthCallbackParams *))
Register a callback handling client's write requests or commands.
SecurityRequirement_t getUpdateSecurityRequirement() const
Get the security requirement of update operations.
@ UUID_RSC_FEATURE_CHAR
Characteristic of the Running Speed and Cadence (RSC) service that exposes features supported by the ...
@ UUID_BATTERY_LEVEL_CHAR
Characteristic of the Battery service, which exposes the current battery level as a percentage.
@ UUID_MANUFACTURER_NAME_STRING_CHAR
Characteristic of the Device Information Service that contains a UTF8 string representing the manufac...
@ UUID_PNP_ID_CHAR
Characteristic of the Device Information Service; it is a set of values used to create a device ID th...
@ UUID_NEW_ALERT_CHAR
Characteristic of the Alert Notification Service that defines the category of the alert and how many ...
@ UUID_DAY_DATE_TIME_CHAR
Not used in a service as a characteristic.
@ UUID_REFERENCE_TIME_INFORMATION_CHAR
Characteristic of the Current Time service that exposes information related to the current time serve...
@ UUID_DATE_TIME_CHAR
Not used in a service as a characteristic.
@ UUID_HEART_RATE_CONTROL_POINT_CHAR
Characteristic of the Heart Rate service used by the client to control the service behavior.
@ UUID_CSC_FEATURE_CHAR
Characteristic of the Cycling Speed and Cadence (CSC) service that exposes features supported by the ...
@ UUID_EXACT_TIME_256_CHAR
Not used in a service as a characteristic.
@ UUID_REPORT_CHAR
Part of the Human Interface Device service.
@ UUID_SCAN_INTERVAL_WINDOW_CHAR
Characteristic of the Scan Parameter service that stores the client's scan parameters (scan interval ...
@ UUID_BOOT_KEYBOARD_OUTPUT_REPORT_CHAR
Part of the Human Interface Device service.
@ UUID_HID_CONTROL_POINT_CHAR
Part of the Human Interface Device service.
@ UUID_INTERMEDIATE_TEMPERATURE_CHAR
Characteristic of the Health Thermometer service that sends intermediate temperature values while the...
@ UUID_TIME_UPDATE_STATE_CHAR
Characteristic of the Reference Time service that informs clients of the status of the time update op...
@ UUID_TIME_WITH_DST_CHAR
Characteristic of the Next DST Change service that returns to clients the time with DST.
@ UUID_GLUCOSE_FEATURE_CHAR
Characteristic of the Glucose service that exposes features supported by the server.
@ UUID_ALERT_LEVEL_CHAR
Control point of the Immediate Alert service that allows the client to command the server to alert to...
@ UUID_REMOVABLE_CHAR
Not used in actual BLE service.
@ UUID_BODY_SENSOR_LOCATION_CHAR
Characteristic of the Heart Rate service that indicate the intended location of the heart rate monito...
@ UUID_TEMPERATURE_CHAR
Characteristic of the Environmental Sensing service that exposes the temperature measurement with a r...
@ UUID_RINGER_SETTING_CHAR
Characteristic of the Phone Alert Status service that returns the ringer setting when read.
@ UUID_GLUCOSE_MEASUREMENT_CONTEXT_CHAR
Characteristic of the Glucose service that sends additional information related to the glucose measur...
@ UUID_BATTERY_LEVEL_STATE_CHAR
Not used in actual BLE service.
@ UUID_HARDWARE_REVISION_STRING_CHAR
Characteristic of the Device Information Service that contains a UTF8 string representing the hardwar...
@ UUID_PROTOCOL_MODE_CHAR
Part of the Human Interface Device service.
@ UUID_SUPPORTED_NEW_ALERT_CATEGORY_CHAR
Characteristic of the Alert Notification Service that notifies the count of new alerts for a given ca...
@ UUID_BOOT_KEYBOARD_INPUT_REPORT_CHAR
Part of the Human Interface Device service.
@ UUID_SCAN_REFRESH_CHAR
Characteristic of the Scan Parameter service that sends a notification to a client when the server re...
@ UUID_MODEL_NUMBER_STRING_CHAR
Characteristic of the Device Information Service that contains a UTF8 string representing the model n...
@ UUID_BLOOD_PRESSURE_FEATURE_CHAR
Describe the features supported by the blood pressure sensor exposed by the Blood Pressure service.
@ UUID_REPORT_MAP_CHAR
Part of the Human Interface Device service.
@ UUID_PRESSURE_CHAR
Characteristic of the Environmental Sensing Service that exposes the pressure measured.
@ UUID_ALERT_STATUS_CHAR
Part of the Alert Notification service, which exposes the count of unread alert events existing in th...
@ UUID_TX_POWER_LEVEL_CHAR
Characteristic of the TX Power service that exposes the current transmission power in dBm.
@ UUID_TEMPERATURE_MEASUREMENT_CHAR
Characteristic of the Health Thermometer service that sends temperature measurement to clients.
@ UUID_SUPPORTED_UNREAD_ALERT_CATEGORY_CHAR
Characteristic of the Alert Notification service, which exposes categories of unread alert supported ...
@ UUID_MEASUREMENT_INTERVAL_CHAR
Characteristic of the Health Thermometer service that exposes the interval time between two measureme...
@ UUID_CSC_MEASUREMENT_CHAR
Characteristic of the Cycling Speed and Cadence (CSC) service that exposes measurements made by the s...
@ UUID_UNREAD_ALERT_CHAR
Characteristic of the Alert Notification Service that shows how many numbers of unread alerts exist i...
@ UUID_RINGER_CONTROL_POINT_CHAR
Characteristic of the Phone Alert Status service that allows a client to configure operating mode.
@ UUID_IEEE_REGULATORY_CERTIFICATION_DATA_LIST_CHAR
Characteristic of the Device Information Service, which exposes various regulatory or certification c...
@ UUID_DST_OFFSET_CHAR
Not used in a service as a characteristic.
@ UUID_SOFTWARE_REVISION_STRING_CHAR
Characteristic of the Device Information Service that contains an UTF8 string representing the softwa...
@ UUID_HUMIDITY_CHAR
Characteristic of the Environmental Sensing service, which exposes humidity measurements.
@ UUID_SYSTEM_ID_CHAR
Characteristic of the Device Information Service that exposes a structure containing an Organizationa...
@ UUID_HID_INFORMATION_CHAR
Part of the Human Interface Device service.
@ UUID_RSC_MEASUREMENT_CHAR
Characteristic of the Running Speed and Cadence (RSC) service that exposes measurements made by the s...
@ UUID_TEMPERATURE_TYPE_CHAR
Characteristic of the Health Thermometer service that describes where the measurement takes place.
@ UUID_BATTERY_POWER_STATE_CHAR
Not used in actual BLE service.
@ UUID_HEART_RATE_MEASUREMENT_CHAR
Characteristic of the Heart Rate that sends heart rate measurements to registered clients.
@ UUID_GLUCOSE_MEASUREMENT_CHAR
Characteristic of the Glucose service that exposes glucose measurements.
@ UUID_SERVICE_REQUIRED_CHAR
Not used in actual BLE service.
@ UUID_TIME_SOURCE_CHAR
Not used in a service as a characteristic.
@ UUID_TIME_UPDATE_CONTROL_POINT_CHAR
Characteristic of the Reference Time service that allows clients to control time update.
@ UUID_SERIAL_NUMBER_STRING_CHAR
Characteristic of the Device Information Service that contains a UTF8 string representing the serial ...
@ UUID_BLOOD_PRESSURE_MEASUREMENT_CHAR
Characteristic of the Blood Pressure service that exposes the measurement of the blood sensor.
@ UUID_DAY_OF_WEEK_CHAR
Not used in a service as a characteristic.
@ UUID_LOCAL_TIME_INFORMATION_CHAR
Characteristic of the current Time service that exposes information about the local time.
@ UUID_INTERMEDIATE_CUFF_PRESSURE_CHAR
Characteristic of the Blood Pressure service, which exposes intermediate cuff pressure measurements.
@ UUID_TIME_ACCURACY_CHAR
Not used in a service as a characteristic.
@ UUID_ALERT_NOTIFICATION_CONTROL_POINT_CHAR
Control point of the Alert Notification service that allows the client finely tune the notification c...
@ UUID_ALERT_CATEGORY_ID_BIT_MASK_CHAR
Not used as a characteristic UUID.
@ UUID_TIME_ZONE_CHAR
Not used in a service as a characteristic.
@ UUID_ALERT_CATEGORY_ID_CHAR
Not used as a characteristic UUID.
@ UUID_CURRENT_TIME_CHAR
Characteristic of the Current Time service that contains the current time.
@ UUID_FIRMWARE_REVISION_STRING_CHAR
Characteristic of the Device Information Service that contains a UTF8 string representing the firmwar...
@ UUID_RECORD_ACCESS_CONTROL_POINT_CHAR
Pulse Oxymeter, Glucose and Continuous Glucose Monitoring services use this control point to provide ...
@ UUID_BOOT_MOUSE_INPUT_REPORT_CHAR
Part of the Human Interface Device service.
Helper class that represents a read-only GattCharacteristic with an array value.
ReadOnlyArrayGattCharacteristic(const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a ReadOnlyGattCharacteristic.
Helper class that represents a read only GattCharacteristic.
ReadOnlyGattCharacteristic(const UUID &uuid, T *valuePtr, uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a ReadOnlyGattCharacteristic.
Helper class that represents a readable and writable GattCharacteristic with an array value.
ReadWriteArrayGattCharacteristic(const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a ReadWriteGattCharacteristic.
Helper class that represents a readable and writable GattCharacteristic.
ReadWriteGattCharacteristic(const UUID &uuid, T *valuePtr, uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a ReadWriteGattCharacteristic.
Representation of a Universally Unique Identifier (UUID).
Helper class that represents a write-only GattCharacteristic with an array value.
WriteOnlyArrayGattCharacteristic(const UUID &uuid, T valuePtr[NUM_ELEMENTS], uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a WriteOnlyGattCharacteristic.
Helper class that represents a write only GattCharacteristic.
WriteOnlyGattCharacteristic(const UUID &uuid, T *valuePtr, uint8_t additionalProperties=BLE_GATT_CHAR_PROPERTIES_NONE, GattAttribute *descriptors[]=nullptr, unsigned numDescriptors=0)
Construct a WriteOnlyGattCharacteristic.
GattAuthCallbackReply_t
Enumeration of allowed values returned by read or write authorization process.
@ AUTH_CALLBACK_REPLY_SUCCESS
Success.
Entry namespace for all BLE API definitions.
GATT read authorization request event.
GattAuthCallbackReply_t authorizationReply
Authorization result.
GATT write authorization request event.
GattAuthCallbackReply_t authorizationReply
Authorization result.
LayoutType value() const
Explicit access to the inner value of the SafeEnum instance.
Security requirement that can be attached to an attribute operation.
static const uint8_t size
Number of bits required to store the value.
type
struct scoped enum wrapped by the class
@ SC_AUTHENTICATED
The operation require encryption with an authenticated peer that paired using secure connection pairi...
@ UNAUTHENTICATED
The operation requires security and there's no requirement towards peer authentication.
@ NONE
The operation does not have security requirements.