Functions

nRF5 SDK v16.0.0

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 ( ble_evt_t const *p_ble_evt, void *p_context)
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_cgms Instance of the CGM Service.
[in] conn_handle Connection Handle to use for this instance of the CGM Service.
Return values
NRF_SUCCESS If the connection handle was successfully stored in the CGM Service instance.
NRF_ERROR_NULL If 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_cgms CGM 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_init Information needed to initialize the service.
Return values
NRF_SUCCESS If the service was initialized successfully.
NRF_ERROR_NULL If 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_cgms Instance of the CGM Service.
[in] p_rec Pointer to the glucose record (measurement plus context).
Return values
NRF_SUCCESS If 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 ( ble_evt_t const * p_ble_evt ,
void * p_context
)

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_ble_evt Event received from the BLE stack.
[in] p_context Instance of the CGM Service.
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_cgms Instance of the CGM Service.
[in] run_time Run Time that will be displayed in the Session Run Time attribute value.
Return values
NRF_SUCCESS If 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_cgms Instance of the CGM Service.
[in] p_status New status.
Return values
NRF_SUCCESS If the status was updated successfully.
Returns
If functions from other modules return errors to this function, the SoftDevice Global Error Codes are propagated.