Lines Matching refs:fault
71 … mesh_health_fault_t * fault = (mesh_health_fault_t *) btstack_linked_list_iterator_next(&it); in mesh_health_server_fault_for_company_id() local
72 if (fault->company_id == company_id) return fault; in mesh_health_server_fault_for_company_id()
81 … mesh_health_fault_t * fault = (mesh_health_fault_t *) btstack_linked_list_iterator_next(&it); in mesh_health_server_active_fault() local
82 if (fault->num_current_faults > 0) return fault; in mesh_health_server_active_fault()
89 mesh_health_fault_t * fault = mesh_health_server_active_fault(mesh_model); in mesh_health_server_update_publication_model_period_divisor() local
91 if (fault == NULL){ in mesh_health_server_update_publication_model_period_divisor()
126 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in health_fault_status() local
127 if (fault == NULL){ in health_fault_status()
132 mesh_access_message_add_uint8(&builder, fault->test_id); in health_fault_status()
133 mesh_access_message_add_uint16(&builder, fault->company_id); in health_fault_status()
136 for (i = 0; i < fault->num_registered_faults; i++){ in health_fault_status()
137 mesh_access_message_add_uint8(&builder, fault->registered_faults[i]); in health_fault_status()
140 for (i = 0; i < fault->num_current_faults; i++){ in health_fault_status()
141 mesh_access_message_add_uint8(&builder, fault->current_faults[i]); in health_fault_status()
167 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in process_message_fault_clear() local
168 if (fault != NULL){ in process_message_fault_clear()
169 fault->num_registered_faults = 0; in process_message_fault_clear()
170 memset(fault->registered_faults, 0, sizeof(fault->registered_faults)); in process_message_fault_clear()
201 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in health_fault_test_process_message() local
202 if (fault == NULL){ in health_fault_test_process_message()
321 mesh_health_fault_t * fault = mesh_health_server_active_fault(mesh_model); in mesh_health_server_publish_state_fn() local
322 if (fault != NULL){ in mesh_health_server_publish_state_fn()
323 company_id = fault->company_id; in mesh_health_server_publish_state_fn()
355 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in mesh_health_server_add_fault_state() local
356 btstack_assert(fault == NULL); in mesh_health_server_add_fault_state()
357 (void) fault; in mesh_health_server_add_fault_state()
364 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in mesh_health_server_set_fault() local
365 btstack_assert(fault != NULL); in mesh_health_server_set_fault()
369 for (i = 0; i < fault->num_registered_faults; i++){ in mesh_health_server_set_fault()
370 if (fault->registered_faults[i] == fault_code){ in mesh_health_server_set_fault()
375 if (add_registered_fault && (fault->num_registered_faults < MESH_MAX_NUM_FAULTS)){ in mesh_health_server_set_fault()
376 fault->registered_faults[fault->num_registered_faults] = fault_code; in mesh_health_server_set_fault()
377 fault->num_registered_faults++; in mesh_health_server_set_fault()
382 for (i = 0; i < fault->num_current_faults; i++){ in mesh_health_server_set_fault()
383 if (fault->registered_faults[i] == fault_code){ in mesh_health_server_set_fault()
388 if (add_current_fault && (fault->num_current_faults < MESH_MAX_NUM_FAULTS)){ in mesh_health_server_set_fault()
389 fault->registered_faults[fault->num_current_faults] = fault_code; in mesh_health_server_set_fault()
390 fault->num_current_faults++; in mesh_health_server_set_fault()
398 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in mesh_health_server_clear_fault() local
399 btstack_assert(fault != NULL); in mesh_health_server_clear_fault()
404 for (i = 0; i < fault->num_current_faults; i++){ in mesh_health_server_clear_fault()
406 if (fault->registered_faults[i] == fault_code){ in mesh_health_server_clear_fault()
411 fault->registered_faults[i] = fault->registered_faults[i+1]; in mesh_health_server_clear_fault()
417 fault->num_current_faults--; in mesh_health_server_clear_fault()
435 mesh_health_fault_t * fault = mesh_health_server_fault_for_company_id(mesh_model, company_id); in mesh_health_server_report_test_done() local
436 fault->test_id = test_id; in mesh_health_server_report_test_done()