9#ifndef __MESHX_FWD_DEC_H__
10#define __MESHX_FWD_DEC_H__
22#define MESHX_BASE_TEMPLATE_PROTO template <typename ble_mesh_send_msg_params_t>
23#define MESHX_BASE_TEMPLATE_PARAMS <ble_mesh_send_msg_params_t>
24#define MESHX_BASE_CLIENT_TEMPLATE_PROTO template <typename baseClientModelDerived_t, typename ble_mesh_send_msg_params_t, typename ble_mesh_plat_model_cb_params_t>
25#define MESHX_BASE_CLIENT_TEMPLATE_PARAMS <baseClientModelDerived_t, ble_mesh_send_msg_params_t, ble_mesh_plat_model_cb_params_t>
26#define MESHX_BASE_SERVER_TEMPLATE_PROTO template <typename baseServerModelDerived_t, typename ble_mesh_send_msg_params_t, typename ble_mesh_plat_restore_params_t, typename ble_mesh_plat_cb_params_t>
27#define MESHX_BASE_SERVER_TEMPLATE_PARAMS <baseServerModelDerived_t, ble_mesh_send_msg_params_t, ble_mesh_plat_restore_params_t, ble_mesh_plat_cb_params_t>
29#define MESHX_MODEL_TEMPLATE_PROTO template <typename meshxBaseModel_t, typename meshx_send_packet_params_t>
30#define MESHX_MODEL_TEMPLATE_PARAMS <meshxBaseModel_t, meshx_send_packet_params_t>
31#define MESHX_SERVER_MODEL_TEMPLATE_PROTO template <typename meshxBaseServerModel_t, typename meshx_send_packet_params_t>
32#define MESHX_SERVER_MODEL_TEMPLATE_PARAMS <meshxBaseServerModel_t, meshx_send_packet_params_t>
33#define MESHX_CLIENT_MODEL_TEMPLATE_PROTO template <typename meshxBaseClientModel_t, typename meshx_send_packet_params_t>
34#define MESHX_CLIENT_MODEL_TEMPLATE_PARAMS <meshxBaseClientModel_t, meshx_send_packet_params_t>
36#define MESHX_ELEMENT_TEMPLATE_PROTO template <typename meshx_model_send_param_header_t>
37#define MESHX_ELEMENT_TEMPLATE_PARAMS <meshx_model_send_param_header_t>
38#define MESHX_SERVER_ELEMENT_TEMPLATE_PROTO
39#define MESHX_SERVER_ELEMENT_TEMPLATE_PARAMS
40#define MESHX_CLIENT_ELEMENT_TEMPLATE_PROTO
41#define MESHX_CLIENT_ELEMENT_TEMPLATE_PARAMS
Definition meshx_base_model_class.hpp:244
Base class for all mesh models.
Definition meshx_base_model_class.hpp:50
Definition meshx_base_model_class.hpp:189
Base class for all client models in the mesh network.
Definition meshx_model_class.hpp:429
Derived class for client elements.
Definition meshx_element_class.hpp:349
virtual meshx_ptr_t get_element_ctx(void) const =0
Get the element context structure.
virtual std::vector< std::unique_ptr< meshXModelIF > > & get_ven_models(void)=0
Get the Vendor models vector.
virtual ~meshXElementIF()=default
virtual uint8_t get_no_of_sig_models(void) const =0
Get the number of SIG models supported by the element.
virtual const char * get_element_name(void) const =0
Get the name of the element.
virtual size_t get_element_ctx_size(void) const =0
Get the size of the element context structure.
virtual void sync(control_task_msg_evt_t evt)=0
Synchronize element state (Status broadcast or GET request).
virtual meshx_err_t restore_nvs_context(void)=0
Restore the element's context from NVS.
virtual meshx_err_t reset(void)=0
Reset the element.
virtual void on_baked(uint16_t index)=0
Called when the composition is baked to update the element's index.
virtual bool is_initialized(void) const =0
Check if the element is initialized.
void set_element_idx(uint16_t idx)
Definition meshx_fwd_decl.hpp:98
virtual meshx_err_t initialize(void)=0
Initialize the element.
uint16_t get_element_idx(void) const
Definition meshx_fwd_decl.hpp:99
virtual bool has_model(uint16_t model_id) const =0
Check if the element contains a specific model by ID.
virtual void handle_config(control_task_msg_evt_t evt, const meshx_config_srv_cb_param_t *params)=0
Handle configuration server events (AppKey bind, Publication, etc.).
virtual uint8_t get_no_of_ven_models(void) const =0
Get the number of Vendor models supported by the element.
virtual uint8_t list_sig_models(void)=0
Lists and creates all required SIG models for the element.
virtual std::vector< std::unique_ptr< meshXModelIF > > & get_sig_models(void)=0
Get the SIG models vector.
virtual uint8_t list_ven_models(void)=0
Lists and creates all required Vendor models for the element.
meshXElementIF(uint16_t element_idx)
Definition meshx_fwd_decl.hpp:217
uint16_t element_idx
Definition meshx_fwd_decl.hpp:84
virtual meshx_element_type_t get_element_variant(void) const =0
Get the element variant.
virtual meshx_err_t on_model_cb(meshx_ptr_t param, size_t param_size)=0
Handle model callback from child models.
virtual meshxElementType_t get_element_type(void) const =0
Get the element type.
Derived class for server elements.
Definition meshx_element_class.hpp:336
Base class for MeshX elements.
Definition meshx_element_class.hpp:34
Definition meshx_model_class.hpp:32
meshXModel class
Definition meshx_model_class.hpp:175
Base class for all server models in MeshX.
Definition meshx_model_class.hpp:366
void * meshx_ptr_t
Definition meshx_ble_mesh_cmn_def.h:636
struct meshx_config_srv_cb_param meshx_config_srv_cb_param_t
uint32_t control_task_msg_evt_t
Type definition for control task message event.
Definition meshx_control_task.h:81
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
#define MESHX_SERVER_ELEMENT_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:38
#define MESHX_ELEMENT_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:36
#define MESHX_BASE_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:22
#define MESHX_BASE_CLIENT_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:24
#define MESHX_SERVER_MODEL_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:31
meshxElementType
Definition meshx_fwd_decl.hpp:60
@ MESHX_ELEMENT_TYPE_CLIENT
Definition meshx_fwd_decl.hpp:62
@ MESHX_ELEMENT_TYPE_SERVER
Definition meshx_fwd_decl.hpp:61
#define MESHX_MODEL_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:29
#define MESHX_CLIENT_ELEMENT_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:40
#define MESHX_BASE_SERVER_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:26
#define MESHX_CLIENT_MODEL_TEMPLATE_PROTO
Definition meshx_fwd_decl.hpp:33
enum meshxElementType meshxElementType_t
Definition meshx_fwd_decl.hpp:71
Common element context structure for base handling.
Definition meshx_fwd_decl.hpp:76
uint16_t pub_addr
Definition meshx_fwd_decl.hpp:78
uint16_t app_id
Definition meshx_fwd_decl.hpp:77