Nordic stack and drivers for the mbed BLE API

Dependents:   idd_hw5_bleFanProto

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Glucose Service

Glucose Service module. More...

Data Structures

struct  sfloat_t
 SFLOAT format (IEEE-11073 16-bit FLOAT, meaning 4 bits for exponent (base 10) and 12 bits mantissa) More...
struct  ble_gls_evt_t
 Glucose Service event. More...
struct  ble_gls_meas_t
 Glucose Measurement structure. More...
struct  ble_gls_meas_context_t
 Glucose measurement context structure. More...
struct  ble_gls_rec_t
 Glucose measurement record. More...
struct  ble_gls_init_t
 Glucose Service init structure. More...
struct  ble_gls_s
 Glucose Service structure. More...

Typedefs

typedef struct ble_gls_s ble_gls_t
 Glucose Service structure.
typedef void(* ble_gls_evt_handler_t )(ble_gls_t *p_gls, ble_gls_evt_t *p_evt)
 Glucose Service event handler type.

Enumerations

enum  ble_gls_evt_type_t { BLE_GLS_EVT_NOTIFICATION_ENABLED, BLE_GLS_EVT_NOTIFICATION_DISABLED }
 

Glucose Service event type.

More...

Functions

uint32_t ble_gls_init (ble_gls_t *p_gls, const ble_gls_init_t *p_gls_init)
 Function for initializing the Glucose Service.
void ble_gls_on_ble_evt (ble_gls_t *p_gls, ble_evt_t *p_ble_evt)
 Function for handling the Application's BLE Stack events.
uint32_t ble_gls_glucose_new_meas (ble_gls_t *p_gls, ble_gls_rec_t *p_rec)
 Function for reporting a new glucose measurement to the glucose service module.

Detailed Description

Glucose Service module.

This module implements the Glucose Service.

Note:
The application must propagate BLE stack events to the Glucose Service module by calling ble_gls_on_ble_evt() from the from the ble_stack_handler callback.
Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.

Typedef Documentation

typedef void(* ble_gls_evt_handler_t)(ble_gls_t *p_gls, ble_gls_evt_t *p_evt)

Glucose Service event handler type.

Definition at line 164 of file ble_gls.h.

typedef struct ble_gls_s ble_gls_t

Glucose Service structure.

This contains various status information for the service.

Definition at line 161 of file ble_gls.h.


Enumeration Type Documentation

Glucose Service event type.

Enumerator:
BLE_GLS_EVT_NOTIFICATION_ENABLED 

Glucose value notification enabled event.

BLE_GLS_EVT_NOTIFICATION_DISABLED 

Glucose value notification disabled event.

Definition at line 148 of file ble_gls.h.


Function Documentation

uint32_t ble_gls_glucose_new_meas ( ble_gls_t p_gls,
ble_gls_rec_t p_rec 
)

Function for reporting a new glucose measurement to the glucose service module.

The application calls this function after having performed a new glucose measurement. The new measurement is recorded in the RACP database.

Parameters:
[in]p_glsGlucose Service structure.
[in]p_recPointer to glucose record (measurement plus context).
Returns:
NRF_SUCCESS on success, otherwise an error code.
uint32_t ble_gls_init ( ble_gls_t p_gls,
const ble_gls_init_t p_gls_init 
)

Function for initializing the Glucose Service.

This call allows the application to initialize the Glucose Service.

Parameters:
[out]p_glsGlucose Service structure. This structure will have to be supplied by the application. It will be initialized by this function, and will later be used to identify this particular service instance.
[in]p_gls_initInformation needed to initialize the service.
Returns:
NRF_SUCCESS on successful initialization of service, otherwise an error code.
void ble_gls_on_ble_evt ( ble_gls_t p_gls,
ble_evt_t p_ble_evt 
)

Function for handling the Application's BLE Stack events.

Handles all events from the BLE stack of interest to the Glucose Service.

Parameters:
[in]p_glsGlucose Service structure.
[in]p_ble_evtEvent received from the BLE stack.