Patched version of nrf51822 FOTA compatible driver, with GPTIO disabled, as it clashed with the mbed definitions...

Fork of nRF51822 by Nordic Semiconductor

Embed: (wiki syntax)

« Back to documentation index

Device Manager Data Types

Device Manager Data Types
[Device Manager]

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

Data Structures

struct  dm_enc_key
 Device Manager Master identification and encryption information. More...
struct  dm_id_key
 Device Manager identity and address information. More...
struct  dm_sign_key
 Device Manager signing information. More...
struct  dm_sec_keyset
 Security keys. More...
struct  dm_sec_keyset_t
 Device Manager security key set. More...
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.
typedef uint8_t dm_connection_instance_t
 Connection Instance.
typedef uint8_t dm_device_instance_t
 Device Instance.
typedef uint8_t dm_service_instance_t
 Service Instance.
typedef uint8_t service_type_t
 Service/Protocol Type Identifier.
typedef struct dm_enc_key dm_enc_key_t
 Device Manager Master identification and encryption information.
typedef struct dm_id_key dm_id_key_t
 Device Manager identity and address information.
typedef struct dm_sign_key dm_sign_key_t
 Device Manager signing information.
typedef struct dm_sec_keyset dm_sec_keys_t
 Security keys.
typedef struct device_handle dm_handle_t
 Device Handle used for unique identification of each peer.
typedef dm_context_t dm_device_context_t
 Device Context.
typedef dm_context_t dm_application_context_t
 Application context.
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.

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.

Definition at line 330 of file device_manager.h.

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.

Definition at line 191 of file device_manager.h.

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.

Definition at line 200 of file device_manager.h.

Device Context.

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

Definition at line 307 of file device_manager.h.

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.

Definition at line 210 of file device_manager.h.

typedef struct dm_enc_key dm_enc_key_t

Device Manager Master identification and encryption information.

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.

Definition at line 374 of file device_manager.h.

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 struct dm_id_key dm_id_key_t

Device Manager identity and address information.

typedef struct dm_sec_keyset dm_sec_keys_t

Security keys.

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.

Definition at line 222 of file device_manager.h.

typedef struct dm_sign_key dm_sign_key_t

Device Manager signing information.

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.

Definition at line 232 of file device_manager.h.


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.

Definition at line 407 of file device_manager.h.