SDK  23.9.2
For IoT System Software Development
Public Member Functions | List of all members
BLERemoteDescriptor Class Reference

A model of remote BLE descriptor. More...

#include <BLERemoteDescriptor.hpp>

Public Member Functions

uint16_t getHandle ()
 Retrieve the handle associated with this remote descriptor. More...
 
BLERemoteCharacteristic * getRemoteCharacteristic ()
 Get the characteristic that owns this descriptor. More...
 
BLEUUID getUUID ()
 Retrieve the UUID associated this remote descriptor. More...
 
std::string readValue (void)
 
uint8_t readUInt8 (void)
 
uint16_t readUInt16 (void)
 
uint32_t readUInt32 (void)
 
std::string toString (void)
 Return a string representation of this BLE Remote Descriptor. @retun A string representation of this BLE Remote Descriptor.
 
void writeValue (uint8_t *data, size_t length, bool response=false)
 
void writeValue (std::string newValue, bool response=false)
 Write data represented as a string to the BLE Remote Descriptor. More...
 
void writeValue (uint8_t newValue, bool response=false)
 Write a byte value to the Descriptor. More...
 

Detailed Description

A model of remote BLE descriptor.

Member Function Documentation

◆ getHandle()

uint16_t BLERemoteDescriptor::getHandle ( )

Retrieve the handle associated with this remote descriptor.

Returns
The handle associated with this remote descriptor.
47  {
48  return m_handle;
49 } // getHandle

◆ getRemoteCharacteristic()

BLERemoteCharacteristic * BLERemoteDescriptor::getRemoteCharacteristic ( )

Get the characteristic that owns this descriptor.

Returns
The characteristic that owns this descriptor.
56  {
57  return m_pRemoteCharacteristic;
58 } // getRemoteCharacteristic

◆ getUUID()

BLEUUID BLERemoteDescriptor::getUUID ( )

Retrieve the UUID associated this remote descriptor.

Returns
The UUID associated this remote descriptor.
65  {
66  return m_uuid;
67 } // getUUID

◆ writeValue() [1/2]

void BLERemoteDescriptor::writeValue ( std::string  newValue,
bool  response = false 
)

Write data represented as a string to the BLE Remote Descriptor.

Parameters
[in]newValueThe data to send to the remote descriptor.
[in]responseTrue if we expect a response.
113  {
114  writeValue((uint8_t*) newValue.data(), newValue.length(), response);
115 } // writeValue

◆ writeValue() [2/2]

void BLERemoteDescriptor::writeValue ( uint8_t  newValue,
bool  response = false 
)

Write a byte value to the Descriptor.

Parameters
[in]Thesingle byte to write.
[in]Trueif we expect a response.
123  {
124  writeValue(&newValue, 1, response);
125 } // writeValue

The documentation for this class was generated from the following files: