13#ifndef __MESHX_API_H__
14#define __MESHX_API_H__
25#define MESHX_APP_API_MSG_MAX_SIZE sizeof(meshx_data_payload_t)
28#define MESHX_ELEMENT_FUNC_ID_RELAY_SERVER_ONN_OFF 0x00
31#define MESHX_ELEMENT_FUNC_ID_LIGHT_CWWW_SERVER_ONN_OFF 0x00
32#define MESHX_ELEMENT_FUNC_ID_LIGHT_CWWW_SERVER_CTL 0x01
35#define MESHX_ELEMENT_FUNC_ID_LIGHT_HSL_SERVER_ONN_OFF 0x00
36#define MESHX_ELEMENT_FUNC_ID_LIGHT_HSL_SERVER_HSL 0x01
39#define MESHX_ELEMENT_FUNC_ID_LIGHT_CWWW_CLIENT_ONN_OFF 0x00
40#define MESHX_ELEMENT_FUNC_ID_LIGHT_CWWW_CLIENT_CTL 0x01
43#define MESHX_ELEMENT_FUNC_ID_SENSOR_SERVER_DATA 0x00
union meshx_data_payload meshx_data_payload_t
Structure for the BLE Mesh application control message.
struct meshx_api_sensor_server_evt meshx_api_sensor_server_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_SENSOR_SERVER.
union meshx_ctrl_payload meshx_ctrl_payload_t
Structure defines the payload for meshx_ctrl_payload.
meshx_err_t(* meshx_app_data_cb_t)(const meshx_app_element_msg_header_t *msg_hdr, const meshx_data_payload_t *msg)
BLE Mesh application callback function.
Definition meshx_api.h:229
struct meshx_ctrl_msg_header meshx_ctrl_msg_header_t
Structure for the BLE Mesh application control message header.
struct meshx_app_element_msg_header meshx_app_element_msg_header_t
Structure for the BLE Mesh application element message header.
meshx_api_type
Enumeration of BLE Mesh application API message types.
Definition meshx_api.h:49
@ MESHX_API_TYPE_DATA
Definition meshx_api.h:50
@ MESHX_API_TYPE_CTRL
Definition meshx_api.h:51
enum meshx_api_type meshx_api_type_t
Enumeration of BLE Mesh application API message types.
meshx_err_t meshx_send_msg_to_app(uint16_t element_id, uint16_t element_type, uint16_t func_id, uint16_t msg_len, const void *msg)
Sends a message to the BLE Mesh application.
Definition meshx_api.c:128
struct meshx_api_relay_client_state meshx_api_relay_client_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_RELAY_CLIENT.
struct meshx_api_relay_server_evt meshx_api_relay_server_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_RELAY_SERVER.
meshx_err_t(* meshx_app_ctrl_cb_t)(const meshx_ctrl_msg_header_t *msg_hdr, const meshx_ctrl_payload_t *msg)
BLE Mesh application control callback function.
Definition meshx_api.h:241
struct meshx_app_api_msg meshx_app_api_msg_t
Structure for the BLE Mesh application API message.
meshx_err_t meshx_send_msg_to_element(uint16_t element_id, uint16_t element_type, uint16_t func_id, uint16_t msg_len, const void *msg)
Sends a message to the element.
Definition meshx_api.c:182
meshx_err_t meshx_app_reg_element_callback(meshx_app_data_cb_t cb)
Registers the BLE Mesh application callback.
Definition meshx_api.c:206
meshx_err_t meshx_send_ctrl_msg_to_app(meshx_ctrl_evt_t evt, uint16_t msg_len, const void *msg)
Sends a control message to the BLE Mesh application.
Definition meshx_api.c:154
struct meshx_api_light_hsl_server_evt meshx_api_light_hsl_server_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_HSL_SERVER.
struct meshx_api_light_cwww_server_evt meshx_api_light_cwww_server_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_CWWW_SERVER.
struct meshx_api_light_cwww_client_evt meshx_api_light_cwww_client_evt_t
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_CWWW_CLIENT.
uint16_t meshx_get_net_key_id(void)
Get the network key identifier.
Definition meshx.c:316
meshx_err_t meshx_app_reg_system_events_callback(meshx_app_ctrl_cb_t cb)
Registers the BLE Mesh application control callback.
Definition meshx_api.c:234
#define MESHX_APP_API_MSG_MAX_SIZE
Definition meshx_api.h:25
Header file for the MeshX BLE Mesh Sensor Server module.
Common application definitions and includes for BLE Mesh Node.
meshx_ctrl_evt_t
Enumeration for the BLE Mesh application control event.
Definition meshx_common.h:31
Header file for the control task in the BLE mesh node application.
CONTROL_TASK_MSG_EVT_CTRL
Definition meshx_control_task.h:89
CONTROL_TASK_MSG_EVT_DATA
Definition meshx_control_task.h:88
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_CWWW_CLIENT.
Definition meshx_api.h:128
uint8_t err_code
Definition meshx_api.h:129
uint16_t delta_uv
Definition meshx_api.h:140
uint16_t temperature
Definition meshx_api.h:139
union meshx_api_light_cwww_client_evt::@010331215225145076254176237210306046131140170171 state_change
uint16_t temp_range_min
Definition meshx_api.h:141
uint16_t temp_range_max
Definition meshx_api.h:142
struct meshx_api_light_cwww_client_evt::@010331215225145076254176237210306046131140170171::@074174003215102134322053141270100354144151177356 on_off
struct meshx_api_light_cwww_client_evt::@010331215225145076254176237210306046131140170171::@376020317200137254005016072103236264206161124021 ctl
uint16_t lightness
Definition meshx_api.h:138
uint8_t state
Definition meshx_api.h:134
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_CWWW_SERVER.
Definition meshx_api.h:67
uint16_t lightness
Definition meshx_api.h:76
union meshx_api_light_cwww_server_evt::@257165005032013366004013204037032016036030275264 state_change
uint16_t delta_uv
Definition meshx_api.h:78
struct meshx_api_light_cwww_server_evt::@257165005032013366004013204037032016036030275264::@375004001161356005102054253202024137247030164222 on_off
uint16_t temp_range_min
Definition meshx_api.h:79
uint16_t temp_range_max
Definition meshx_api.h:80
struct meshx_api_light_cwww_server_evt::@257165005032013366004013204037032016036030275264::@245341060156102221224175046143367317210200103050 ctl
uint16_t temperature
Definition meshx_api.h:77
uint8_t state
Definition meshx_api.h:72
Structure defines the payload for MESHX_ELEMENT_TYPE_LIGHT_HSL_SERVER.
Definition meshx_api.h:89
uint16_t lightness
Definition meshx_api.h:98
union meshx_api_light_hsl_server_evt::@347235105244230326232000270243372246073133053316 state_change
uint8_t state
Definition meshx_api.h:94
struct meshx_api_light_hsl_server_evt::@347235105244230326232000270243372246073133053316::@202375373323027037070222212050326072162342057303 on_off
uint16_t saturation
Definition meshx_api.h:100
uint16_t hue
Definition meshx_api.h:99
struct meshx_api_light_hsl_server_evt::@347235105244230326232000270243372246073133053316::@153162234125000074275266213156212277206313354032 hsl
Structure defines the payload for MESHX_ELEMENT_TYPE_RELAY_CLIENT.
Definition meshx_api.h:119
uint8_t err_code
Definition meshx_api.h:120
uint8_t on_off
Definition meshx_api.h:121
Structure defines the payload for MESHX_ELEMENT_TYPE_RELAY_SERVER.
Definition meshx_api.h:59
uint8_t on_off
Definition meshx_api.h:60
Structure defines the payload for MESHX_ELEMENT_TYPE_SENSOR_SERVER.
Definition meshx_api.h:109
union meshx_api_sensor_server_evt::@336376344215041027113126022265212173363045212317 state_change
meshx_sensor_srv_status_t sensor_status
Definition meshx_api.h:111
Structure for the BLE Mesh application API message.
Definition meshx_api.h:209
uint8_t data[sizeof(meshx_data_payload_t)]
Definition meshx_api.h:216
union meshx_app_api_msg::@072073010055105213156102377164134137032042011011 msg_type_u
meshx_app_element_msg_header_t element_msg
Definition meshx_api.h:213
meshx_ctrl_msg_header_t ctrl_msg
Definition meshx_api.h:212
Definition meshx_ble_mesh_sensor_srv.h:25
Structure defines the payload for meshx_ctrl_payload.
Definition meshx_api.h:166
uint16_t addr
Definition meshx_api.h:169
uint16_t net_idx
Definition meshx_api.h:168
struct meshx_ctrl_payload::@203371072015171176147201027223133225232162040063 prov_comp
struct meshx_ctrl_payload::@366007045022113102213126135336116375135121027025 prov_failed
uint8_t device_uuid[16]
Definition meshx_api.h:170
uint32_t reserved
Definition meshx_api.h:175
uint8_t reason
Definition meshx_api.h:173
Structure for the BLE Mesh application control message.
Definition meshx_api.h:153
meshx_api_sensor_server_evt_t sensor_server_evt
Definition meshx_api.h:159
meshx_api_relay_server_evt_t relay_server_evt
Definition meshx_api.h:155
meshx_api_relay_client_evt_t relay_client_evt
Definition meshx_api.h:154
meshx_api_light_cwww_client_evt_t light_cwww_client_evt
Definition meshx_api.h:156
meshx_api_light_hsl_server_evt_t light_hsl_server_evt
Definition meshx_api.h:158
meshx_api_light_cwww_server_evt_t light_cwww_server_evt
Definition meshx_api.h:157
Header file for the production console unit test functionality.