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_ble_mesh_sensor_srv.h
Go to the documentation of this file.
1/**
2 * Copyright (c) 2024 - 2025 MeshX
3 *
4 * @file meshx_ble_mesh_sensor_srv.h
5 * @brief Header file for the MeshX BLE Mesh Sensor Server module.
6 * @note This is the public interface for the Sensor Server module.
7 * @author Pranjal Chanda
8 * @date 2026
9 * @copyright Copyright 2026 - 2025 MeshX
10 */
11
12#ifndef __MESHX_BLE_MESH_SENSOR_SRV_H__
13#define __MESHX_BLE_MESH_SENSOR_SRV_H__
14
16#include "meshx_control_task.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#define MESHX_BLE_MESH_SENSOR_DATA_MAX_LEN 128
23
30
31/** Parameter of Sensor Status state change event */
36
37/**
38 * @brief Sensor Server Model callback parameters
39 */
48
49/**
50 * @brief Initialize Sensor Server module.
51 */
53
54/**
55 * @brief Create a Sensor Server instance.
56 */
58
59/**
60 * @brief Delete a Sensor Server instance.
61 */
63
64/**
65 * @brief Send a status message from the Sensor Server.
66 */
68 const meshx_ctx_t *p_ctx,
69 const meshx_sensor_server_state_change_t *state_change);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* __MESHX_BLE_MESH_SENSOR_SRV_H__ */
Common BLE Mesh interface definitions and utility functions.
struct meshx_model meshx_model_t
struct meshx_ctx meshx_ctx_t
Structure to hold context information for BLE Mesh operations.
void * meshx_ptr_t
Definition meshx_ble_mesh_cmn_def.h:636
meshx_err_t meshx_plat_sensor_srv_init(void)
Initialize Sensor Server module.
meshx_err_t meshx_plat_sensor_srv_delete(meshx_ptr_t *p_pub)
Delete a Sensor Server instance.
#define MESHX_BLE_MESH_SENSOR_DATA_MAX_LEN
Definition meshx_ble_mesh_sensor_srv.h:22
meshx_err_t meshx_plat_sensor_srv_send_status(const meshx_model_t *p_model, const meshx_ctx_t *p_ctx, const meshx_sensor_server_state_change_t *state_change)
Send a status message from the Sensor Server.
meshx_err_t meshx_plat_sensor_srv_create(meshx_ptr_t p_model, meshx_ptr_t *p_pub, meshx_ptr_t *p_sensor_srv)
Create a Sensor Server instance.
Header file for the control task in the BLE mesh node application.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:43
Sensor Server Model callback parameters.
Definition meshx_ble_mesh_sensor_srv.h:40
meshx_sensor_srv_status_t sensor_status
Definition meshx_ble_mesh_sensor_srv.h:45
meshx_sensor_server_state_change_t state
Definition meshx_ble_mesh_sensor_srv.h:44
meshx_model_t model
Definition meshx_ble_mesh_sensor_srv.h:41
meshx_ctx_t ctx
Definition meshx_ble_mesh_sensor_srv.h:42
Definition meshx_ble_mesh_sensor_srv.h:33
meshx_sensor_srv_status_t sensor_status
Definition meshx_ble_mesh_sensor_srv.h:34
Definition meshx_ble_mesh_sensor_srv.h:25
uint16_t property_id
Definition meshx_ble_mesh_sensor_srv.h:26
uint8_t data[128]
Definition meshx_ble_mesh_sensor_srv.h:28
uint16_t data_len
Definition meshx_ble_mesh_sensor_srv.h:27