CGM Simulator  0.1.3
A CGM simulator to demonstrate the BLE CGM profile v1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Workflow Diagram

Record Access Control Point (RACP)

wf_racp.png
RACP Operation Flowchart
  1. CGM Service registers attributes to the BLE stack
  2. Mobile app connects to the BLE device via the GAP
  3. GAP Service interrogates with the mobile device and establishes a secure connection (if needed).
  4. Mobile app write a command to the RACP characteristic value.
  5. The BLE stack reports the write event to CGM service layer.
  6. WriteAttr Callback function receives the write command and relays the RACP command to the Simulator.
  7. The CGM Service Callback invokes the RACP logic to process the command.
  8. Based on the RACP command type, filtering criteria, the control logic instructs the History Database to retrieve records.
  9. The records are fed back to the control function.
  10. The control function feeds the glucose level records back to the mobile app via notification at the CGM measurement characteristic.
  11. Same as above
  12. Same as above
  13. When the transmission is completed, the operation result is sent back to the mobile app with an indication.
  14. Same as above
  15. Same as above

CGM Specific Operation Control Point (COCP)

wf_cocp.png
COCP Operation Flowchart
  1. CGM Service registers attributes to the BLE stack
  2. Mobile app connects to the BLE device via the GAP
  3. GAP Service interrogates with the mobile device and establishes a secure connection (if needed).
  4. Mobile app write a command to the COCP characteristic value.
  5. The BLE stack reports the write event to CGM service layer.
  6. WriteAttr Callback function receives the write command and relays the COCP command to the Simulator.
  7. The CGM Service Callback invokes the COCP logic to process the command.
  8. Based on the COCP command, the processing unit configures the CGM simulator.
  9. The result of the processing is returned to the control logic.
  10. The control function feeds the COCP result back to the mobile application via indication.
  11. Same as above
  12. Same as above

Characteristic Read

wf_charread.png
Characteristic Read Flowchart
  1. CGM Service registers attributes to the BLE stack
  2. Mobile app connects to the BLE device via the GAP
  3. GAP Service interrogates with the mobile device and establishes a secure connection (if needed).
  4. Mobile app sends a read request for a specific characteristic value.
  5. The BLE stack reports the read event to CGM service layer.
  6. ReadAttr Callback function receives the read command and relays the read request to the Simulator.
  7. The CGM Service Callback makes judgement based on the received read request and activates the relevant control logic (retrieve the characteristic value).
  8. The attribute value is retrieved and packed into a BLE response packet.
  9. The response value is then shown at the exposed characteristic.

Characteristic Write

wf_charwrite.png
Characteristic Write Flowchart
  1. CGM Service registers attributes to the BLE stack
  2. Mobile app connects to the BLE device via the GAP
  3. GAP Service interrogates with the mobile device and establishes a secure connection (if needed).
  4. Mobile app sends a write request for a specific characteristic.
  5. The BLE stack reports the write event to CGM service layer.
  6. WriteAttr Callback function receives the write command and relays the write request to the Simulator.
  7. The CGM Service Callback makes judgement based on the received write request and activates the relevant control logic (to modify the characteristic value).
  8. The local value is updated with a new value.

Glucose Measurement Update

wf_glucoseupdate.png
Glucose Measurement Update Flowchart
  1. CGM Service registers attributes to the BLE stack
  2. Mobile app connects to the BLE device
  3. Mobile app writes commands to start glucose reporting
  4. The BLE stack reports the write event to CGM service layer.
  5. WriteAttr Callback function receives the start command and relays the command packet to Simulator.
  6. The CGM Service Callback makes judgement based on the received command and activates the relevant control functions (start glucose reporting).
  7. Control function starts the glucose value generator
  8. Glucose values are generated and stored into a database
  9. The most current glucose value is packed as a notification packet and returned to the BLE stack
  10. Same as above
  11. Same as above
  12. Same as above
  13. The BLE stack pushes the glucose update to the mobile app in the form of notification