MeshX 0.4
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_base_model_generic.hpp File Reference

Header file for MeshX Generic Client and Server model declarations. More...

Go to the source code of this file.

Data Structures

class  meshXBaseGenericClientModel
 Template specialization of meshXBaseClientModel for Generic BLE mesh models. More...
class  meshXBaseGenericServerModel
 Template specialization of meshXBaseServerModel for Generic BLE mesh models. More...

Macros

#define MESHX_BASE_GENERIC_SERVER_TEMPLATE_PROTO
#define MESHX_BASE_GENERIC_SERVER_TEMPLATE_PARAMS
#define MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PROTO
#define MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PARAMS

Typedefs

using meshx_gen_cli_resend_ctx
using meshx_gen_client_msg_ctx_t
using meshx_gen_server_send_params_t
using meshx_gen_server_restore_params_t

Detailed Description

Header file for MeshX Generic Client and Server model declarations.

This header file contains the declarations for Generic BLE mesh model classes that extend the template-based meshXBaseClientModel and meshXBaseServerModel. It defines the specific implementation for Generic models including message contexts, callback structures, and the main Generic Client model class.

Key Components:

  • Generic Client message context structures for TXCM integration
  • Resend context for timeout and retry mechanisms
  • meshXBaseGenericClientModel class with Generic-specific functionality
  • Platform-specific message sending and handling interfaces
  • Opcode validation for Generic model operations

Template Specialization: This file provides concrete implementations of the template-based base classes specifically tailored for Generic BLE mesh models, ensuring type safety and optimal performance for Generic OnOff, Level, Power, Battery, and Location models.

Author
Pranjal Chanda
Date
2024-2025

Macro Definition Documentation

◆ MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PARAMS

#define MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PARAMS

◆ MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PROTO

#define MESHX_BASE_GENERIC_CLIENT_TEMPLATE_PROTO

◆ MESHX_BASE_GENERIC_SERVER_TEMPLATE_PARAMS

#define MESHX_BASE_GENERIC_SERVER_TEMPLATE_PARAMS

◆ MESHX_BASE_GENERIC_SERVER_TEMPLATE_PROTO

#define MESHX_BASE_GENERIC_SERVER_TEMPLATE_PROTO

Typedef Documentation

◆ meshx_gen_cli_resend_ctx

using meshx_gen_cli_resend_ctx
Initial value:
{
uint16_t model_id;
}
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...
Structure containing the model ID and parameter for generic client model message re-sending.
48{
49 uint16_t model_id; /**< Model ID associated with the re-sending. */
50 meshx_gen_cli_cb_param_t param; /**< Parameter associated with the re-sending. */
51};

◆ meshx_gen_client_msg_ctx_t

Initial value:
{
meshx_ptr_t model;
uint16_t opcode;
uint16_t addr;
uint16_t net_idx;
uint16_t app_idx;
}
void * meshx_ptr_t
Definition meshx_ble_mesh_cmn_def.h:636
uint8_t state
Definition meshx_serial.c:39
Structure containing the message context for generic client model messages.
Generic Client Model set message union.
Definition meshx_ble_mesh_gen_cli.h:116
59{
60 meshx_ptr_t model; /**< Model context associated with the message. */
61 uint16_t opcode; /**< Opcode associated with the message. */
62 uint16_t addr; /**< Destination address associated with the message. */
63 uint16_t net_idx; /**< Network index associated with the message. */
64 uint16_t app_idx; /**< Application key index associated with the message. */
65 meshx_gen_cli_set_t state; /**< State parameters associated with the message. */
66};

◆ meshx_gen_server_restore_params_t

Initial value:
struct meshx_gen_server_restore_params
{
meshx_model_t *p_model;
meshx_gen_server_state_t state_change;
}
struct meshx_model meshx_model_t
struct meshx_gen_server_state meshx_gen_server_state_t
Generic Server Model state Used to set/restore the model state values internally.
144{
145 meshx_model_t *p_model; /**< Pointer to the server model. */
146 meshx_gen_server_state_t state_change; /**< State change information. Platform Interface. */
147};

◆ meshx_gen_server_send_params_t

Initial value:
struct meshx_gen_server_send_params
{
meshx_model_t *p_model;
meshx_ctx_t *p_ctx;
size_t data_len;
}
struct meshx_ctx meshx_ctx_t
Structure to hold context information for BLE Mesh operations.
Definition meshx_ble_mesh_gen_srv.h:118
136{
137 meshx_model_t *p_model; /**< Pointer to the server model. */
138 meshx_ctx_t *p_ctx; /**< Pointer to the context. */
139 meshx_gen_srv_state_change_t state_change; /**< State change information. Platform Interface. */
140 size_t data_len; /**< Length of the data. */
141};