nRF51 SDK
|
Initialization & registration APIs that are pre-requisite for all other module procedures. More...
Functions | |
api_result_t | dm_init (dm_init_param_t const *p_init_param) |
Module Initialization Routine. More... | |
api_result_t | dm_register (dm_application_instance_t *p_appl_instance, dm_application_param_t const *p_appl_param) |
Application registration routine. More... | |
void | dm_ble_evt_handler (ble_evt_t *p_ble_evt) |
BLE Event Handler. More... | |
Initialization & registration APIs that are pre-requisite for all other module procedures.
This section describes Module Initialization & Registration APIs needed to be set-up by the application before device manager can start managing devices and device contexts for the application.
void dm_ble_evt_handler | ( | ble_evt_t * | p_ble_evt | ) |
BLE Event Handler.
This routine should be called from BLE stack event dispatcher for the module to function as expected.
[in] | p_ble_evt | BLE stack event being dispatched to the function. |
api_result_t dm_init | ( | dm_init_param_t const * | p_init_param | ) |
Module Initialization Routine.
Initializes module. To be called once before any other APIs of the module are used.
[in] | Initialization | parameters. |
api_result_t dm_register | ( | dm_application_instance_t * | p_appl_instance, |
dm_application_param_t const * | p_appl_param | ||
) |
Application registration routine.
This routine is used by the application to register for asynchronous events with the device manager. The application, during registration also indicates the services that it intends to support on this instance. It is possible to register multiple times with the device manager. At least one instance shall be registered with the device manager after module has been initialized. Maximum number of application instances device manager can support is determined DM_MAX_APPLICATIONS.
All applications shall be registered before initiating or accepting connections from peer is a must.
[out] | p_appl_instance | Application Instance Identifier in case registration is successful. |
[in] | p_appl_param | Application parameters. |