Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <access.h>
Data Fields | |
struct bt_mesh_model * | mod |
uint16_t | addr |
uint16_t | key:12 |
uint16_t | cred:1 |
uint16_t | send_rel:1 |
uint16_t | fast_period:1 |
uint8_t | ttl |
uint8_t | retransmit |
uint8_t | period |
uint8_t | period_div:4 |
uint8_t | count:4 |
uint32_t | period_start |
struct net_buf_simple * | msg |
Publication buffer, containing the publication message. More... | |
int(* | update )(struct bt_mesh_model *mod) |
Callback for updating the publication buffer. More... | |
struct k_work_delayable | timer |
Model publication context.
The context should primarily be created using the BT_MESH_MODEL_PUB_DEFINE macro.
uint16_t bt_mesh_model_pub::addr |
Publish Address.
uint8_t bt_mesh_model_pub::count |
Transmissions left.
uint16_t bt_mesh_model_pub::cred |
Friendship Credentials Flag.
uint16_t bt_mesh_model_pub::fast_period |
Use FastPeriodDivisor
uint16_t bt_mesh_model_pub::key |
Publish AppKey Index.
struct bt_mesh_model* bt_mesh_model_pub::mod |
The model the context belongs to. Initialized by the stack.
struct net_buf_simple* bt_mesh_model_pub::msg |
Publication buffer, containing the publication message.
This will get correctly created when the publication context has been defined using the BT_MESH_MODEL_PUB_DEFINE macro.
BT_MESH_MODEL_PUB_DEFINE(name, update, size);
uint8_t bt_mesh_model_pub::period |
Publish Period.
uint8_t bt_mesh_model_pub::period_div |
Divisor for the Period.
uint32_t bt_mesh_model_pub::period_start |
Start of the current period.
uint8_t bt_mesh_model_pub::retransmit |
Retransmit Count & Interval Steps.
uint16_t bt_mesh_model_pub::send_rel |
Force reliable sending (segment acks)
struct k_work_delayable bt_mesh_model_pub::timer |
Publish Period Timer. Only for stack-internal use.
uint8_t bt_mesh_model_pub::ttl |
Publish Time to Live.
int(* bt_mesh_model_pub::update) (struct bt_mesh_model *mod) |
Callback for updating the publication buffer.
When set to NULL, the model is assumed not to support periodic publishing. When set to non-NULL the callback will be called periodically and is expected to update bt_mesh_model_pub::msg with a valid publication message.
If the callback returns non-zero, the publication is skipped and will resume on the next periodic publishing interval.
mod | The Model the Publication Context belogs to. |