26#ifndef _MESHX_BASE_MODEL_LIGHT_H_
27#define _MESHX_BASE_MODEL_LIGHT_H_
31#define MESHX_BASE_LIGHT_SERVER_TEMPLATE_PROTO
32#define MESHX_BASE_LIGHT_SERVER_TEMPLATE_PARAMS
34#define MESHX_BASE_LIGHT_CLIENT_TEMPLATE_PROTO
35#define MESHX_BASE_LIGHT_CLIENT_TEMPLATE_PARAMS
37#if CONFIG_ENABLE_LIGHT_CLIENT
129#if CONFIG_ENABLE_LIGHT_SERVER
meshXBaseClientModel()=delete
meshx_ptr_t p_plat_model
Definition meshx_base_model_class.hpp:261
static meshx_err_t meshx_is_unack_opcode(uint32_t opcode)
Validates if a given opcode corresponds to an unacknowledged (SET_UNACK) message.
Definition meshx_base_model_light.cpp:105
meshx_err_t plat_model_init(void) override
Initialization function for the Light Client model.
Definition meshx_base_model_light.cpp:214
static meshx_err_t meshx_light_client_txcm_fn_model_send(meshx_light_client_msg_ctx_t *msg_param, size_t msg_param_len)
Send a message using the light client model.
Definition meshx_base_model_light.cpp:162
meshx_err_t plat_send_msg(meshx_gen_light_client_send_params_t *params) override
Send a message using the light client model.
Definition meshx_base_model_light.cpp:237
meshXBaseLightClientModel()=delete
meshx_err_t validate_client_model_id(uint32_t model_id) override
Validates if the given model ID corresponds to a supported Light Client model.
Definition meshx_base_model_light.cpp:61
static meshx_err_t meshx_is_get_req_opcode(uint16_t opcode)
Checks if a given opcode is a GET request opcode.
Definition meshx_base_model_light.cpp:133
virtual ~meshXBaseLightClientModel()=default
meshXBaseLightServerModel()=delete
meshx_err_t plat_model_init(void) override
Initialization function for the Light Server model.
Definition meshx_base_model_light.cpp:310
meshx_err_t server_state_restore(meshx_light_server_restore_params_t *param) override
Restores the state of the Light Server model.
Definition meshx_base_model_light.cpp:408
~meshXBaseLightServerModel() final=default
meshx_err_t validate_server_status_opcode(uint16_t opcode) override
Validate a light server status opcode.
Definition meshx_base_model_light.cpp:329
meshx_err_t plat_send_msg(meshx_light_server_send_params_t *params) override
Sends a status message for the Light Server model.
Definition meshx_base_model_light.cpp:375
meshXBaseLightServerModel(uint32_t model_id, meshx_ptr_t p_plat_model, const control_msg_cb &from_ble_cb)
Constructor for the meshXBaseLightServerModel class.
Definition meshx_base_model_light.cpp:290
meshx_err_t from_ble_reg_cb(void) const
Definition meshx_base_model_class.cpp:82
uint32_t model_id
Definition meshx_base_model_class.hpp:52
control_task_msg_handle_t from_ble_cb
Definition meshx_base_model_class.hpp:54
meshx_ptr_t p_plat_model
Definition meshx_base_model_class.hpp:202
meshXBaseServerModel()=delete
This file declares the meshXBaseModel class and its derived Client and Server classes.
std::function< meshx_err_t(dev_struct_t *, control_task_msg_evt_t, meshx_ptr_t)> control_msg_cb
Definition meshx_base_model_class.hpp:32
struct meshx_light_client_msg_ctx { meshx_ptr_t model; uint16_t opcode; uint16_t addr; uint16_t net_idx; uint16_t app_idx; meshx_light_client_set_state_t state; } meshx_light_client_msg_ctx_t
Definition meshx_base_model_light.hpp:59
struct meshx_light_cli_resend_ctx { uint16_t model_id; meshx_gen_light_cli_cb_param_t param; } meshx_light_cli_resend_ctx_t
Definition meshx_base_model_light.hpp:47
struct meshx_light_server_restore_params { meshx_model_t *p_model; meshx_lighting_server_state_t state_change; } meshx_light_server_restore_params_t
Definition meshx_base_model_light.hpp:161
#define MESHX_BASE_LIGHT_CLIENT_TEMPLATE_PROTO
Definition meshx_base_model_light.hpp:34
#define MESHX_BASE_LIGHT_SERVER_TEMPLATE_PROTO
Definition meshx_base_model_light.hpp:31
struct meshx_model meshx_model_t
void * meshx_ptr_t
Definition meshx_ble_mesh_cmn_def.h:636
struct meshx_gen_light_cli_cb_param meshx_gen_light_cli_cb_param_t
Callback parameters for Generic Light Client Model events. This structure is used to pass information...
struct meshx_gen_light_client_send_params meshx_gen_light_client_send_params_t
Generic Light Client Model send parameters.
struct meshx_lighting_server_state meshx_lighting_server_state_t
Lighting Server Model state Used to set/restore the model state values internally.
struct meshx_light_server_send_params meshx_light_server_send_params_t
Light Server send parameters. Used by meshXBaseLightServerModel::plat_send_msg to forward state chang...
struct meshx_lighting_server_cb_param meshx_lighting_server_cb_param_t
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
uint8_t state
Definition meshx_serial.c:39
Structure containing the model ID and parameter for light client model message re-sending.
Structure containing the message context for light client model messages.
Lighting Client Model set message union.
Definition meshx_ble_mesh_light_cli.h:210