This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GATTC, GATTS and GATTSC Context in device manager?

I am reading the device manager code of SDK10.0.0 for nrf51822. I came across the dm_gatts_context_t, dm_gatt_client_context_t. I didn't understand what they store in their structure. Are they necessary? My plan is to write my own lightweight device manager.

Also, i want to use g++ compiler. Is it possible to compile SDK with c++ compiler?

typedef struct
{
   uint32_t flags;                                    /**< Flags identifying the stored attributes. */
   uint32_t size;                                     /**< Size of stored attributes. */
   uint8_t  attributes[DM_GATT_SERVER_ATTR_MAX_SIZE]; /**< Array to hold the server     attributes. */
} dm_gatts_context_t;


typedef struct
{
    void * p_dummy; /**< Placeholder, currently unused. */
} dm_gatt_client_context_t;
Parents
  • Hi,

    dm_gatts_context_t hold the system attributes value of the server for each client once connected. Usually it's the CCCD values on the server. For example if Client A set CCCD to enable notification for a particular characteristic, the attributes will be updated for that client. So that when they connect again, the server automatically set all the system attributes to match with what configured last time for that client. You can find how we use it in gatts_context_apply()

    dm_gatt_client_context_t we haven't really implemented anything with that. I assume it's for the client side.

Reply
  • Hi,

    dm_gatts_context_t hold the system attributes value of the server for each client once connected. Usually it's the CCCD values on the server. For example if Client A set CCCD to enable notification for a particular characteristic, the attributes will be updated for that client. So that when they connect again, the server automatically set all the system attributes to match with what configured last time for that client. You can find how we use it in gatts_context_apply()

    dm_gatt_client_context_t we haven't really implemented anything with that. I assume it's for the client side.

Children
Related