BGAPI Types#

Common types in BGAPI protocol.

Modules#

uint8array

byte_array

bd_addr

uuid_128

aes_key_128

sl_bt_uuid_16_t

sl_bt_uuid_64_t

Macros#

#define

The length of a BGAPI message header which is 4 bytes.

#define

The length of the BGAPI message payload of a generic error response.

#define

Get the device type of a BGAPI message.

#define

Get the identifier of a BGAPI message including device type, class ID, message type and message ID.

#define

Get the data payload length in a BGAPI message.

#define

The bit indicating whether data of a BGAPI message is encrypted.

#define

Check whether data of a BGAPI message is encrypted.

#define

Construct a BGAPI message header from an event ID and payload length.

Macro Definition Documentation#

SL_BT_TYPE_UINT8ARRARY#

#define SL_BT_TYPE_UINT8ARRARY

Definition at line 75 of file include/sl_bgapi.h

SL_BT_TYPE_BYTE_ARRARY#

#define SL_BT_TYPE_BYTE_ARRARY

Definition at line 84 of file include/sl_bgapi.h

SL_BT_TYPE_BDADDR#

#define SL_BT_TYPE_BDADDR

Definition at line 93 of file include/sl_bgapi.h

SL_BT_TYPE_UUID128#

#define SL_BT_TYPE_UUID128

Definition at line 101 of file include/sl_bgapi.h

SL_BT_TYPE_AES_KEY128#

#define SL_BT_TYPE_AES_KEY128

Definition at line 109 of file include/sl_bgapi.h

SL_BT_TYPE_UUID16#

#define SL_BT_TYPE_UUID16

Definition at line 117 of file include/sl_bgapi.h

SL_BT_TYPE_UUID64#

#define SL_BT_TYPE_UUID64

Definition at line 125 of file include/sl_bgapi.h

SL_BGAPI_MSG_HEADER_LEN#

#define SL_BGAPI_MSG_HEADER_LEN
Value:
(4)

The length of a BGAPI message header which is 4 bytes.


Definition at line 160 of file include/sl_bgapi.h

SL_BGAPI_MSG_ERROR_PAYLOAD_LEN#

#define SL_BGAPI_MSG_ERROR_PAYLOAD_LEN
Value:
(2)

The length of the BGAPI message payload of a generic error response.

See function sl_bgapi_set_error_response for how to generate a generic error response.


Definition at line 168 of file include/sl_bgapi.h

SL_BGAPI_MSG_DEVICE_TYPE#

#define SL_BGAPI_MSG_DEVICE_TYPE
Value:
(HDR)

Get the device type of a BGAPI message.


Definition at line 175 of file include/sl_bgapi.h

SL_BGAPI_MSG_ID#

#define SL_BGAPI_MSG_ID
Value:
(HDR)

Get the identifier of a BGAPI message including device type, class ID, message type and message ID.


Definition at line 183 of file include/sl_bgapi.h

SL_BGAPI_MSG_LEN#

#define SL_BGAPI_MSG_LEN
Value:
(HDR)

Get the data payload length in a BGAPI message.


Definition at line 190 of file include/sl_bgapi.h

SL_BGAPI_BIT_ENCRYPTED#

#define SL_BGAPI_BIT_ENCRYPTED
Value:
(1 << 6)

The bit indicating whether data of a BGAPI message is encrypted.


Definition at line 195 of file include/sl_bgapi.h

SL_BGAPI_MSG_ENCRYPTED#

#define SL_BGAPI_MSG_ENCRYPTED
Value:
(HDR)

Check whether data of a BGAPI message is encrypted.


Definition at line 202 of file include/sl_bgapi.h

SL_BGAPI_MSG_HEADER_FROM_ID_AND_LEN#

#define SL_BGAPI_MSG_HEADER_FROM_ID_AND_LEN
Value:
((uint32_t) (((uint32_t) (evt_id)) \
| (((uint32_t) (payload_len) & 0x00FF) << 8) \
| (((uint32_t) (payload_len) & 0x0700) >> 8))) \

Construct a BGAPI message header from an event ID and payload length.

It is the caller's responsibility to verify that the input values are within valid range.

Returns

  • The header as a uint32_t value


Definition at line 216 of file include/sl_bgapi.h