File syn_ble_att.h¶
FileList > ble > syn_ble_att.h
Go to the source code of this file
Zero-Heap Attribute Protocol (ATT) Encoding and Decoding.
#include "../common/syn_defs.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_ble_att_encode_error_rsp (uint8_t req_opcode, uint16_t handle, uint8_t err_code, uint8_t * buf, uint16_t * len) Encode ATT Error Response. |
| SYN_Status | syn_ble_att_encode_mtu_rsp (uint16_t server_mtu, uint8_t * buf, uint16_t * len) Encode ATT Exchange MTU Response. |
| SYN_Status | syn_ble_att_encode_notification (uint16_t handle, const uint8_t * val, uint16_t val_len, uint8_t * buf, uint16_t * len) Encode ATT Handle Value Notification. |
| SYN_Status | syn_ble_att_encode_read_rsp (const uint8_t * val, uint16_t val_len, uint8_t * buf, uint16_t * len) Encode ATT Read Response. |
| SYN_Status | syn_ble_att_encode_write_rsp (uint8_t * buf, uint16_t * len) Encode ATT Write Response. |
Macros¶
Public Functions Documentation¶
function syn_ble_att_encode_error_rsp¶
Encode ATT Error Response.
SYN_Status syn_ble_att_encode_error_rsp (
uint8_t req_opcode,
uint16_t handle,
uint8_t err_code,
uint8_t * buf,
uint16_t * len
)
Parameters:
req_opcodeRequest Opcode.handleAttribute Handle.err_codeError Code.bufOutput Buffer.lenOutput Length Pointer.
Returns:
SYN_OK on success.
function syn_ble_att_encode_mtu_rsp¶
Encode ATT Exchange MTU Response.
Parameters:
server_mtuServer MTU.bufOutput Buffer.lenOutput Length Pointer.
Returns:
SYN_OK on success.
function syn_ble_att_encode_notification¶
Encode ATT Handle Value Notification.
SYN_Status syn_ble_att_encode_notification (
uint16_t handle,
const uint8_t * val,
uint16_t val_len,
uint8_t * buf,
uint16_t * len
)
Parameters:
handleAttribute Handle.valValue bytes.val_lenValue length.bufOutput Buffer.lenOutput Length Pointer.
Returns:
SYN_OK on success.
function syn_ble_att_encode_read_rsp¶
Encode ATT Read Response.
SYN_Status syn_ble_att_encode_read_rsp (
const uint8_t * val,
uint16_t val_len,
uint8_t * buf,
uint16_t * len
)
Parameters:
valValue bytes.val_lenValue length.bufOutput Buffer.lenOutput Length Pointer.
Returns:
SYN_OK on success.
function syn_ble_att_encode_write_rsp¶
Encode ATT Write Response.
Parameters:
bufOutput Buffer.lenOutput Length Pointer.
Returns:
SYN_OK on success.
Macro Definition Documentation¶
define SYN_BLE_ATT_ERR_ATTR_NOT_FOUND¶
Attribute Not Found
define SYN_BLE_ATT_ERR_ATTR_NOT_LONG¶
Attribute Not Long
define SYN_BLE_ATT_ERR_INSUFFICIENT_AUTH¶
Insufficient Authentication
define SYN_BLE_ATT_ERR_INSUFFICIENT_AUTHOR¶
Insufficient Authorization
define SYN_BLE_ATT_ERR_INSUFFICIENT_ENCRYPT¶
Insufficient Encryption
define SYN_BLE_ATT_ERR_INSUFFICIENT_KEY_SIZE¶
Insufficient Key Size
define SYN_BLE_ATT_ERR_INSUFFICIENT_RESOURCES¶
Insufficient Resources
define SYN_BLE_ATT_ERR_INVALID_ATTR_LEN¶
Invalid Attribute Value Length
define SYN_BLE_ATT_ERR_INVALID_HANDLE¶
Invalid Handle
define SYN_BLE_ATT_ERR_INVALID_OFFSET¶
Invalid Offset
define SYN_BLE_ATT_ERR_INVALID_PDU¶
Invalid PDU
define SYN_BLE_ATT_ERR_PREPARE_QUEUE_FULL¶
Prepare Queue Full
define SYN_BLE_ATT_ERR_READ_NOT_PERMITTED¶
Read Not Permitted
define SYN_BLE_ATT_ERR_REQ_NOT_SUPPORTED¶
Request Not Supported
define SYN_BLE_ATT_ERR_UNLIKELY_ERROR¶
Unlikely Error
define SYN_BLE_ATT_ERR_UNSUPPORTED_GROUP_TYPE¶
Unsupported Group Type
define SYN_BLE_ATT_ERR_WRITE_NOT_PERMITTED¶
Write Not Permitted
define SYN_BLE_ATT_MTU_DEFAULT¶
Default minimum ATT MTU size
define SYN_BLE_ATT_OP_ERROR_RSP¶
Error Response
define SYN_BLE_ATT_OP_EXCHANGE_MTU_REQ¶
Exchange MTU Request
define SYN_BLE_ATT_OP_EXCHANGE_MTU_RSP¶
Exchange MTU Response
define SYN_BLE_ATT_OP_FIND_BY_TYPE_VALUE_REQ¶
Find By Type Value Request
define SYN_BLE_ATT_OP_FIND_BY_TYPE_VALUE_RSP¶
Find By Type Value Response
define SYN_BLE_ATT_OP_FIND_INFO_REQ¶
Find Information Request
define SYN_BLE_ATT_OP_FIND_INFO_RSP¶
Find Information Response
define SYN_BLE_ATT_OP_HANDLE_VAL_CONF¶
Handle Value Confirmation
define SYN_BLE_ATT_OP_HANDLE_VAL_IND¶
Handle Value Indication
define SYN_BLE_ATT_OP_HANDLE_VAL_NOTIF¶
Handle Value Notification
define SYN_BLE_ATT_OP_READ_BLOB_REQ¶
Read Blob Request
define SYN_BLE_ATT_OP_READ_BLOB_RSP¶
Read Blob Response
define SYN_BLE_ATT_OP_READ_BY_GROUP_TYPE_REQ¶
Read By Group Type Request
define SYN_BLE_ATT_OP_READ_BY_GROUP_TYPE_RSP¶
Read By Group Type Response
define SYN_BLE_ATT_OP_READ_BY_TYPE_REQ¶
Read By Type Request
define SYN_BLE_ATT_OP_READ_BY_TYPE_RSP¶
Read By Type Response
define SYN_BLE_ATT_OP_READ_REQ¶
Read Request
define SYN_BLE_ATT_OP_READ_RSP¶
Read Response
define SYN_BLE_ATT_OP_WRITE_CMD¶
Write Command
define SYN_BLE_ATT_OP_WRITE_REQ¶
Write Request
define SYN_BLE_ATT_OP_WRITE_RSP¶
Write Response
The documentation for this class was generated from the following file src/syntropic/ble/syn_ble_att.h