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_srv.h
Go to the documentation of this file.
1
15
16
17#ifndef __MESHX_PLAT_GEN_SRV_H__
18#define __MESHX_PLAT_GEN_SRV_H__
19
21#include "meshx_control_task.h"
22
24typedef struct
25{
26 uint8_t onoff;
28
30typedef struct
31{
32 int16_t level;
34
36typedef struct
37{
38 int16_t level;
40
42typedef struct
43{
44 int16_t level;
46
52
58
60typedef struct
61{
62 uint16_t power;
64
66typedef struct
67{
68 uint16_t power;
70
72typedef struct
73{
74 uint16_t range_min;
75 uint16_t range_max;
77
79typedef struct
80{
81 int32_t latitude;
82 int32_t longitude;
83 int16_t altitude;
85
87typedef struct
88{
89 int16_t north;
90 int16_t east;
91 int16_t altitude;
92 uint8_t floor_number;
93 uint16_t uncertainty;
95
97typedef struct
98{
99 uint16_t id;
100 void *value;
102
104typedef struct
105{
106 uint16_t id;
107 uint8_t access;
108 void *value;
110
112typedef struct
113{
114 uint16_t id;
115 uint8_t access;
117
138
145
147
164meshx_err_t meshx_plat_on_off_gen_srv_create(void* p_model, void** p_pub, void** p_onoff_srv);
165
180meshx_err_t meshx_plat_gen_srv_delete(void** p_pub, void** p_srv);
181
192meshx_err_t meshx_plat_set_gen_srv_state(void * p_model, uint8_t on_off_state);
193
200
214meshx_err_t meshx_plat_gen_on_off_srv_restore(void* p_model, uint8_t state);
215
232 meshx_model_t *p_model,
233 meshx_ctx_t *p_ctx,
234 meshx_ptr_t p_data,
235 uint32_t data_len
236);
237
238#endif /* __MESHX_PLAT_GEN_SRV_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
meshx_err_t meshx_plat_gen_srv_delete(void **p_pub, void **p_srv)
Deletes the Generic OnOff Server model and its associated resources.
meshx_err_t meshx_plat_set_gen_srv_state(void *p_model, uint8_t on_off_state)
Set the state of a generic server model.
meshx_err_t meshx_plat_on_off_gen_srv_create(void *p_model, void **p_pub, void **p_onoff_srv)
Creates a Generic OnOff Server model and its publication context.
meshx_err_t meshx_plat_gen_srv_init(void)
Initialize the generic server model platform.
control_task_msg_handle_t meshx_server_cb
meshx_err_t meshx_plat_gen_on_off_srv_restore(void *p_model, uint8_t state)
Restores the state of the Generic OnOff Server model.
struct meshx_gen_srv_cb_param meshx_gen_srv_cb_param_t
meshx_err_t meshx_plat_gen_srv_send_status(meshx_model_t *p_model, meshx_ctx_t *p_ctx, meshx_ptr_t p_data, uint32_t data_len)
Send a status message from the Generic Server model.
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
meshx_gen_srv_state_change_t state_change
meshx_state_change_gen_user_property_set_t user_property_set
meshx_state_change_gen_loc_global_set_t loc_global_set
meshx_state_change_gen_delta_set_t delta_set
meshx_state_change_gen_power_default_set_t power_default_set
meshx_state_change_gen_onpowerup_set_t onpowerup_set
meshx_state_change_gen_power_level_set_t power_level_set
meshx_state_change_gen_onoff_set_t onoff_set
meshx_state_change_gen_loc_local_set_t loc_local_set
meshx_state_change_gen_level_set_t level_set
meshx_state_change_gen_power_range_set_t power_range_set
meshx_state_change_gen_manu_property_set_t manu_property_set
meshx_state_change_gen_def_trans_time_set_t def_trans_time_set
meshx_state_change_gen_admin_property_set_t admin_property_set
meshx_state_change_gen_move_set_t move_set