Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Characteristic of generic type T. More...
#include <cs_Characteristic.h>
Public Member Functions | |
Characteristic () | |
virtual | ~Characteristic () |
cs_ret_code_t | setInitialValue (const T &value) |
Set the initial value. More... | |
T & | getValue () |
Return the (plain text) value. More... | |
cs_ret_code_t | setValue (const T &value) |
Set the new (plain text) value. More... | |
![]() | |
CharacteristicBase () | |
virtual | ~CharacteristicBase () |
cs_ret_code_t | setName (const char *const name) |
Set the name of this characteristic. More... | |
cs_ret_code_t | setUuid (uint16_t uuid) |
Set the UUID of this characteristic. More... | |
cs_ret_code_t | setConfig (const characteristic_config_t &config) |
Set configuration for this characteristic. More... | |
cs_ret_code_t | setEventHandler (const characteristic_callback_t &closure) |
Register an event handler. More... | |
cs_ret_code_t | setValueBuffer (buffer_ptr_t buffer, cs_buffer_size_t size) |
Set the buffer to be used for the (plain text) characteristic value. More... | |
cs_ret_code_t | setInitialValueLength (cs_buffer_size_t size) |
Set the initial value length. More... | |
cs_ret_code_t | init (Service *svc) |
Initialize the characteristic: add it to the softdevice. More... | |
cs_ret_code_t | updateValue (uint16_t length) |
Call this function when you changed the characteristic value. More... | |
cs_ret_code_t | notify (uint16_t length=0, uint16_t offset=0) |
Notify or indicate the characteristic value. More... | |
cs_data_t | getValue () |
Get the current (plain text) value. More... | |
uint16_t | getValueHandle () |
Get the value handle. More... | |
uint16_t | getCccdHandle () |
Get the CCCD handle. More... | |
bool | isSubscribedForNotifications () |
Return true when the client subscribed for notifications or indications. More... | |
Protected Attributes | |
T | _value |
The (plain text) value. More... | |
![]() | |
friend | Service |
Additional Inherited Members | |
![]() | |
void | onWrite (uint16_t length) |
Function to be called by the stack when this characteristic is written over BLE. More... | |
void | onNotificationDone () |
Function to be called by the stack when the notification or indication has been sent. More... | |
void | onCccdWrite (const uint8_t *data, uint16_t size) |
Function to be called by the stack when this characteristic configuration is written over BLE. More... | |
void | onConnect () |
Function to be called by the stack on connect. More... | |
void | onDisconnect () |
Function to be called by the stack on disconnect. More... | |
Characteristic of generic type T.
|
inline |
|
inlinevirtual |
|
inline |
Return the (plain text) value.
|
inline |
Set the initial value.
Must be set before init.
|
inline |
Set the new (plain text) value.
|
protected |
The (plain text) value.