BLE Sensor

Libraries used for BLE Sensors. More...

Data Structures

struct  ble_sensor_descriptor_data_t
 BLE sensor descriptor data. More...
 
struct  ble_sensor_characteristic_data_t
 BLE sensor characteristic data. More...
 
struct  ble_sensor_service_data_t
 BLE sensor service data. More...
 
struct  ble_sensor_descriptor_t
 BLE sensor descriptor. More...
 
struct  ble_sensor_characteristic_t
 BLE sensor characteristic. More...
 
struct  ble_sensor_service_t
 BLE sensor service. More...
 
struct  ble_sensor_t
 BLE sensor. More...
 

Enumerations

enum  ble_sensor_notification_result_t
 BLE sensor notification callback result type.
 

Functions

zos_result_t ble_sensor_connect (ble_sensor_t *sensor, const zos_ble_address_t *address)
 Connect to a BLE sensor. More...
 
zos_result_t ble_sensor_disconnect (ble_sensor_t *sensor)
 Disconnect from a BLE sensor. More...
 
zos_result_t ble_sensor_read_characteristic (ble_sensor_t *sensor, ble_sensor_characteristic_t *characteristic)
 Read data from a BLE sensor characteristic. More...
 
zos_result_t ble_sensor_write_characteristic (ble_sensor_t *sensor, ble_sensor_characteristic_t *characteristic, ble_sensor_characteristic_data_t *data)
 Write data to a BLE sensor characteristic. More...
 
zos_result_t ble_sensor_read_descriptor (ble_sensor_t *sensor, ble_sensor_descriptor_t *descriptor)
 Read data from a BLE sensor descriptor. More...
 
zos_result_t ble_sensor_write_descriptor (ble_sensor_t *sensor, ble_sensor_descriptor_t *descriptor, ble_sensor_descriptor_data_t *data)
 Write data to a BLE sensor descriptor. More...
 
zos_result_t ble_sensor_enable_notification (ble_sensor_t *sensor, ble_sensor_descriptor_t *ccc)
 Enable notification on the characteristic that includes the given Client Characteristic Configuration (CCC) descriptor. More...
 
zos_result_t ble_sensor_disable_notification (ble_sensor_t *sensor, ble_sensor_descriptor_t *ccc)
 Disable notification on the characteristic that includes the given CCC descriptor. More...
 

Detailed Description

Libraries used for BLE Sensors.

Function Documentation

zos_result_t ble_sensor_connect ( ble_sensor_t sensor,
const zos_ble_address_t address 
)

Connect to a BLE sensor.

Parameters
[in]sensorBLE sensor instance
[in]addressBLE address of sensor to connect to
Returns
zos_result_t
zos_result_t ble_sensor_disable_notification ( ble_sensor_t sensor,
ble_sensor_descriptor_t ccc 
)

Disable notification on the characteristic that includes the given CCC descriptor.

Parameters
[in]sensorBLE sensor instance
[in]cccCCC descriptor instance
Returns
zos_result_t
zos_result_t ble_sensor_disconnect ( ble_sensor_t sensor)

Disconnect from a BLE sensor.

Parameters
[in]sensorBLE sensor instance to disconnect from
Returns
zos_result_t
zos_result_t ble_sensor_enable_notification ( ble_sensor_t sensor,
ble_sensor_descriptor_t ccc 
)

Enable notification on the characteristic that includes the given Client Characteristic Configuration (CCC) descriptor.

Parameters
[in]sensorBLE sensor instance
[in]cccCCC descriptor instance
Returns
zos_result_t
zos_result_t ble_sensor_read_characteristic ( ble_sensor_t sensor,
ble_sensor_characteristic_t characteristic 
)

Read data from a BLE sensor characteristic.

Result will be received via the characteristic data callback.

Parameters
[in]sensorBLE sensor instance
[in]characteristicBLE sensor characteristic instance to read
Returns
zos_result_t
zos_result_t ble_sensor_read_descriptor ( ble_sensor_t sensor,
ble_sensor_descriptor_t descriptor 
)

Read data from a BLE sensor descriptor.

Result will be received via the descriptor data callback.

Parameters
[in]sensorBLE sensor instance
[in]characteristicBLE sensor descriptor instance to read from
Returns
zos_result_t
zos_result_t ble_sensor_write_characteristic ( ble_sensor_t sensor,
ble_sensor_characteristic_t characteristic,
ble_sensor_characteristic_data_t data 
)

Write data to a BLE sensor characteristic.

Result will be reported via the characteristic write callback.

Parameters
[in]sensorBLE sensor instance
[in]characteristicBLE sensor characteristic instance to write data to
[in]datadata to write
Returns
zos_result_t
zos_result_t ble_sensor_write_descriptor ( ble_sensor_t sensor,
ble_sensor_descriptor_t descriptor,
ble_sensor_descriptor_data_t data 
)

Write data to a BLE sensor descriptor.

Result will be reported via the descriptor write callback.

Parameters
[in]sensorBLE sensor instance
[in]characteristicBLE sensor descriptor instance to write data to
[in]datadata to write
Returns
zos_result_t