请求 PDU RPL 配置客户端
请求 PDU RPL 配置客户端模型是由 Bluetooth mesh 规范定义的基础模型。该模型是可选的,并通过 CONFIG_BT_MESH_SOL_PDU_RPL_CLI 选项启用。
请求 PDU RPL 配置客户端模型在 Bluetooth Mesh 协议规范版本1.1中引入,并支持从支持 请求 PDU RPL 配置服务器 模型的节点的请求重播保护列表(SRPL)中删除地址的功能。
请求 PDU RPL 配置客户端模型使用配置客户端配置的应用程序密钥与请求 PDU RPC 配置服务器模型通信。
如果存在,则只能在主元素上实例化请求 PDU RPL 配置客户端模型。
配置
可以使用传输超时选项 CONFIG_BT_MESH_SOL_PDU_RPL_CLI_timeout 配置请求 PDU RPL 配置客户端模型行为。
CONFIG_BT_MESH_SOL_PDU_RPL_CLI_TIMEOUT 控制请求 PDU RPL 配置客户端等待响应消息到达的时间(以毫秒为单位)。
可以在运行时使用 bt_mesh_sol_pdu_rpl_cli_timeout_set 更改该值。
API 参考
- group bt_mesh_sol_pdu_rpl_cli
Defines
-
BT_MESH_MODEL_SOL_PDU_RPL_CLI(cli_data)
Solicitation PDU RPL Client model composition data entry.
Functions
-
int bt_mesh_sol_pdu_rpl_clear(struct bt_mesh_msg_ctx *ctx, uint16_t range_start, uint8_t range_len, uint16_t *start_rsp, uint8_t *len_rsp)
Remove entries from Solicitation PDU RPL of addresses in given range.
This method can be used asynchronously by setting
start_rsporlen_rspas NULL. This way the method will not wait for response and will return immediately after sending the command.To process the response arguments of an async method, register the
srpl_statuscallback inbt_mesh_sol_pdu_rpl_clistruct.- 参数:
ctx – Message context for the message.
range_start – Start of Unicast address range.
range_len – Length of Unicast address range. Valid values are 0x00 and 0x02 to 0xff.
start_rsp – Range start response buffer.
len_rsp – Range length response buffer.
- 返回:
0 on success, or (negative) error code otherwise.
-
int bt_mesh_sol_pdu_rpl_clear_unack(struct bt_mesh_msg_ctx *ctx, uint16_t range_start, uint8_t range_len)
Remove entries from Solicitation PDU RPL of addresses in given range (unacked).
- 参数:
ctx – Message context for the message.
range_start – Start of Unicast address range.
range_len – Length of Unicast address range. Valid values are 0x00 and 0x02 to 0xff.
- 返回:
0 on success, or (negative) error code otherwise.
-
void bt_mesh_sol_pdu_rpl_cli_timeout_set(int32_t timeout)
Set the transmission timeout value.
- 参数:
timeout – The new transmission timeout in milliseconds.
-
struct bt_mesh_sol_pdu_rpl_cli
Solicitation PDU RPL Client Model Context
Public Members
-
struct bt_mesh_model *model
Solicitation PDU RPL model entry pointer.
-
void (*srpl_status)(struct bt_mesh_sol_pdu_rpl_cli *cli, uint16_t addr, uint16_t range_start, uint8_t range_length)
Optional callback for Solicitation PDU RPL Status messages.
Handles received Solicitation PDU RPL Status messages from a Solicitation PDU RPL server.The
startparam represents the start of range that server has cleared. Thelengthparam represents length of range cleared by server.- Param cli:
Solicitation PDU RPL client that received the status message.
- Param addr:
Address of the sender.
- Param range_start:
Range start value.
- Param range_length:
Range length value.
-
struct bt_mesh_model *model
-
BT_MESH_MODEL_SOL_PDU_RPL_CLI(cli_data)