MeshX 0.3
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.
|
Header file for the Relay Client Model in BLE Mesh. More...
Go to the source code of this file.
Data Structures | |
struct | meshx_gen_on_off_cli_msg |
Structure to hold the relay client message. More... | |
struct | meshx_relay_client_model_ctx |
Structure to hold the context of the relay client. More... | |
struct | relay_client_element |
Structure to hold the context and configuration for the relay client element. More... | |
struct | relay_client_element_ctrl |
Macros | |
#define | RELAY_CLI_MODEL_SIG_CNT RELAY_CLI_SIG_MAX_ID |
Number of SIG models in a relay model element. | |
#define | RELAY_CLI_MODEL_VEN_CNT 0 |
Number of Vendor models in a relay model element. | |
Typedefs | |
typedef struct meshx_gen_on_off_cli_msg | meshx_gen_on_off_cli_msg_t |
Structure to hold the relay client message. | |
typedef struct meshx_relay_client_model_ctx | meshx_relay_client_model_ctx_t |
Structure to hold the context of the relay client. | |
typedef struct relay_client_element | relay_client_elements_t |
Structure to hold the context and configuration for the relay client element. | |
typedef struct relay_client_element_ctrl | relay_client_element_ctrl_t |
Enumerations | |
enum | relay_cli_sig_id_t { RELAY_CLI_SIG_ONOFF_MODEL_ID , RELAY_CLI_SIG_MAX_ID } |
Functions | |
meshx_err_t | meshx_relay_el_get_state (uint16_t el_id) |
Retrieves the current state of the relay element. | |
meshx_err_t | meshx_relay_el_set_state (uint16_t el_id, bool ack) |
Set the On/Off state for a specific element in the BLE mesh network. | |
meshx_err_t | create_relay_client_elements (dev_struct_t *pdev, uint16_t element_cnt) |
Create Dynamic Relay Model Elements. | |
Header file for the Relay Client Model in BLE Mesh.
Copyright © 2024 - 2025 MeshX
This file contains the definitions and function declarations for the Relay Client Model used in BLE Mesh applications. The Relay Client Model is responsible for managing relay client elements, sending messages to relay nodes or groups, and handling the state and context of relay clients.
The file defines constants, data structures, and function prototypes for creating and managing relay client elements. It includes the following key components:
Definition in file meshx_relay_client_element.h.
#define RELAY_CLI_MODEL_SIG_CNT RELAY_CLI_SIG_MAX_ID |
Number of SIG models in a relay model element.
Definition at line 34 of file meshx_relay_client_element.h.
#define RELAY_CLI_MODEL_VEN_CNT 0 |
Number of Vendor models in a relay model element.
Definition at line 39 of file meshx_relay_client_element.h.
typedef struct meshx_gen_on_off_cli_msg meshx_gen_on_off_cli_msg_t |
Structure to hold the relay client message.
typedef struct meshx_relay_client_model_ctx meshx_relay_client_model_ctx_t |
Structure to hold the context of the relay client.
typedef struct relay_client_element_ctrl relay_client_element_ctrl_t |
typedef struct relay_client_element relay_client_elements_t |
Structure to hold the context and configuration for the relay client element.
enum relay_cli_sig_id_t |
Enumerator | |
---|---|
RELAY_CLI_SIG_ONOFF_MODEL_ID | On/Off model ID |
RELAY_CLI_SIG_MAX_ID | Maximum model ID |
Definition at line 41 of file meshx_relay_client_element.h.
meshx_err_t create_relay_client_elements | ( | dev_struct_t * | pdev, |
uint16_t | element_cnt ) |
Create Dynamic Relay Model Elements.
[in] | pdev | Pointer to device structure |
[in] | element_cnt | Maximum number of relay models |
Definition at line 635 of file meshx_relay_client.c.
meshx_err_t meshx_relay_el_get_state | ( | uint16_t | el_id | ) |
Retrieves the current state of the relay element.
This function constructs a generic On/Off client message to request the current state of a relay element identified by the given element ID. It then publishes this message to the control task for BLE communication.
[in] | el_id | The element ID of the relay whose state is to be retrieved. |
Definition at line 613 of file meshx_relay_client.c.
meshx_err_t meshx_relay_el_set_state | ( | uint16_t | el_id, |
bool | ack ) |
Set the On/Off state for a specific element in the BLE mesh network.
This function sets the On/Off state of the specified element, optionally waiting for an acknowledgment.
[in] | el_id | The ID of the element for which to set the On/Off state. |
[in] | ack | Whether to wait for an acknowledgment (true) or not (false). |
Definition at line 589 of file meshx_relay_client.c.