mesh: health server health_fault_get_handler implementation

This commit is contained in:
Milanka Ringwald 2019-07-05 18:19:51 +02:00 committed by Matthias Ringwald
parent 9ca0fe87d6
commit f346d6e034
3 changed files with 17 additions and 2 deletions

View File

@ -53,7 +53,7 @@ LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
LDFLAGS += -lCppUTest -lCppUTestExt
mesh: mesh.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} pb_adv.o pb_gatt.o mesh_foundation.o mesh_provisioning_service_server.o mesh_crypto.o provisioning_device.o mesh_network.o mesh_peer.o mesh_lower_transport.o mesh_upper_transport.o mesh_virtual_addresses.o mesh_keys.o mesh_proxy.o mesh_access.o mesh_configuration_server.o mesh_generic_server.o mesh_generic_level_server.o mesh_generic_client.o mesh_generic_level_client.o mesh.o
mesh: mesh.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} pb_adv.o pb_gatt.o mesh_foundation.o mesh_provisioning_service_server.o mesh_crypto.o provisioning_device.o mesh_network.o mesh_peer.o mesh_lower_transport.o mesh_upper_transport.o mesh_virtual_addresses.o mesh_keys.o mesh_proxy.o mesh_access.o mesh_configuration_server.o mesh_generic_server.o mesh_generic_level_server.o mesh_generic_client.o mesh_generic_level_client.o mesh_health_server.o mesh.o
${CC} $(filter-out mesh.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
provisioner: ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${SM_OBJ} pb_adv.o mesh_crypto.o provisioning_provisioner.o mesh_keys.o mesh_foundation.o mesh_network.o provisioner.o

View File

@ -167,6 +167,21 @@ typedef struct {
btstack_linked_list_iterator_t it;
} mesh_element_iterator_t;
#define MESH_MAX_NUM_FAULTS 3
typedef struct {
// linked list item
btstack_linked_item_t item;
uint8_t test_id;
uint16_t company_id;
uint16_t num_faults;
uint8_t faults[MESH_MAX_NUM_FAULTS];
} mesh_fault_t;
typedef struct {
btstack_linked_list_t faults;
} mesh_health_state_t;
typedef struct mesh_element {
// linked list item
btstack_linked_item_t item;

View File

@ -58,7 +58,7 @@ extern "C"
#define MESH_GENERIC_DELTA_SET_UNACKNOWLEDGED 0x820Au
#define MESH_GENERIC_MOVE_SET 0x820Bu
#define MESH_GENERIC_MOVE_SET_UNACKNOWLEDGED 0x820Cu
typedef struct {
mesh_transition_t base_transition;