38 #ifndef SENSOR_CLIENT_H__ 39 #define SENSOR_CLIENT_H__ 44 #include "access_reliable.h" 45 #include "sensor_common.h" 46 #include "sensor_messages.h" 54 #define SENSOR_CLIENT_MODEL_ID 0x1102 85 const sensor_status_msg_pkt_t * p_in,
99 uint16_t num_descriptors);
111 const sensor_cadence_status_msg_pkt_t *p_in,
438 uint16_t property_id,
439 uint16_t setting_property_id);
User provided settings and callbacks for the model instance.
uint16_t access_model_handle_t
Access layer handle type.
access_reliable_cb_t ack_transaction_status_cb
Callback to call after the acknowledged transaction has ended.
uint32_t sensor_client_descriptor_get(sensor_client_t *p_client, uint16_t property_id)
Sends a Descriptor Get message to the server.
uint8_t * p_message_buffer
Pointer to memory to store reliable messages.
const sensor_client_callbacks_t * p_callbacks
Callback list.
Message format for the Sensor Column Status message 4.2.16 Sensor Column Status Sensor Column Status ...
uint32_t sensor_client_settings_get(sensor_client_t *p_client, uint16_t property_id)
Sends a Settings Get message to the server.
void(* sensor_setting_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_setting_status_msg_pkt_t *p_in, uint16_t length)
Callback type for setting state related transactions.
Message format for the Sensor Cadence Set/Set Unacknowledged message (partial) 4.2.4 Sensor Cadence Set Sensor Cadence Set is an acknowledged message used to set the Sensor Cadence state of an element (see Section 4.1.3).
sensor_client_settings_t settings
Model settings and callbacks for this instance.
void(* sensor_column_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_column_status_msg_pkt_t *p_in, uint16_t length)
Callback type for column state related transactions.
void(* sensor_settings_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_settings_status_msg_pkt_t *p_in, uint16_t length)
Callback type for settings state related transactions.
uint32_t sensor_client_cadence_set_unack(sensor_client_t *p_client, const sensor_cadence_set_msg_pkt_t *p_params, uint16_t length, uint8_t repeats)
Sends a Set Cadence Unacknowledged message to the server.
void(* access_publish_timeout_cb_t)(access_model_handle_t handle, void *p_args)
Access layer publish timeout event callback.
Message format for the Sensor Series Status message 4.2.18 Sensor Series Status Sensor Series Status ...
void(* sensor_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_status_msg_pkt_t *p_in, uint16_t bytes)
Callback type for incoming sensor data.
bool force_segmented
If server should force outgoing messages as segmented messages See mesh_model_force_segmented.
uint32_t timeout
Reliable message timeout in microseconds.
void(* sensor_descriptor_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_descriptor_t *p_in, uint16_t num_descriptors)
Callback type for sensor descriptor state related transactions.
nrf_mesh_transmic_size_t transmic_size
TransMIC size used by the outgoing server messages.
uint32_t sensor_client_cadence_set(sensor_client_t *p_client, const sensor_cadence_set_msg_pkt_t *p_params, uint16_t length)
Sends a Set cadence message to the server.
uint32_t sensor_client_series_get(sensor_client_t *p_client, sensor_series_get_msg_pkt_t *p_raw_colbuf, uint16_t length)
Sends a Series Get message to the server.
sensor_state_status_cb_t sensor_status_cb
Client model response message callback.
uint32_t sensor_client_setting_set_unack(sensor_client_t *p_client, const sensor_setting_set_msg_pkt_t *p_params, uint16_t length, uint8_t repeats)
Sends a Set Setting Unacknowledged message to the server.
uint32_t sensor_client_cadence_get(sensor_client_t *p_client, uint16_t property_id)
Sends a Cadence Get message to the server.
void(* sensor_series_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_series_status_msg_pkt_t *p_in, uint16_t length)
Callback type for series state related transactions.
Message format for the Sensor Setting Set/Set Unacknowledged message (partial) 4.2.10 Sensor Setting Set Sensor Setting Set is an acknowledged message used to set the Sensor Setting state of an element (see Section 4.1.2).
uint32_t sensor_client_setting_set(sensor_client_t *p_client, const sensor_setting_set_msg_pkt_t *p_params, uint16_t length)
Sends a Set setting message to the server.
Access layer acknowledged publish parameter structure.
uint32_t sensor_client_get(sensor_client_t *p_client, uint16_t property_id)
Sends a Get message to the server.
access_reliable_t access_message
Acknowledged message context variable.
Message format for the Sensor Column Get message (partial) 4.2.15 Sensor Column Get Sensor Column Get...
uint32_t sensor_client_column_get(sensor_client_t *p_client, sensor_column_get_msg_pkt_t *p_rawbuf, uint16_t length)
Sends a Column Get message to the server.
nrf_mesh_transmic_size_t
Message MIC size selection.
uint32_t sensor_client_setting_get(sensor_client_t *p_client, uint16_t property_id, uint16_t setting_property_id)
Sends a Setting Get message to the server.
access_model_handle_t model_handle
Model handle assigned to this instance.
void(* access_reliable_cb_t)(access_model_handle_t model_handle, void *p_args, access_reliable_status_t status)
Access layer acknowledged message callback type.
void(* sensor_cadence_state_status_cb_t)(const sensor_client_t *p_self, const access_message_rx_meta_t *p_meta, const sensor_cadence_status_msg_pkt_t *p_in, uint16_t length)
Callback type for cadence related transactions.
Message format for the Sensor Settings Status message.
uint32_t sensor_client_init(sensor_client_t *p_client, uint16_t element_index)
Initializes Sensor Client.
access_publish_timeout_cb_t periodic_publish_cb
Callback called at the end of the each period for the publishing.
Message format for the Sensor Series Get message (partial) 4.2.17 Sensor Series Get Sensor Series Get...
Parameters for the Sensor Descriptor.
uint16_t message_buffer_bytes
Size of memory buffer in bytes to store reliable messages.
Message format for the Sensor Setting Status message.