mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble_mesh: Support reliable sending when publishing [Zephyr]
Until now the choice of reliable sending (segmented messages with acks) was implicitly dependent on the size of the payload. Add a new member to the bt_mesh_model_pub to force using segment acks even when the payload would fit a single unsegmented message.
This commit is contained in:
parent
c2e24e306f
commit
2b84b673bf
@ -369,7 +369,8 @@ typedef struct {
|
||||
|
||||
uint16_t publish_addr; /*!< Publish Address. */
|
||||
uint16_t app_idx:12, /*!< Publish AppKey Index. */
|
||||
cred:1; /*!< Friendship Credentials Flag. */
|
||||
cred:1, /*!< Friendship Credentials Flag. */
|
||||
send_rel:1; /*!< Force reliable sending (segment acks) */
|
||||
|
||||
uint8_t ttl; /*!< Publish Time to Live. */
|
||||
uint8_t retransmit; /*!< Retransmit Count & Interval Steps. */
|
||||
|
@ -1024,7 +1024,9 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
|
||||
struct bt_mesh_model_pub *pub = model->pub;
|
||||
struct bt_mesh_app_key *key = NULL;
|
||||
struct net_buf_simple *sdu = NULL;
|
||||
struct bt_mesh_msg_ctx ctx = {0};
|
||||
struct bt_mesh_msg_ctx ctx = {
|
||||
.send_rel = pub->send_rel,
|
||||
};
|
||||
struct bt_mesh_net_tx tx = {
|
||||
.sub = NULL,
|
||||
.ctx = &ctx,
|
||||
|
@ -339,7 +339,8 @@ struct bt_mesh_model_pub {
|
||||
|
||||
u16_t addr; /**< Publish Address. */
|
||||
u16_t key:12, /**< Publish AppKey Index. */
|
||||
cred:1; /**< Friendship Credentials Flag. */
|
||||
cred:1, /**< Friendship Credentials Flag. */
|
||||
send_rel:1; /**< Force reliable sending (segment acks) */
|
||||
|
||||
u8_t ttl; /**< Publish Time to Live. */
|
||||
u8_t retransmit; /**< Retransmit Count & Interval Steps. */
|
||||
|
Loading…
Reference in New Issue
Block a user