Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
heartbeat.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2020 Nordic Semiconductor ASA
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEARTBEAT_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEARTBEAT_H_
12
13#include <stdint.h>
14
16#include <zephyr/sys/slist.h>
17
25#ifdef __cplusplus
26extern "C" {
27#endif
28
49
77
94 void (*recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops,
95 uint16_t feat);
96
104 void (*sub_end)(const struct bt_mesh_hb_sub *sub);
105
112 void (*pub_sent)(const struct bt_mesh_hb_pub *pub);
113};
114
123#define BT_MESH_HB_CB_DEFINE(_name) \
124 static const STRUCT_SECTION_ITERABLE(bt_mesh_hb_cb, _name)
125
131
137
138#ifdef __cplusplus
139}
140#endif
145#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEARTBEAT_H_ */
void bt_mesh_hb_pub_get(struct bt_mesh_hb_pub *get)
Get the current Heartbeat publication parameters.
void bt_mesh_hb_sub_get(struct bt_mesh_hb_sub *get)
Get the current Heartbeat subscription parameters.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Heartbeat callback structure.
Definition heartbeat.h:79
void(* recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops, uint16_t feat)
Receive callback for heartbeats.
Definition heartbeat.h:94
void(* sub_end)(const struct bt_mesh_hb_sub *sub)
Subscription end callback for heartbeats.
Definition heartbeat.h:104
void(* pub_sent)(const struct bt_mesh_hb_pub *pub)
Publication sent callback for heartbeats.
Definition heartbeat.h:112
Heartbeat Publication parameters.
Definition heartbeat.h:30
uint16_t feat
Bitmap of features that trigger a Heartbeat publication if they change.
Definition heartbeat.h:43
uint32_t period
Publication period in seconds.
Definition heartbeat.h:47
uint16_t count
Remaining publish count.
Definition heartbeat.h:34
uint8_t ttl
Time To Live value.
Definition heartbeat.h:36
uint16_t dst
Destination address.
Definition heartbeat.h:32
uint16_t net_idx
Network index used for publishing.
Definition heartbeat.h:45
Heartbeat Subscription parameters.
Definition heartbeat.h:51
uint8_t max_hops
Maximum hops in received messages, ie the longest registered path from the publishing node to the sub...
Definition heartbeat.h:75
uint16_t count
The number of received Heartbeat messages so far.
Definition heartbeat.h:61
uint8_t min_hops
Minimum hops in received messages, ie the shortest registered path from the publishing node to the su...
Definition heartbeat.h:68
uint16_t dst
Destination address to received Heartbeats on.
Definition heartbeat.h:59
uint32_t remaining
Remaining subscription time in seconds.
Definition heartbeat.h:55
uint32_t period
Subscription period in seconds.
Definition heartbeat.h:53
uint16_t src
Source address to receive Heartbeats from.
Definition heartbeat.h:57