10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_SRV_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_SRV_H_
146#define BT_MESH_HEALTH_PUB_DEFINE(_name, _max_faults) \
147 BT_MESH_MODEL_PUB_DEFINE(_name, NULL, (1 + 3 + (_max_faults)))
175#define BT_MESH_MODEL_HEALTH_SRV(srv, pub, ...) \
176 BT_MESH_MODEL_METADATA_CB(BT_MESH_MODEL_ID_HEALTH_SRV, \
177 bt_mesh_health_srv_op, \
180 &bt_mesh_health_srv_cb, __VA_ARGS__)
186#define BT_MESH_HEALTH_TEST_INFO_METADATA_ID 0x0000
188#define BT_MESH_HEALTH_TEST_INFO_METADATA(tests) \
190 .len = ARRAY_SIZE(tests), \
191 .id = BT_MESH_HEALTH_TEST_INFO_METADATA_ID, \
204#define BT_MESH_HEALTH_TEST_INFO(cid, tests...) \
205 BT_BYTES_LIST_LE16(cid), sizeof((uint8_t[]){ tests }), tests
int bt_mesh_health_srv_fault_update(const struct bt_mesh_elem *elem)
Notify the stack that the fault array state of the given element has changed.
Bluetooth Mesh Profile APIs.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Abstraction that describes a Mesh Element.
Definition: access.h:154
Callback function for the Health Server model.
Definition: health_srv.h:28
int(* fault_get_cur)(const struct bt_mesh_model *model, uint8_t *test_id, uint16_t *company_id, uint8_t *faults, uint8_t *fault_count)
Callback for fetching current faults.
Definition: health_srv.h:56
int(* fault_get_reg)(const struct bt_mesh_model *model, uint16_t company_id, uint8_t *test_id, uint8_t *faults, uint8_t *fault_count)
Callback for fetching all registered faults.
Definition: health_srv.h:82
int(* fault_test)(const struct bt_mesh_model *model, uint8_t test_id, uint16_t company_id)
Run a self-test.
Definition: health_srv.h:111
void(* attn_off)(const struct bt_mesh_model *model)
Stop the attention state.
Definition: health_srv.h:137
void(* attn_on)(const struct bt_mesh_model *model)
Start calling attention to the device.
Definition: health_srv.h:128
int(* fault_clear)(const struct bt_mesh_model *model, uint16_t company_id)
Clear all registered faults associated with the given Company ID.
Definition: health_srv.h:94
Mesh Health Server Model Context.
Definition: health_srv.h:150
const struct bt_mesh_health_srv_cb * cb
Optional callback struct.
Definition: health_srv.h:155
struct k_work_delayable attn_timer
Attention Timer state.
Definition: health_srv.h:158
const struct bt_mesh_model * model
Composition data model entry pointer.
Definition: health_srv.h:152
Model callback functions.
Definition: access.h:809
Model opcode handler.
Definition: access.h:359
Abstraction that describes a Mesh Model instance.
Definition: access.h:887
A structure used to submit work after a delay.
Definition: kernel.h:3908