Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
Callback function for the Health Server model. More...
#include <health_srv.h>
Data Fields | |
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. | |
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. | |
int(* | fault_clear )(const struct bt_mesh_model *model, uint16_t company_id) |
Clear all registered faults associated with the given Company ID. | |
int(* | fault_test )(const struct bt_mesh_model *model, uint8_t test_id, uint16_t company_id) |
Run a self-test. | |
void(* | attn_on )(const struct bt_mesh_model *model) |
Start calling attention to the device. | |
void(* | attn_off )(const struct bt_mesh_model *model) |
Stop the attention state. | |
Callback function for the Health Server model.
void(* bt_mesh_health_srv_cb::attn_off) (const struct bt_mesh_model *model) |
Stop the attention state.
Any physical activity started to call attention to the device should be stopped.
model |
void(* bt_mesh_health_srv_cb::attn_on) (const struct bt_mesh_model *model) |
Start calling attention to the device.
The attention state is used to map an element address to a physical device. When this callback is called, the device should start some physical procedure meant to call attention to itself, like blinking, buzzing, vibrating or moving. If there are multiple Health server instances on the device, the attention state should also help identify the specific element the server is in.
The attention calling behavior should continue until the attn_off
callback is called.
model | Health Server model to start the attention state of. |
int(* bt_mesh_health_srv_cb::fault_clear) (const struct bt_mesh_model *model, uint16_t company_id) |
Clear all registered faults associated with the given Company ID.
model | Health Server model instance to clear faults of. |
company_id | Company ID to clear faults for. |
int(* bt_mesh_health_srv_cb::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.
Fault values may either be defined by the specification, or by a vendor. Vendor specific faults should be interpreted in the context of the accompanying Company ID. Specification defined faults may be reported for any Company ID, and the same fault may be presented for multiple Company IDs.
All faults shall be associated with at least one Company ID, representing the device vendor or some other vendor whose vendor specific fault values are used.
If there are multiple Company IDs that have active faults, return only the faults associated with one of them at the time. To report faults for multiple Company IDs, interleave which Company ID is reported for each call.
model | Health Server model instance to get faults of. |
test_id | Test ID response buffer. |
company_id | Company ID response buffer. |
faults | Array to fill with current faults. |
fault_count | The number of faults the fault array can fit. Should be updated to reflect the number of faults copied into the array. |
int(* bt_mesh_health_srv_cb::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.
Registered faults are all past and current faults since the last call to fault_clear
. Only faults associated with the given Company ID should be reported.
Fault values may either be defined by the specification, or by a vendor. Vendor specific faults should be interpreted in the context of the accompanying Company ID. Specification defined faults may be reported for any Company ID, and the same fault may be presented for multiple Company IDs.
model | Health Server model instance to get faults of. |
company_id | Company ID to get faults for. |
test_id | Test ID response buffer. |
faults | Array to fill with registered faults. |
fault_count | The number of faults the fault array can fit. Should be updated to reflect the number of faults copied into the array. |
int(* bt_mesh_health_srv_cb::fault_test) (const struct bt_mesh_model *model, uint8_t test_id, uint16_t company_id) |
Run a self-test.
The Health server may support up to 256 self-tests for each Company ID. The behavior for all test IDs are vendor specific, and should be interpreted based on the accompanying Company ID. Test failures should result in changes to the fault array.
model | Health Server model instance to run test for. |
test_id | Test ID to run. |
company_id | Company ID to run test for. |