nRF51 SDK: ble_gatts_attr_t Struct Reference

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

- Data Structures
- Data Structure Index
- Data Fields

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
ble_gatts_attr_t Struct Reference
Generic Attribute Profile (GATT) Server | Structures | Generic Attribute Profile (GATT) Server

GATT Attribute. More...

`#include <ble_gatts.h>`

## Data Fields

ble_uuid_t * | p_uuid
ble_gatts_attr_md_t * | p_attr_md
uint16_t | init_len
uint16_t | init_offs
uint16_t | max_len
uint8_t * | p_value

## Detailed Description

GATT Attribute.

## Field Documentation

uint16_t ble_gatts_attr_t::init_len

Initial attribute value length in bytes.

uint16_t ble_gatts_attr_t::init_offs

Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the attribute value will be left uninitialized.

uint16_t ble_gatts_attr_t::max_len

Maximum attribute value length in bytes, see BLE_GATTS_ATTR_LENS_MAX for maximum values.

ble_gatts_attr_md_t * ble_gatts_attr_t::p_attr_md

Pointer to the attribute metadata structure.

ble_uuid_t * ble_gatts_attr_t::p_uuid

Pointer to the attribute UUID.

uint8_t * ble_gatts_attr_t::p_value

            Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is selected in the attribute metadata, this will have to point to a buffer

that remains valid through the lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any other temporary location. The stack may access that memory directly without the application's knowledge.