38 #ifndef HEALTH_CLIENT_H__ 39 #define HEALTH_CLIENT_H__ 45 #include "device_state_manager.h" 46 #include "health_common.h" 56 #ifndef HEALTH_CLIENT_ACKED_TRANSACTION_TIMEOUT 57 #define HEALTH_CLIENT_ACKED_TRANSACTION_TIMEOUT (SEC_TO_US(60)) health_client_evt_period_status_t period_status
Period status data for the Period Status message.
const uint8_t * p_fault_array
Fault array.
A Health Current Status message was received.
uint16_t access_model_handle_t
Access layer handle type.
health_client_evt_type_t
Message types for messages received by the health client.
A Health Attention Status message was received.
uint8_t attention
Attention timer.
uint8_t fault_array_length
Length of the fault array.
uint16_t company_id
Company ID.
uint8_t fast_period_divisor
Divisor for the publishing interval of the Current Status message in a server.
uint32_t health_client_init(health_client_t *p_client, uint16_t element_index, health_client_evt_cb_t evt_handler)
Initializes a health client instance.
A Health Fault Status message was received.
bool waiting_for_reply
Set to true if the client is currently waiting for a reply to a transmitted message.
uint32_t health_client_period_get(health_client_t *p_client)
Gets the current health period state of an element.
uint8_t * p_buffer
Buffer used to hold an outbound message.
void health_client_pending_msg_cancel(health_client_t *p_client)
Cancel any ongoing reliable message transfer.
health_client_evt_fault_status_t fault_status
Fault status data for the Current Status and Fault Status messages.
health_client_evt_cb_t event_handler
Event handler.
A reliable transfer timed out.
A reliable transfer has been cancelled.
health_client_evt_type_t type
Type of the event.
uint32_t health_client_fault_test(health_client_t *p_client, uint16_t company_id, uint8_t test_id, bool acked)
Requests a server to run a self-test.
Health client instance structure.
uint32_t health_client_fault_clear(health_client_t *p_client, uint16_t company_id, bool acked)
Clears the fault array for a specified company ID.
const access_message_rx_meta_t * p_meta_data
Meta data for the received message.
health_client_evt_attention_status_t attention_status
Attention status data for the Attention Status message.
void(* health_client_evt_cb_t)(const health_client_t *p_client, const health_client_evt_t *p_event)
Event callback function type.
uint32_t health_client_period_set(health_client_t *p_client, uint8_t fast_period_divisor, bool acked)
Sets the health period state of an element.
A Health Period Status message was received.
uint8_t test_id
Most recent test run by the peer device.
uint32_t health_client_attention_get(health_client_t *p_client)
Gets the attention timer from a server.
const access_message_rx_meta_t * p_meta_data
Meta data for the incoming Fault Status or Current Status message.
uint32_t health_client_attention_set(health_client_t *p_client, uint8_t attention_timer, bool acked)
Sets the attention timer on a server.
access_model_handle_t model_handle
Model handle.
uint32_t health_client_fault_get(health_client_t *p_client, uint16_t company_id)
Requests the current fault status from a server.