123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEARTBEAT_H_
- #define ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEARTBEAT_H_
- #include <sys/slist.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct bt_mesh_hb_pub {
-
- uint16_t dst;
-
- uint16_t count;
-
- uint8_t ttl;
-
- uint16_t feat;
-
- uint16_t net_idx;
-
- uint32_t period;
- };
- struct bt_mesh_hb_sub {
-
- uint32_t period;
-
- uint32_t remaining;
-
- uint16_t src;
-
- uint16_t dst;
-
- uint16_t count;
-
- uint8_t min_hops;
-
- uint8_t max_hops;
- };
- struct bt_mesh_hb_cb {
-
- void (*recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops,
- uint16_t feat);
-
- void (*sub_end)(const struct bt_mesh_hb_sub *sub);
- };
- #define BT_MESH_HB_CB_DEFINE(_name) \
- static const STRUCT_SECTION_ITERABLE(bt_mesh_hb_cb, _name)
- void bt_mesh_hb_pub_get(struct bt_mesh_hb_pub *get);
- void bt_mesh_hb_sub_get(struct bt_mesh_hb_sub *get);
- #ifdef __cplusplus
- }
- #endif
- #endif
|