nRF51 SDK - S310 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Device Manager Data Types

This section describes all the data types exposed by the module to the application. More...

Data Structures

struct  device_handle
 Device Handle used for unique identification of each peer. More...
 
struct  dm_context_t
 Definition of Data Context. More...
 
struct  dm_service_context_t
 Service Context. More...
 
union  dm_event_param_t
 Event parameters. More...
 
struct  dm_event_t
 Asynchronous events details notified to the application by the module. More...
 
struct  dm_init_param_t
 Initialization Parameters. More...
 
struct  dm_application_param_t
 Application Registration Parameters. More...
 

Typedefs

typedef uint8_t dm_application_instance_t
 Application Instance. More...
 
typedef uint8_t dm_connection_instance_t
 Connection Instance. More...
 
typedef uint8_t dm_device_instance_t
 Device Instance. More...
 
typedef uint8_t dm_service_instance_t
 Service Instance. More...
 
typedef uint8_t service_type_t
 Service/Protocol Type Identifier. More...
 
typedef struct device_handle dm_handle_t
 Device Handle used for unique identification of each peer. More...
 
typedef dm_context_t dm_device_context_t
 Device Context. More...
 
typedef dm_context_t dm_application_context_t
 Application context. More...
 
typedef api_result_t(* dm_event_cb_t )(dm_handle_t const *p_handle, dm_event_t const *p_event, api_result_t event_result)
 Event notification callback registered by application with the module. More...
 

Enumerations

enum  dm_security_status_t {
  NOT_ENCRYPTED,
  ENCRYPTION_IN_PROGRESS,
  ENCRYPTED
}
 Defines possible security status/states. More...
 

Detailed Description

This section describes all the data types exposed by the module to the application.

Typedef Documentation

Application context.

The application context can be used by the application to map any application level information that is to be mapped with a particular peer. For bonded peers, this information will be stored by the bond manager persistently. Note that the device manager treats this information as an opaque block of bytes. Necessary APIs to get and set this context for a peer have been provided.

typedef uint8_t dm_application_instance_t

Application Instance.

Application instance uniquely identifies an application. The identifier is allocated by the device manager when application registers with the module. The application is expected to identify itself with this instance identifier when initiating subsequent requests. Application should use the utility API dm_application_instance_set in order to set its application instance in dm_handle_t needed for all subsequent APIs. See also dm_register.

typedef uint8_t dm_connection_instance_t

Connection Instance.

Identifies connection instance for an active device. This instance is allocated by the device manager when a connection is established and is notified with DM_EVT_CONNECTION with the event result NRF_SUCCESS.

Device Context.

Defines "device context" type for a device managed by device manager.

typedef uint8_t dm_device_instance_t

Device Instance.

Uniquely identifies a bonded peer device. The peer device may or may not be connected. In case of the central: The bonded device instance to identify the peer is allocated when bonding procedure is initiated by the central using dm_security_setup_req. In case of the peripheral: When the bonding procedure is successful, the DM_EVT_SECURITY_SETUP_COMPLETE event with success event result, is received. In case the module cannot add more bonded devices, no instance is allocated, this is indicated by an appropriate error code for the API/event as the case may be. Application can choose to disconnect the link.

typedef api_result_t(* dm_event_cb_t)(dm_handle_t const *p_handle, dm_event_t const *p_event, api_result_t event_result)

Event notification callback registered by application with the module.

Event notification callback registered by application with the module when registering the module using dm_register API.

Parameters
[in]p_handleIdentifies the peer for which the event is being notified.
[in]p_eventIdentifies the event, any associated parameters and parameter length. See Device Manager Events for details on event types and their significance.
[in,out]event_resultProvide additional information on the event. In addition to SDK error codes there is also a return value indicating if maximum number of connections has been reached when connecting or bonding.
Return values
NRF_SUCCESSon success, or a failure to indicate if it could handle the event successfully. There is no action taken in case application returns a failure.
typedef struct device_handle dm_handle_t

Device Handle used for unique identification of each peer.

This data type is used to uniquely identify each peer device. A peer device could be active and/or bonded. Therefore an instance for active and bonded is provided. However, the application is expected to treat this is an opaque structure and use this for all API interactions once stored on appropriate events. See Device Manager Events.

typedef uint8_t dm_service_instance_t

Service Instance.

Uniquely identifies a peer device. The peer device may or may not be connected. This instance is allocated by the device manager when a device is bonded and is notified when security procedures have been initiated. Security Procedures initiation is notified with DM_SECURITY_SETUP_IND with success event result. In case the event result indicates that the module cannot add more bonded devices, no instance is allocated. Application can chose to disconnect the link.

typedef uint8_t service_type_t

Service/Protocol Type Identifier.

Uniquely identifies a service or a protocol type. Service/Protocol Type identification is needed as each service/protocol can have its own contextual data. This allows the peer to access more than one service at a time. Service/Protocol Types describes the list of services/protocols supported.

Enumeration Type Documentation

Defines possible security status/states.

Defines possible security status/states of a link when requested by application using the dm_security_status_req.

Enumerator
NOT_ENCRYPTED 

The link does not security.

ENCRYPTION_IN_PROGRESS 

Security is in progress of being established.

ENCRYPTED 

The link is secure.