nRF51 SDK: GATTS Command Decoder

| nRF51 SDK

- Home
- Related Pages
- API Reference
- Data Structures

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
GATTS Command Decoder
BLE Serialization Libraries

Decoder for serialized GATTS commands from Application Chip. More...

## Functions

uint32_t | ble_rpc_cmd_gatts_decode (uint8_t *p_command, uint8_t op_code, uint32_t command_len)
| Function for processing the encoded GATTS command from application chip. More...

## Detailed Description

Decoder for serialized GATTS commands from Application Chip.

This file contains the declaration of the function that decodes the serialized GATTS commands from Application Chip and calls the appropriate BLE stack API.

## Function Documentation

uint32_t ble_rpc_cmd_gatts_decode | ( | uint8_t * | p_command,
|  | uint8_t | op_code,
|  | uint32_t | command_len
| ) |  |

Function for processing the encoded GATTS command from application chip.

This function will decode the encoded command and call the appropriate BLE Stack API. It will then create a Command Response packet with the return value from the stack API encoded in it and will send it to the transport layer for transmission to the application controller chip.

Parameters

  [in] | p_command | The encoded command.
  [in] | op_code | Operation code of the command.
  [in] | command_len | Length of the encoded command.

Return values

  NRF_SUCCESS | If the decoding of the command was successful, the SoftDevice API was called, and the command response was sent to peer, otherwise an error code. If the transport layer returns an error code while sending the Command Response, the same error code will be returned by this function (see hci_transport_pkt_write for the list of error codes).