Fr/117 fr meshx cpp shift#121
Open
pranjalchanda08 wants to merge 23 commits intorel/120-release-v05from
Open
Conversation
Generic Client model completed Light Client model completed Generic Server in progress
…tation Key Changes: Header Includes: Added Light Server headers to meshx_c_header.h Code Formatting: Fixed spacing and alignment in Generic model headers Virtual Destructors: Made destructors explicitly virtual for proper inheritance Function Fix: Corrected plat_send_msg() call in Light Server - removed invalid data_len parameter Constants: Made magic numbers constexpr for better type safety Documentation: Added comprehensive comments for callback registration/deregistration functions Files Modified: meshx_c_header.h - Added Light Server includes meshx_base_model_generic.hpp - Formatting and virtual destructor fixes meshx_base_model_light.cpp - Fixed platform send function call meshx_base_model_class.hpp/cpp - Documentation and constant improvements call in Light Server - removed invalid data_len parameter Constants: Made magic numbers constexpr for better type safety Documentation: Added comprehensive comments for callback registration/deregistration functions Files Modified: meshx_c_header.h - Added Light Server includes meshx_base_model_generic.hpp - Formatting and virtual destructor fixes meshx_base_model_light.cpp - Fixed platform send function call meshx_base_model_class.hpp/cpp - Documentation and constant improvements
…ID validation. Modified meshx_base_model_class.hpp: Changed validate_client_model_id from static to virtual pure in meshXBaseClientModel for extensibility. Added meshx_model_class.hpp: Template declarations for meshXModel, meshXServerModel, and meshXClientModel as wrappers around base models. Added meshx_model_generic.hpp: Initial implementation of meshXGenericOnOffClientModel(note: constructor name mismatch with class name). Added meshx_model_class.cpp: Implementations for the model class constructors.
… client model implementation
GenericBaseModelServer state restore implementation LightBaseModelServer state restore implementation
24a14cd to
4eb59e3
Compare
model_from_ble_cb updated for All Server model Build failure fix. Added models to model_profile.yml Documentation updates doxygen Config fixes
1f18bd8 to
69d8d95
Compare
Documentation updated Generic Sever models updated `plat_model_create` and `plat_model_delete` functions
69d8d95 to
2b5b9c3
Compare
- Add new control model header file for MeshX CTL models - Add include guards to generic model headers that were missing them - Add documentation to battery model create function - Fix header inclusion issues to prevent multiple definition errors
7bb439a to
3a8f8a7
Compare
095c3e1 to
df0a480
Compare
df0a480 to
312dd8c
Compare
c87105b to
b6d1ff3
Compare
Add new common model C++ implementation files and directories to support enhanced mesh configuration server functionality. Include mesh config server header in the main C header to enable configuration server access across the meshx component.
b6d1ff3 to
56c035e
Compare
ff8f914 to
ffb1b28
Compare
Add meshXRelayServerElement and meshXRelayClientElement classes with Generic OnOff model support for the MeshX BLE mesh network. As part of this implementation, refactor all model constructors to remove the model_id and p_plat_model parameter. Model IDs are now hardcoded within each model constructor initializer list and p_plat_model is set to `nullptr`, simplifying the API and improving code maintainability across all generic, light, and config models. Doxygen CI workflow temporarily disabled by renaming the doxygen_ci.yml file to doxygen_ci.yml_old.
ffb1b28 to
49aab31
Compare
Add server and client element classes for CWWW (Cool White - Warm White) lighting control in the BLE mesh network. These elements combine Generic OnOff and Light CTL models to provide tunable white light functionality.
- Add element context structures for state persistence matching C implementation - Refactor on_model_cb signature to include param_size parameter - Add element_state_change_notify virtual function for derived element classes - Add element_state_change_handle pure virtual function to model interface - Add parent element state pointer to models for centralized state management - Modify model constructors to accept parent element state parameter - Add template parameter to element hierarchy for type-safe callbacks - Fix typo: CWWWW_CLIENT → CWWW_CLIENT - Add MODULE_ID_ELEMENT_ROOT - Remove doxygen-awesome-css submodule BREAKING CHANGE: Model constructors now require parent element state parameter. on_model_cb signature changed to include param_size. Element classes now use template parameter for type safety.
This commit refactors the mesh model layer to introduce consistent state management across all model types. Key changes include: - Introduce model-specific state structures for each model type - Refactor message structures to use unified headers with state fields - Add model_state member to track BLE layer state in models - Add parent_element_state parameter to model constructors - Implement element_state_change_handle() for state synchronization - Remove const qualifier from meshx_state_change_notify methods This refactoring centralizes state management, separates state from transport details, and enables better state synchronization between models and elements.
0c30f77 to
bb16f34
Compare
Move element notification logic from individual model implementations to a common base class method to reduce code duplication and improve maintainability. Changes: - Moved meshXElementIF definition from meshx_element_class.hpp to meshx_fwd_decl.hpp for better forward declaration support - Added prepare_element_msg() pure virtual method to meshXModelIF - Added send_to_parent_element() common implementation to handle element state change and notification in one place - Added update_element_state_change_header() virtual method for type-specific header casting in client/server models - Refactored all model implementations (Config, Generic, Light) to store element messages as member variables and implement prepare_element_msg() - Removed direct on_model_cb() calls from individual model implementations This eliminates repetitive boilerplate code across 20+ model classes and establishes a consistent pattern for element-state-to-model communication.
bb16f34 to
2d6f66f
Compare
b429ed7 to
d4901cf
Compare
Remove duplicate `list_ven_models()` implementations from derived element classes (CWWW, Relay, Root) that simply returned 0, now using default base class implementation. Add `evt_model_id_t` type alias for `control_task_msg_evt_t` to improve code clarity and consistency across model classes. Mark several element getter methods as `final` to prevent overriding in derived classes. Add documentation to model base class methods and improve code formatting throughout model implementations.
d4901cf to
bbddb8f
Compare
Move meshx component files into a more organized hierarchy under the ble_mesh subdirectory. This restructure separates base model, common, elements, model, and interface components into their respective directories for better code organization and maintainability.
|
install uncrustify. generate config with AI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.