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_model_level.cpp File Reference

Implementation of Generic Level Model classes for MeshX. This file contains the implementation of the Generic Level Server and Client models for the MeshX BLE mesh framework. More...

Functions

 if (!el_state)
 if (memcmp(&model_state, el_state, sizeof(meshx_gen_level_model_state_t)) !=0)

Variables

**This function is called by the parent element when a state change request *is received It validates the request and returns a result to the element * Note
 Handle state change request from element.
**This function is called by the parent element when a state change request *is received It validates the request and returns a result to the element not the model layer **return * MESHX_SUCCESS
 else

Detailed Description

Implementation of Generic Level Model classes for MeshX. This file contains the implementation of the Generic Level Server and Client models for the MeshX BLE mesh framework.

Key Features:

  • Implements Bluetooth SIG-defined Generic Level model
  • Inherits from meshXServerModel and meshXClientModel templates
  • Provides standard Level control operations (SET, GET, DELTA, MOVE)
  • Integrates with MeshX transmission control
    Author
    Pranjal Chanda
    Date
    2024-2025

Function Documentation

◆ if() [1/2]

if ( ! el_state)
387 {
388 MESHX_LOGE(MODULE_ID_MODEL_SERVER, "Invalid parameter in element_state_change_handle");
389 return MESHX_INVALID_ARG;
390 }
@ MESHX_INVALID_ARG
Definition meshx_err.h:46
#define MESHX_LOGE(module_id, format,...)
Definition meshx_log.h:114
@ MODULE_ID_MODEL_SERVER
Definition module_id.h:34

◆ if() [2/2]

if ( memcmp(&,, meshx_gen_level_model_state_t)
393 {
395 "Level state change request: present=%d target=%d remaining=%d",
396 el_state->present_level, el_state->target_level, el_state->remaining_time);
397 // Update the model state
398 *el_state = model_state;
399 }
#define MESHX_LOGI(module_id, format,...)
Definition meshx_log.h:126

Variable Documentation

◆ else

else
Initial value:
{
@ MESHX_INVALID_STATE
Definition meshx_err.h:49

◆ MESHX_SUCCESS

return MESHX_SUCCESS

◆ Note

* * This function is called by the parent element when a state change request* is received It validates the request and returns a result to the element* Note

Handle state change request from element.