Macros
Attribute Permission
BLE » Generic Attribute Profile (GATT) » Generic Attribute Profile (GATT) Server » Defines

Attribute permission. More...

## Macros
#define | READ_PERM_UNSEC (READ << 8)
| Default Read permission. More...
#define | READ_PERM(sec_level) (READ << 8 | (((sec_level) & SEC_LEVEL_MASK) << READ_POS))
| Read permission set. More...
#define | WRITE_REQ_PERM_UNSEC (WRITE_REQ << 8)
| Default Write Permission. More...
#define | WRITE_REQ_PERM(sec_level) (WRITE_REQ << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))
| Write permission set. More...
#define | WRITE_CMD_PERM_UNSEC (WRITE_CMD << 8)
| Default Write without Response Permission. More...
#define | WRITE_CMD_PERM(sec_level) (WRITE_CMD << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))
| Write without Response permission set. More...
#define | WRITE_SIGNED_PERM_UNSEC (WRITE_SIGNED << 8)
| Default Authenticated Signed Write Permission. More...
#define | WRITE_SIGNED_PERM(sec_level) (WRITE_SIGNED << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))
| Authenticated Signed Write permission set. More...
#define | INDICATE_PERM_UNSEC (INDICATE << 8)
| Default Indicate Permission. More...
#define | INDICATE_PERM(sec_level) (INDICATE << 8 | (((sec_level) & SEC_LEVEL_MASK) << INDICATE_POS))
| Indicate permission set. More...
#define | NOTIFY_PERM_UNSEC (NOTIFY << 8)
| Default Notify Permission. More...
#define | NOTIFY_PERM(sec_level) (NOTIFY << 8 | (((sec_level) & SEC_LEVEL_MASK) << NOTIFY_POS))
| Notify permission set. More...
#define | BROADCAST_ENABLE (BROADCAST << 8)
| Broadcast enable. More...
#define | EXT_PROP_ENABLE (EXT_PROP << 8)
| Extended Properties enable. More...

## Detailed Description

Attribute permission.

15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7–6 | 5–4 | 3–2 | 1–0
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
EXT | WS | I | N | WR | WC | RD | B | NP | IP | WP | RP

Bit [0-1]: Read permission (0 = NOAUTH; 1 = UNAUTH; 2 = AUTH; 3 = SEC_CON)
Bit [2-3]: Write permission (0 = NOAUTH; 1 = UNAUTH; 2 = AUTH; 3 = SEC_CON)
Bit [4-5]: Indicate permission (0 = NOAUTH; 1 = UNAUTH; 2 = AUTH; 3 = SEC_CON)
Bit [6-7]: Notify permission (0 = NOAUTH; 1 = UNAUTH; 2 = AUTH; 3 = SEC_CON)
Bit [8] : Broadcast permission
Bit [9] : Read accepted
Bit [10] : Write Command accepted
Bit [11] : Write Request accepted
Bit [12] : Notify accepted
Bit [13] : Indicate accepted
Bit [14] : Write Signed accepted
Bit [15] : Extended Properties present

## Macro Definition Documentation

## ◆ BROADCAST_ENABLE

#define BROADCAST_ENABLE (BROADCAST << 8)

Broadcast enable.

Definition at line 185 of file ble_gatts.h.

## ◆ EXT_PROP_ENABLE

#define EXT_PROP_ENABLE (EXT_PROP << 8)

Extended Properties enable.

Definition at line 186 of file ble_gatts.h.

## ◆ INDICATE_PERM

#define INDICATE_PERM | ( |  | sec_level | ) | (INDICATE << 8 | (((sec_level) & SEC_LEVEL_MASK) << INDICATE_POS))

Indicate permission set.

See Attribute and Service Access Rights.

Definition at line 181 of file ble_gatts.h.

## ◆ INDICATE_PERM_UNSEC

#define INDICATE_PERM_UNSEC (INDICATE << 8)

Default Indicate Permission.

Definition at line 179 of file ble_gatts.h.

## ◆ NOTIFY_PERM

#define NOTIFY_PERM | ( |  | sec_level | ) | (NOTIFY << 8 | (((sec_level) & SEC_LEVEL_MASK) << NOTIFY_POS))

Notify permission set.

See Attribute and Service Access Rights.

Definition at line 184 of file ble_gatts.h.

## ◆ NOTIFY_PERM_UNSEC

#define NOTIFY_PERM_UNSEC (NOTIFY << 8)

Default Notify Permission.

Definition at line 182 of file ble_gatts.h.

## ◆ READ_PERM

#define READ_PERM | ( |  | sec_level | ) | (READ << 8 | (((sec_level) & SEC_LEVEL_MASK) << READ_POS))

Read permission set.

See Attribute and Service Access Rights.

Definition at line 169 of file ble_gatts.h.

## ◆ READ_PERM_UNSEC

#define READ_PERM_UNSEC (READ << 8)

Default Read permission.

Definition at line 167 of file ble_gatts.h.

## ◆ WRITE_CMD_PERM

#define WRITE_CMD_PERM | ( |  | sec_level | ) | (WRITE_CMD << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))

Write without Response permission set.

See Attribute and Service Access Rights.

Definition at line 175 of file ble_gatts.h.

## ◆ WRITE_CMD_PERM_UNSEC

#define WRITE_CMD_PERM_UNSEC (WRITE_CMD << 8)

Default Write without Response Permission.

Definition at line 173 of file ble_gatts.h.

## ◆ WRITE_REQ_PERM

#define WRITE_REQ_PERM | ( |  | sec_level | ) | (WRITE_REQ << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))

Write permission set.

See Attribute and Service Access Rights.

Definition at line 172 of file ble_gatts.h.

## ◆ WRITE_REQ_PERM_UNSEC

#define WRITE_REQ_PERM_UNSEC (WRITE_REQ << 8)

Default Write Permission.

Definition at line 170 of file ble_gatts.h.

## ◆ WRITE_SIGNED_PERM

#define WRITE_SIGNED_PERM | ( |  | sec_level | ) | (WRITE_SIGNED << 8 | (((sec_level) & SEC_LEVEL_MASK) << WRITE_POS))

Authenticated Signed Write permission set.

See Attribute and Service Access Rights.

Definition at line 178 of file ble_gatts.h.

## ◆ WRITE_SIGNED_PERM_UNSEC

#define WRITE_SIGNED_PERM_UNSEC (WRITE_SIGNED << 8)

Default Authenticated Signed Write Permission.

Definition at line 176 of file ble_gatts.h.