MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_ble_mesh_gen_cli.h
Go to the documentation of this file.
1
11
12#ifndef __MESHX_BLE_MESH_GEN_CLI_H__
13#define __MESHX_BLE_MESH_GEN_CLI_H__
14
16#include "meshx_control_task.h"
17
30
32typedef struct {
33 bool op_en;
34 uint8_t onoff;
35 uint8_t tid;
36 uint8_t trans_time;
37 uint8_t delay;
39
41typedef struct {
42 bool op_en;
43 int16_t level;
44 uint8_t tid;
45 uint8_t trans_time;
46 uint8_t delay;
48
50typedef struct {
51 bool op_en;
52 int32_t level;
53 uint8_t tid;
54 uint8_t trans_time;
55 uint8_t delay;
57
59typedef struct {
60 bool op_en;
61 int16_t delta_level;
62 uint8_t tid;
63 uint8_t trans_time;
64 uint8_t delay;
66
68typedef struct {
69 uint8_t trans_time;
71
73typedef struct {
74 uint8_t onpowerup;
76
78typedef struct {
79 bool op_en;
80 uint16_t power;
81 uint8_t tid;
82 uint8_t trans_time;
83 uint8_t delay;
85
87typedef struct {
88 uint16_t power;
90
92typedef struct {
93 uint16_t range_min;
94 uint16_t range_max;
96
103
105typedef struct {
106 int16_t local_north;
107 int16_t local_east;
109 uint8_t floor_number;
110 uint16_t uncertainty;
112
129
131typedef struct {
132 bool op_en;
134 uint8_t target_onoff;
135 uint8_t remain_time;
137
139typedef struct {
140 bool op_en;
142 int16_t target_level;
143 uint8_t remain_time;
145
150
152typedef struct {
153 uint8_t onpowerup;
155
157typedef struct {
158 bool op_en;
159 uint16_t present_power;
160 uint16_t target_power;
161 uint8_t remain_time;
163
165typedef struct {
166 uint16_t power;
168
170typedef struct {
171 uint16_t power;
173
175typedef struct {
176 uint8_t status_code;
177 uint16_t range_min;
178 uint16_t range_max;
180
182typedef struct {
183 uint32_t battery_level : 8;
184 uint32_t time_to_discharge : 24;
185 uint32_t time_to_charge : 24;
186 uint32_t flags : 8;
188
195
204
206typedef struct {
207 struct net_buf_simple *property_ids;
209
211typedef struct {
212 bool op_en;
213 uint16_t property_id;
214 uint8_t user_access;
215 struct net_buf_simple *property_value;
217
219typedef struct {
220 struct net_buf_simple *property_ids;
222
224typedef struct {
225 bool op_en;
226 uint16_t property_id;
227 uint8_t user_access;
228 struct net_buf_simple *property_value;
230
232typedef struct {
233 struct net_buf_simple *property_ids;
235
237typedef struct {
238 bool op_en;
239 uint16_t property_id;
240 uint8_t user_access;
241 struct net_buf_simple *property_value;
243
245typedef struct {
246 struct net_buf_simple *property_ids;
248
272
291
293
311
327
339
357 meshx_ptr_t p_model, meshx_gen_cli_set_t *p_set,
358 uint16_t opcode, uint16_t addr,
359 uint16_t net_idx, uint16_t app_idx,
360 bool is_get_opcode
361);
362#endif /* __MESHX_BLE_MESH_GEN_CLI_H__ */
Common BLE Mesh interface definitions and utility functions.
struct meshx_model meshx_model_t
struct meshx_ctx meshx_ctx_t
Structure to hold context information for BLE Mesh operations.
void * meshx_ptr_t
#define MESHX_BIT(nr)
struct meshx_gen_cli_cb_param meshx_gen_cli_cb_param_t
Callback parameters for Generic Client Model events. This structure is used to pass information about...
control_task_msg_handle_t meshx_gen_client_cb_t
@ MESHX_GEN_CLI_EVT_ALL
@ MESHX_GEN_CLI_EVT_GET
@ MESHX_GEN_CLI_EVT_SET
@ MESHX_GEN_CLI_PUBLISH
@ MESHX_GEN_CLI_TIMEOUT
meshx_err_t meshx_plat_gen_cli_delete(meshx_ptr_t *p_pub, meshx_ptr_t *p_cli)
Deletes the Generic OnOff Client model and its associated resources.
meshx_err_t meshx_plat_gen_cli_send_msg(meshx_ptr_t p_model, meshx_gen_cli_set_t *p_set, uint16_t opcode, uint16_t addr, uint16_t net_idx, uint16_t app_idx, bool is_get_opcode)
Sends a Generic Client message over BLE Mesh.
meshx_err_t meshx_plat_on_off_gen_cli_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_onoff_cli)
Creates a Generic OnOff client model and its publication context.
meshx_err_t meshx_plat_gen_cli_init(void)
Initialize the meshxuction generic client.
Header file for the control task in the BLE mesh node application.
meshx_err_t(* control_task_msg_handle_t)(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Function pointer type for control task message handler.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Callback parameters for Generic Client Model events. This structure is used to pass information about...
meshx_gen_client_status_cb_t status
Generic Client Model set message union.
meshx_gen_move_set_t move_set
meshx_gen_loc_global_set_t loc_global_set
meshx_gen_onpowerup_set_t power_set
meshx_gen_delta_set_t delta_set
meshx_gen_power_default_set_t power_default_set
meshx_gen_def_trans_time_set_t def_trans_time_set
meshx_gen_power_level_set_t power_level_set
meshx_gen_level_set_t level_set
meshx_gen_loc_local_set_t loc_local_set
meshx_gen_onoff_set_t onoff_set
meshx_gen_power_range_set_t power_range_set
Generic Client Model received message union.
meshx_gen_user_properties_status_cb_t user_properties_status
meshx_gen_loc_global_status_cb_t location_global_status
meshx_gen_power_level_status_cb_t power_level_status
meshx_gen_power_last_status_cb_t power_last_status
meshx_gen_client_properties_status_cb_t client_properties_status
meshx_gen_battery_status_cb_t battery_status
meshx_gen_def_trans_time_status_cb_t def_trans_time_status
meshx_gen_loc_local_status_cb_t location_local_status
meshx_gen_level_status_cb_t level_status
meshx_gen_onoff_status_cb_t onoff_status
meshx_gen_admin_properties_status_cb_t admin_properties_status
meshx_gen_manufacturer_properties_status_cb_t manufacturer_properties_status
meshx_gen_onpowerup_status_cb_t onpowerup_status
meshx_gen_user_property_status_cb_t user_property_status
meshx_gen_power_default_status_cb_t power_default_status
meshx_gen_manufacturer_property_status_cb_t manufacturer_property_status
meshx_gen_admin_property_status_cb_t admin_property_status
meshx_gen_power_range_status_cb_t power_range_status