Zephyr Project API  3.3.0
A Scalable Open Source RTOS
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 <zephyr/sys/slist.h>
14
22#ifdef __cplusplus
23extern "C" {
24#endif
25
45};
46
73};
74
91 void (*recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops,
92 uint16_t feat);
93
101 void (*sub_end)(const struct bt_mesh_hb_sub *sub);
102
109 void (*pub_sent)(const struct bt_mesh_hb_pub *pub);
110};
111
120#define BT_MESH_HB_CB_DEFINE(_name) \
121 static const STRUCT_SECTION_ITERABLE(bt_mesh_hb_cb, _name)
122
128
134
135#ifdef __cplusplus
136}
137#endif
142#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.
Single-linked list implementation.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Definition: heartbeat.h:76
void(* recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops, uint16_t feat)
Receive callback for heartbeats.
Definition: heartbeat.h:91
void(* sub_end)(const struct bt_mesh_hb_sub *sub)
Subscription end callback for heartbeats.
Definition: heartbeat.h:101
void(* pub_sent)(const struct bt_mesh_hb_pub *pub)
Publication sent callback for heartbeats.
Definition: heartbeat.h:109
Definition: heartbeat.h:27
uint16_t feat
Definition: heartbeat.h:40
uint32_t period
Definition: heartbeat.h:44
uint16_t count
Definition: heartbeat.h:31
uint8_t ttl
Definition: heartbeat.h:33
uint16_t dst
Definition: heartbeat.h:29
uint16_t net_idx
Definition: heartbeat.h:42
Definition: heartbeat.h:48
uint8_t max_hops
Definition: heartbeat.h:72
uint16_t count
Definition: heartbeat.h:58
uint8_t min_hops
Definition: heartbeat.h:65
uint16_t dst
Definition: heartbeat.h:56
uint32_t remaining
Definition: heartbeat.h:52
uint32_t period
Definition: heartbeat.h:50
uint16_t src
Definition: heartbeat.h:54