I am trying to only perform calculations for connected ble services.
I am implementing a state machine that monitors the ble evt. I use this for example when to perform calculations required for ble gatt services.
As result I need to know which ble gatt advertised service is connected to so that I only perform the calculations required. The function on_ble_evt refers events for all advertised ble services.
With the ble_nus.c "nordic ble uart" I am able to enable, disable calculations and monitoring by setting a State variable in the on_connect and on_disconnect functions.
How are these functions called? And regarding nrf51 SDK structuring,where are functions for other ble gatt services, such as csc?
What I am really looking for is a connection flow diagram outlining the progression of ble connection events for a device advertising multiple ble services.