nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
0xA9 - sd_ble_gatts_sys_attr_set

Function packet format

Frame format encoding of the sd_ble_gatts_sys_attr_set packet.

Operation Code = 0xA9 (169) for sd_ble_gatts_sys_attr_set, see BLE_GATTS_SVCS.

The parameters provided as input to sd_ble_gatts_sys_attr_set are encoded in the following order:

- 1 byte: Operation Code, Value = 0xA9 (169)
- 2 bytes:Connection Handle
- 1 byte:System Attributes Present
0x00 if System Attributes is a NULL pointer
0x01 otherwise
- 2 bytes:Conditional: Length of System Attributes Data
- 0 ... n bytesConditional: System Attributes Data
The number, n, of bytes encoded is defined in the System Attributes Data Length field.


sys_attr_set_packet.png
Figure 1: Packet format for sd_ble_gatts_sys_attr_set function.


Response packet format

Frame format encoding of the sd_ble_gatts_sys_attr_set response packet.

In case of an error, the following data is encoded:

- 1 byte:Operation Code, Value = 0xA9 (169)
- 4 byte:nRF Error Code


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gatts_sys_attr_set error response.

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS, the following data is encoded:

- 1 byte: Operation Code, Value = 0xA9 (169)
- 4 bytes:nRF Error Code


default_success_response_packet.png
Figure 3: Packet format for sd_ble_gatts_sys_attr_set success response.