esp-nimble-cpp 2.0.2
Loading...
Searching...
No Matches
NimBLE2904 Class Reference

Descriptor for Characteristic Presentation Format. More...

#include <NimBLE2904.h>

Inherits NimBLEDescriptor.

Public Member Functions

void setDescription (uint16_t)
 Set the description.
 
void setExponent (int8_t exponent)
 Set the exponent.
 
void setFormat (uint8_t format)
 Set the format.
 
void setNamespace (uint8_t namespace_value)
 Set the namespace.
 
void setUnit (uint16_t unit)
 Set the units for this value.
 
- Public Member Functions inherited from NimBLEDescriptor
 NimBLEDescriptor (const char *uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
 NimBLEDescriptor (const NimBLEUUID &uuid, uint16_t properties, uint16_t maxLen, NimBLECharacteristic *pCharacteristic=nullptr)
 Construct a descriptor.
 
std::string toString () const
 Return a string representation of the descriptor.
 
void setCallbacks (NimBLEDescriptorCallbacks *pCallbacks)
 Set the callback handlers for this descriptor.
 
NimBLECharacteristicgetCharacteristic () const
 Get the characteristic this descriptor belongs to.
 

Detailed Description

Descriptor for Characteristic Presentation Format.

This is a convenience descriptor for the Characteristic Presentation Format which has a UUID of 0x2904.

Member Function Documentation

◆ setDescription()

void NimBLE2904::setDescription ( uint16_t  description)

Set the description.

Parameters
[in]descriptionThe description value to set.

◆ setExponent()

void NimBLE2904::setExponent ( int8_t  exponent)

Set the exponent.

Parameters
[in]exponentThe exponent value to set.

◆ setFormat()

void NimBLE2904::setFormat ( uint8_t  format)

Set the format.

Parameters
[in]formatThe format value to set.

◆ setNamespace()

void NimBLE2904::setNamespace ( uint8_t  namespace_value)

Set the namespace.

Parameters
[in]namespace_valueThe namespace value toset.

◆ setUnit()

void NimBLE2904::setUnit ( uint16_t  unit)

Set the units for this value.

Parameters
[in]unitThe type of units of this characteristic as defined by assigned numbers.

See https://www.bluetooth.com/specifications/assigned-numbers/units