nRF51 SDK: Service/Protocol Types

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Macros
Service/Protocol Types
Device Manager

Describes the possible types of Service/Protocol Contexts for a bonded/peer device. More...

## Macros

#define | DM_PROTOCOL_CNTXT_NONE 0x00
#define | DM_PROTOCOL_CNTXT_GATT_SRVR_ID 0x01
#define | DM_PROTOCOL_CNTXT_GATT_CLI_ID 0x02
#define | DM_PROTOCOL_CNTXT_ALL (DM_PROTOCOL_CNTXT_GATT_SRVR_ID | DM_PROTOCOL_CNTXT_GATT_CLI_ID)

## Detailed Description

Describes the possible types of Service/Protocol Contexts for a bonded/peer device.

Possible Service/Protocol context per peer device. Device Manager provides the functionality of not only persistently storing the Service/Protocol context but auto loading them when needed. For example system attributes for a GATT Server. However, based on nature of application, not all service types may be needed. In which case application and specify only the service/protocol context it is interested in at the time of registration.

## Macro Definition Documentation

#define DM_PROTOCOL_CNTXT_ALL (DM_PROTOCOL_CNTXT_GATT_SRVR_ID | DM_PROTOCOL_CNTXT_GATT_CLI_ID)

All Service/Protocol Context, this implies that the application wants to associate all Service/Protocol Information with the bonded device. This is configurable based on system requirements, if the application is has only one type of service applications, this define could be altered to reflect the same.

#define DM_PROTOCOL_CNTXT_GATT_CLI_ID 0x02

GATT Client Service Context, this implies the application does associate GATT Client with the peer device and this information will be auto loaded when needed for a bonded device

#define DM_PROTOCOL_CNTXT_GATT_SRVR_ID 0x01

GATT Server Service Context, this implies the application does associate GATT Server with the peer device and this information will be auto loaded when needed for a bonded device

#define DM_PROTOCOL_CNTXT_NONE 0x00

No Service Context, this implies the application does not want to associate any service/protocol context with the peer device