BGAPI Types#

Common types in BGAPI protocol.

Data Structures#

struct  

uint8array

Variable-length uint8_t array.

struct  

byte_array

Variable-length int8_t array.

struct  

bd_addr

Bluetooth address.

struct  

uuid_128

128-bit UUID

struct  

aes_key_128

128-bit AES key

struct  

sl_bt_uuid_64_t

64-bit UUID

Macros#

#define 

SL_BGAPI_MSG_HEADER_LEN  (4)

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

#define 

SL_BGAPI_MSG_ID(HDR)   ((HDR) & 0xffff00f8)

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

#define 

SL_BGAPI_MSG_LEN(HDR)   ((((HDR) & 0x7) << 8) (((HDR) & 0xff00) >> 8))

Get the data payload length in a BGAPI message.

Detailed Description#

Common types in BGAPI protocol.

Data Structure Documentation#

uint8array#


struct uint8array

Variable-length uint8_t array.

Data Fields

uint8_t

len

Number of bytes stored in data

uint8_t

data[]

Data bytes

byte_array#

struct byte_array

Variable-length int8_t array.

Data Fields

uint16_t

len

Number of bytes stored in data

int8_t

data[]

Data bytes

bd_addr#

struct bd_addr

Bluetooth address.

Data Fields

uint8_t

addr[6]

Bluetooth address in reverse byte order.

uuid_128#

struct uuid_128

128-bit UUID

Data Fields

uint8_t

data[16]

128-bit UUID

aes_key_128#

struct aes_key_128

128-bit AES key

Data Fields

uint8_t

data[16]

128-bit AES key

sl_bt_uuid_64_t#

struct sl_bt_uuid_64_t

64-bit UUID

Data Fields

uint8_t

data[8]

128-bit UUID

Macro Definition Documentation#

SL_BGAPI_MSG_ID#

#define SL_BGAPI_MSG_ID

(

HDR

)

   ((HDR) & 0xffff00f8)

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

Parameters

HDR

The header of the message as a uint32_t integer

SL_BGAPI_MSG_LEN#

#define SL_BGAPI_MSG_LEN

(

HDR

)

   ((((HDR) & 0x7) << 8)

(((HDR) & 0xff00) >> 8))

Get the data payload length in a BGAPI message.

Parameters

HDR

The header of the message as a uint32_t integer