nl::Ble::BleTransportCapabilitiesRequestMessage

摘要

公共属性

mMtu
uint16_t
已针对此 BLE 连接协商的 MTU。
mSupportedProtocolVersions[(NUM_SUPPORTED_PROTOCOL_VERSIONS/2)+(NUM_SUPPORTED_PROTOCOL_VERSIONS%2)]
uint8_t
大小为 NUM_SUPPORTED_PROTOCOL_VERSIONS 的数组,其中列出了此节点支持的 BLE 传输协议的版本。
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)]

大小为 NUM_SUPPORTED_PROTOCOL_VERSIONS 的数组,其中列出了此节点支持的 BLE 传输协议的版本。

每个协议版本都指定为一个 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 到 SupportedProtocolVersions 元素的数量 - 1。

公共静态函数

Decode

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