nRF5 SDK v13.0.0
Functions

Functions

ret_code_t nrf_ble_cgms_update_status (nrf_ble_cgms_t *p_cgms, nrf_ble_cgm_status_t *p_status)
 Function for updating the status. More...
 
ret_code_t nrf_ble_cgms_init (nrf_ble_cgms_t *p_cgms, const nrf_ble_cgms_init_t *p_cgms_init)
 Function for initializing the CGM Service. More...
 
void nrf_ble_cgms_on_ble_evt (nrf_ble_cgms_t *p_cgms, ble_evt_t *p_ble_evt)
 Function for handling the application's BLE stack events. More...
 
ret_code_t nrf_ble_cgms_meas_create (nrf_ble_cgms_t *p_cgms, ble_cgms_rec_t *p_rec)
 Function for reporting a new glucose measurement to the CGM Service module. More...
 
ret_code_t nrf_ble_cgms_conn_handle_assign (nrf_ble_cgms_t *p_cgms, uint16_t conn_handle)
 Function for assigning a connection handle to a CGM Service instance. More...
 
ret_code_t nrf_ble_cgms_srt_set (nrf_ble_cgms_t *p_cgms, uint16_t run_time)
 Function for setting the Session Run Time attribute value. More...
 

Detailed Description

Function Documentation

ret_code_t nrf_ble_cgms_conn_handle_assign ( nrf_ble_cgms_t p_cgms,
uint16_t  conn_handle 
)

Function for assigning a connection handle to a CGM Service instance.

Parameters
[in]p_cgmsInstance of the CGM Service.
[in]conn_handleConnection Handle to use for this instance of the CGM Service.
Return values
NRF_SUCCESSIf the connection handle was successfully stored in the CGM Service instance.
NRF_ERROR_NULLIf any of the input parameters are NULL.
ret_code_t nrf_ble_cgms_init ( nrf_ble_cgms_t p_cgms,
const nrf_ble_cgms_init_t p_cgms_init 
)

Function for initializing the CGM Service.

Parameters
[out]p_cgmsCGM Service structure. This structure must be supplied by the application. It is initialized by this function and will later be used to identify this particular service instance.
[in]p_cgms_initInformation needed to initialize the service.
Return values
NRF_SUCCESSIf the service was initialized successfully.
NRF_ERROR_NULLIf any of the input parameters are NULL.
Returns
If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
ret_code_t nrf_ble_cgms_meas_create ( nrf_ble_cgms_t p_cgms,
ble_cgms_rec_t p_rec 
)

Function for reporting a new glucose measurement to the CGM 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_cgmsInstance of the CGM Service.
[in]p_recPointer to the glucose record (measurement plus context).
Return values
NRF_SUCCESSIf a measurement was successfully created.
Returns
If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
void nrf_ble_cgms_on_ble_evt ( nrf_ble_cgms_t p_cgms,
ble_evt_t p_ble_evt 
)

Function for handling the application's BLE stack events.

Handles all events from the BLE stack that are of interest to the CGM Service.

Parameters
[in]p_cgmsInstance of the CGM Service.
[in]p_ble_evtEvent received from the BLE stack.
ret_code_t nrf_ble_cgms_srt_set ( nrf_ble_cgms_t p_cgms,
uint16_t  run_time 
)

Function for setting the Session Run Time attribute value.

Parameters
[in]p_cgmsInstance of the CGM Service.
[in]run_timeRun Time that will be displayed in the Session Run Time attribute value.
Return values
NRF_SUCCESSIf the Session Run Time attribute value was set successfully.
Returns
If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.
ret_code_t nrf_ble_cgms_update_status ( nrf_ble_cgms_t p_cgms,
nrf_ble_cgm_status_t p_status 
)

Function for updating the status.

Parameters
[in]p_cgmsInstance of the CGM Service.
[in]p_statusNew status.
Return values
NRF_SUCCESSIf the status was updated successfully.
Returns
If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.

Documentation feedback | Developer Zone | Subscribe | Updated