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.
Loading...
Searching...
No Matches
meshx_relay_client_element.h
Go to the documentation of this file.
1
21
22#ifndef __RELAY_CLIENT_MODEL_H__
23#define __RELAY_CLIENT_MODEL_H__
24
25#include "meshx_common.h"
26#include "meshx_onoff_client.h"
27
28#if CONFIG_RELAY_CLIENT_COUNT > 0
29
34#define RELAY_CLI_MODEL_SIG_CNT RELAY_CLI_SIG_MAX_ID // No of SIG models in a relay model element
39#define RELAY_CLI_MODEL_VEN_CNT 0 // No of VEN models in a relay model element
40
46
51{
52 uint8_t ack;
53 uint8_t set_get;
54 uint8_t reserved;
55 uint16_t element_id;
57
62{
63 uint8_t tid;
64 uint16_t app_id;
65 uint16_t pub_addr;
66 meshx_on_off_cli_state_t state;
67 meshx_on_off_cli_state_t prev_state;
69
80
88
100
114meshx_err_t meshx_relay_el_set_state(uint16_t el_id, bool ack);
115
124meshx_err_t create_relay_client_elements(dev_struct_t *pdev, uint16_t element_cnt);
125
126#endif /* CONFIG_RELAY_CLIENT_COUNT > 0 */
127#endif /*__RELAY_CLIENT_MODEL_H__*/
Common application definitions and includes for BLE Mesh Node.
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
Header file for the On/Off client model in BLE mesh.
#define MESHX_MODEL
@ RELAY_CLI_SIG_ONOFF_MODEL_ID
struct relay_client_element_ctrl relay_client_element_ctrl_t
meshx_err_t meshx_relay_el_get_state(uint16_t el_id)
Retrieves the current state of the relay element.
meshx_err_t create_relay_client_elements(dev_struct_t *pdev, uint16_t element_cnt)
Create Dynamic Relay Model Elements.
struct meshx_relay_client_model_ctx meshx_relay_client_model_ctx_t
Structure to hold the context of the relay client.
struct meshx_gen_on_off_cli_msg meshx_gen_on_off_cli_msg_t
Structure to hold the relay client message.
#define RELAY_CLI_MODEL_SIG_CNT
Number of SIG models in a relay model 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.
struct relay_client_element relay_client_elements_t
Structure to hold the context and configuration for the relay client element.
Structure to hold the relay client message.
Structure to hold the context of the relay client.
relay_client_elements_t * el_list
Structure to hold the context and configuration for the relay client element.
meshx_onoff_client_model_t * onoff_cli_model
MESHX_MODEL relay_cli_sig_model_list[RELAY_CLI_MODEL_SIG_CNT]
meshx_relay_client_model_ctx_t * cli_ctx