Debug service API.
More...
Debug service API.
◆ DLGDEBUG_HANDLER
| #define DLGDEBUG_HANDLER |
( |
|
CAT, |
|
|
|
CMD, |
|
|
|
CB, |
|
|
|
UD |
|
) |
| |
Value:{ \
.cat = (CAT), \
.cmd = (CMD), \
.cb = (CB), \
.ud = (UD) \
}
Create debug handler.
- Parameters
-
| [in] | CAT | category |
| [in] | CMD | command |
| [in] | CB | application callback |
| [in] | UD | user data |
◆ dlgdebug_call_cb_t
| typedef void(* dlgdebug_call_cb_t) (uint16_t conn_idx, int argc, char **argv, void *ud) |
Command handler callback.
- Parameters
-
| [in] | conn_idx | connection index |
| [in] | argc | arguments count |
| [in] | argv | string arguments |
| [in] | ud | user data |
◆ dlgdebug_init()
Register DLG debug instance.
Function registers DLG debug service with UUID 6b559111-c4df-4660-818e-234f9e17b290.
- Parameters
-
| [in] | cfg | general service configuration |
- Returns
- service instance
◆ dlgdebug_notify_str()
| void dlgdebug_notify_str |
( |
ble_service_t * |
svc, |
|
|
uint16_t |
conn_idx, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Notification strings.
Send notification to connected peer.
- Parameters
-
| [in] | svc | service instance |
| [in] | conn_idx | connection index |
| [in] | fmt | string data |
◆ dlgdebug_register_handler()
Register handler.
Registers handler when command is written to CP characteristic of Debug Service. Command has format "<cat> <cmd> <...>". Characteristic UUID: 6b559111-c4df-4660-818e-234f9e17b291.
- Parameters
-
| [in] | svc | service instance |
| [in] | cat | category |
| [in] | cmd | command |
| [in] | cb | application callback |
| [in] | ud | user data |
◆ dlgdebug_register_handlers()
Register handlers.
Registers handlers array. See dlgdebug_register_handler function's description for more details.
- Parameters
-
| [in] | svc | service instance |
| [in] | len | array length |
| [in] | handlers | debug handlers array |