This is a basic code to be used for Sequana BLE Lab exercises.

Embed: (wiki syntax)

« Back to documentation index

SensorMultiCharacteristic< N, B, V > Class Template Reference

SensorMultiCharacteristic< N, B, V > Class Template Reference

Wrapper, holding multiple BLE characteristics with its value buffers and processing value updates. More...

#include <SensorCharacteristic.h>

Public Member Functions

 SensorMultiCharacteristic (BLE &ble, SingleCharParams params[N], Sensor< V > &sensor)
 Create characteristic set for a sensor.
GattCharacteristic * get_characteristic (size_t idx)
 Get pointer to GATT characteristic object for n'ths characteristic.
size_t get_num ()
 Get number of characteristics in this set.

Detailed Description

template<size_t N, class B, class V>
class sequana::SensorMultiCharacteristic< N, B, V >

Wrapper, holding multiple BLE characteristics with its value buffers and processing value updates.

Useful in a case where a single sensor should return multiple characteristic values.

Parameters:
BClass representing characteristic's binary data buffer.
VData type representing sensor value.

Definition at line 176 of file SensorCharacteristic.h.


Constructor & Destructor Documentation

SensorMultiCharacteristic ( BLE &  ble,
SingleCharParams  params[N],
Sensor< V > &  sensor 
)

Create characteristic set for a sensor.

Parameters:
bleBLE interface
paramsset of characteristics and their parameters
sensorsenasor interface

Definition at line 185 of file SensorCharacteristic.h.


Member Function Documentation

GattCharacteristic* get_characteristic ( size_t  idx )

Get pointer to GATT characteristic object for n'ths characteristic.

Parameters:
idxindex of the characteristic

Definition at line 212 of file SensorCharacteristic.h.

size_t get_num (  )

Get number of characteristics in this set.

Definition at line 220 of file SensorCharacteristic.h.