esp-nimble-cpp
1.3.2
|
A model of remote BLE descriptor. More...
Public Member Functions | |
uint16_t | getHandle () |
Retrieve the handle associated with this remote descriptor. More... | |
NimBLERemoteCharacteristic * | getRemoteCharacteristic () |
Get the characteristic that owns this descriptor. More... | |
NimBLEUUID | getUUID () |
Retrieve the UUID associated this remote descriptor. More... | |
std::string | readValue () |
Read the value of the remote descriptor. More... | |
template<typename T > | |
T | readValue (bool skipSizeCheck=false) |
A template to convert the remote descriptor data to <type>. More... | |
uint8_t | readUInt8 () __attribute__((deprecated("Use template readValue<uint8_t>()"))) |
Read a byte value. More... | |
uint16_t | readUInt16 () __attribute__((deprecated("Use template readValue<uint16_t>()"))) |
Read an unsigned 16 bit value. More... | |
uint32_t | readUInt32 () __attribute__((deprecated("Use template readValue<uint32_t>()"))) |
Read an unsigned 32 bit value. More... | |
std::string | toString (void) |
Return a string representation of this Remote Descriptor. More... | |
bool | writeValue (const uint8_t *data, size_t length, bool response=false) |
Write data to the BLE Remote Descriptor. More... | |
bool | writeValue (const std::string &newValue, bool response=false) |
Write data represented as a string to the BLE Remote Descriptor. More... | |
template<typename T > | |
bool | writeValue (const T &s, bool response=false) |
Convenience template to set the remote descriptor value to <type>val. More... | |
A model of remote BLE descriptor.
uint16_t NimBLERemoteDescriptor::getHandle | ( | ) |
Retrieve the handle associated with this remote descriptor.
NimBLERemoteCharacteristic * NimBLERemoteDescriptor::getRemoteCharacteristic | ( | ) |
Get the characteristic that owns this descriptor.
NimBLEUUID NimBLERemoteDescriptor::getUUID | ( | ) |
Retrieve the UUID associated this remote descriptor.
uint16_t NimBLERemoteDescriptor::readUInt16 | ( | ) |
Read an unsigned 16 bit value.
uint32_t NimBLERemoteDescriptor::readUInt32 | ( | ) |
Read an unsigned 32 bit value.
uint8_t NimBLERemoteDescriptor::readUInt8 | ( | ) |
std::string NimBLERemoteDescriptor::readValue | ( | ) |
Read the value of the remote descriptor.
|
inline |
A template to convert the remote descriptor data to <type>.
T | The type to convert the data to. |
[in] | skipSizeCheck | If true it will skip checking if the data size is less than sizeof(<type>) . |
sizeof(<type>)
.Use: readValue<type>(skipSizeCheck);
std::string NimBLERemoteDescriptor::toString | ( | void | ) |
Return a string representation of this Remote Descriptor.
bool NimBLERemoteDescriptor::writeValue | ( | const std::string & | newValue, |
bool | response = false |
||
) |
Write data represented as a string to the BLE Remote Descriptor.
[in] | newValue | The data to send to the remote descriptor. |
[in] | response | True if we expect a response. |
|
inline |
Convenience template to set the remote descriptor value to <type>val.
[in] | s | The value to write. |
[in] | response | True == request write response. |
bool NimBLERemoteDescriptor::writeValue | ( | const uint8_t * | data, |
size_t | length, | ||
bool | response = false |
||
) |
Write data to the BLE Remote Descriptor.
[in] | data | The data to send to the remote descriptor. |
[in] | length | The length of the data to send. |
[in] | response | True if we expect a write response. |