Skip to content

BLEDescriptor

A model of a BLE descriptor.

詳細情報

メンバー

BLEDescriptor()

constructor.

BLEDescriptor::BLEDescriptor(const char *uuid, uint16_t max_len=100)

引数

  • constchar * uuid
  • uint16_t max_len

BLEDescriptor()

constructor.

BLEDescriptor::BLEDescriptor(BLEUUID uuid, uint16_t max_len=100)

引数

  • BLEUUID uuid
  • uint16_t max_len

~BLEDescriptor()

destructor.

BLEDescriptor::~BLEDescriptor()

getHandle()

Get the BLE handle for this descriptor.

uint16_t BLEDescriptor::getHandle()

戻り値

uint16_t The handle for this descriptor.

getLength()

Get the length of the value of this descriptor.

size_t BLEDescriptor::getLength()

戻り値

size_t The length (in bytes) of the value of this descriptor.

getUUID()

Get the UUID of the descriptor.

BLEUUID BLEDescriptor::getUUID()

戻り値

BLEUUID

getValue()

Get the value of this descriptor.

uint8_t * BLEDescriptor::getValue()

戻り値

uint8_t* A pointer to the value of this descriptor.

handleGATTServerEvent()

Handle GATT server events for the descripttor.

void BLEDescriptor::handleGATTServerEvent(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)

引数

  • esp_gatts_cb_event_t event
  • esp_gatt_if_t gatts_if
  • esp_ble_gatts_cb_param_t* param

setAccessPermissions()

void BLEDescriptor::setAccessPermissions(esp_gatt_perm_t perm)

引数

  • esp_gatt_perm_t perm

setCallbacks()

Set the callback handlers for this descriptor.

void BLEDescriptor::setCallbacks(BLEDescriptorCallbacks *pCallbacks)

引数

  • BLEDescriptorCallbacks* pCallbacks An instance of a callback structure used to define any callbacks for the descriptor.

setValue()

Set the value of the descriptor.

void BLEDescriptor::setValue(uint8_t *data, size_t size)

引数

  • uint8_t* data The data to set for the descriptor.
  • size_t size

setValue()

Set the value of the descriptor.

void BLEDescriptor::setValue(std::string value)

引数

  • std::string value The value of the descriptor in string form.

toString()

Return a string representation of the descriptor.

std::string BLEDescriptor::toString()

戻り値

std::string A string representation of the descriptor.