nl::Ble::BleTransportCapabilitiesRequestMessage

摘要

公開屬性

mMtu
uint16_t
已針對這個 BLE 連線協商的 MTU。
mSupportedProtocolVersions[(NUM_SUPPORTED_PROTOCOL_VERSIONS/2)+(NUM_SUPPORTED_PROTOCOL_VERSIONS%2)]
uint8_t
這個節點支援的 BLE 傳輸通訊協定版本清單 (大小為 NUM_SUPPORTED_PROTOCOL_VERSIONS)。
mWindowSize
uint8_t
中央系統提供的初始接收視窗大小和上限,以 GATT 指示酬載的定義。

公用函式

Encode(PacketBuffer *msgBuf) const
必須能夠在 msgBuf 中保留 20 位元組的資料長度。
SetSupportedProtocolVersion(uint8_t index, uint8_t version)
void
在 SupportedProtocolVersions 中,設定指定索引的支援版本值。

公開的靜態函式

Decode(const PacketBuffer & msgBuf, BleTransportCapabilitiesRequestMessage & msg)

公開屬性

mMtu

uint16_t mMtu

已針對這個 BLE 連線協商的 MTU。

BleTransportCapabilitiesRequestMessage 中指定,因為遠端節點可能無法透過自家的 BLE 硬體/軟體堆疊 (例如舊版 Android 平台) 擷取這項資訊。

如果這個值為 0,表示中央無法判斷交涉的 BLE 連線 MTU。

mSupportedProtocolVersions

uint8_t mSupportedProtocolVersions[(NUM_SUPPORTED_PROTOCOL_VERSIONS/2)+(NUM_SUPPORTED_PROTOCOL_VERSIONS%2)]

這個節點支援的 BLE 傳輸通訊協定版本清單 (大小為 NUM_SUPPORTED_PROTOCOL_VERSIONS)。

每個通訊協定版本都會指定為 4 位元無正負號整數。零值代表未使用的陣列元素。從零索引開始計算,第一個零值可指定支援的通訊協定版本清單的結尾。

mWindowSize

uint8_t mWindowSize

中央系統提供的初始接收視窗大小和上限,以 GATT 指示酬載的定義。

公用函式

編碼

BLE_ERROR Encode(
  PacketBuffer *msgBuf
) const 

必須能夠在 msgBuf 中保留 20 位元組的資料長度。

SetSupportedProtocolVersion

void SetSupportedProtocolVersion(
  uint8_t index,
  uint8_t version
)

在 SupportedProtocolVersions 中,設定指定索引的支援版本值。

uint8_t 版本引數會截斷成 4 個最小的位元。索引應為 0 到 SupportProtocolVersions 元素的數量 - 1。

公開的靜態函式

Decode

BLE_ERROR Decode(
  const PacketBuffer & msgBuf,
  BleTransportCapabilitiesRequestMessage & msg
)