nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Device Module Set-up APIs

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...
 

Detailed Description

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.

Function Documentation

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.

Parameters
[in]p_ble_evtBLE stack event being dispatched to the function.
Returns
None.
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.

Parameters
[in]Initializationparameters.
Returns
NRF_SUCCESS or appropriate error code, indicating reason for failure.
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.

Parameters
[out]p_appl_instanceApplication Instance Identifier in case registration is successful.
[in]p_appl_paramApplication parameters.
Returns