Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Health Server Model . More...
Data Structures | |
struct | bt_mesh_health_srv_cb |
Callback function for the Health Server model. More... | |
struct | bt_mesh_health_srv |
Mesh Health Server Model Context. More... | |
Macros | |
#define | BT_MESH_HEALTH_PUB_DEFINE(_name, _max_faults) |
A helper to define a health publication context. | |
#define | BT_MESH_MODEL_HEALTH_SRV(srv, pub, ...) |
Define a new health server model. | |
#define | BT_MESH_HEALTH_TEST_INFO_METADATA_ID 0x0000 |
Health Test Information Metadata ID. | |
#define | BT_MESH_HEALTH_TEST_INFO_METADATA(tests) |
#define | BT_MESH_HEALTH_TEST_INFO(cid, tests...) |
Define a Health Test Info Metadata array. | |
Functions | |
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. | |
Health Server Model .
#define BT_MESH_HEALTH_PUB_DEFINE | ( | _name, | |
_max_faults ) |
#include <zephyr/bluetooth/mesh/health_srv.h>
A helper to define a health publication context.
_name | Name given to the publication context variable. |
_max_faults | Maximum number of faults the element can have. |
#define BT_MESH_HEALTH_TEST_INFO | ( | cid, | |
tests... ) |
#include <zephyr/bluetooth/mesh/health_srv.h>
Define a Health Test Info Metadata array.
cid | Company ID of the Health Test suite. |
tests | A comma separated list of tests. |
#define BT_MESH_HEALTH_TEST_INFO_METADATA | ( | tests | ) |
#include <zephyr/bluetooth/mesh/health_srv.h>
#define BT_MESH_HEALTH_TEST_INFO_METADATA_ID 0x0000 |
#include <zephyr/bluetooth/mesh/health_srv.h>
Health Test Information Metadata ID.
#define BT_MESH_MODEL_HEALTH_SRV | ( | srv, | |
pub, | |||
... ) |
#include <zephyr/bluetooth/mesh/health_srv.h>
Define a new health server model.
Note that this API needs to be repeated for each element that the application wants to have a health server model on. Each instance also needs a unique bt_mesh_health_srv and bt_mesh_model_pub context.
srv | Pointer to a unique struct bt_mesh_health_srv. |
pub | Pointer to a unique struct bt_mesh_model_pub. |
... | Optional Health Server metadata if application is compiled with Large Composition Data Server support, otherwise this parameter is ignored. |
int bt_mesh_health_srv_fault_update | ( | const struct bt_mesh_elem * | elem | ) |
#include <zephyr/bluetooth/mesh/health_srv.h>
Notify the stack that the fault array state of the given element has changed.
This prompts the Health server on this element to publish the current fault array if periodic publishing is disabled.
elem | Element to update the fault state of. |