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_txcm.h
Go to the documentation of this file.
1
12
13#ifndef __MESHX_TXCM_H__
14#define __MESHX_TXCM_H__
15
16#include <stdint.h>
17#include <stddef.h>
18#include "meshx_err.h"
19#include "meshx_common.h"
20#include "meshx_control_task.h"
22
26#ifndef MESHX_TXCM_MSG_RETRY_MAX
27#define MESHX_TXCM_MSG_RETRY_MAX 3
28#endif /* MESHX_TXCM_MSG_RETRY_MAX */
29
33#ifndef MESHX_TXCM_MSG_PARAM_MAX_LEN
34#define MESHX_TXCM_MSG_PARAM_MAX_LEN 64
35#endif /* MESHX_TXCM_MSG_PARAM_MAX_LEN */
36
40#ifndef MESHX_TXCM_TX_Q_LEN
41#define MESHX_TXCM_TX_Q_LEN 10
42#endif
43
47#define MESHX_TXCM_TX_Q_DEPTH sizeof(meshx_txcm_tx_q_t)
48
64
81
88
94typedef meshx_err_t (*meshx_txcm_fn_model_send_t)(meshx_cptr_t msg_param, size_t msg_param_len);
95
110
126
143 meshx_txcm_sig_t request_type,
144 uint16_t dest_addr,
145 meshx_cptr_t msg_param,
146 uint16_t msg_param_len,
148);
149
163
164#endif /* __MESHX_TXCM_H__ */
Common definitions for BLE Mesh models and opcodes in the MeshX framework.
void * meshx_ptr_t
const void * meshx_cptr_t
Common application definitions and includes for BLE Mesh Node.
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
Header file for the control task in the BLE mesh node application.
meshx_err_t(* control_task_msg_handle_t)(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Function pointer type for control task message handler.
MeshX Error Codes.
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
meshx_err_t meshx_txcm_init(dev_struct_t *pdev)
Initializes the MeshX Tx Control Module.
meshx_err_t meshx_txcm_request_send(meshx_txcm_sig_t request_type, uint16_t dest_addr, meshx_cptr_t msg_param, uint16_t msg_param_len, meshx_txcm_fn_model_send_t send_fn)
Sends a request to the Tx Control module.
control_task_msg_handle_t meshx_txcm_cb_t
Definition meshx_txcm.h:49
struct meshx_txcm_request meshx_txcm_request_t
Structure for Tx Control module requests.
meshx_txcm_sig_t
Enumeration of signal types for the Tx Control Module.
Definition meshx_txcm.h:57
@ MESHX_TXCM_SIG_ENQ_SEND
Definition meshx_txcm.h:58
@ MESHX_TXCM_SIG_DIRECT_SEND
Definition meshx_txcm.h:59
@ MESHX_TXCM_SIG_ACK
Definition meshx_txcm.h:61
@ MESHX_TXCM_SIG_RESEND
Definition meshx_txcm.h:60
@ MESHX_TXCM_SIG_MAX
Definition meshx_txcm.h:62
meshx_txcm_msg_state_t
Enumeration of message states for the Tx Control Module.
Definition meshx_txcm.h:72
@ MESHX_TXCM_MSG_STATE_SENDING
Definition meshx_txcm.h:75
@ MESHX_TXCM_MSG_STATE_NACK
Definition meshx_txcm.h:78
@ MESHX_TXCM_MSG_STATE_NONE
Definition meshx_txcm.h:73
@ MESHX_TXCM_MSG_STATE_NEW
Definition meshx_txcm.h:74
@ MESHX_TXCM_MSG_STATE_ACK
Definition meshx_txcm.h:77
@ MESHX_TXCM_MSG_STATE_WAITING_ACK
Definition meshx_txcm.h:76
@ MESHX_TXCM_MSG_STATE_MAX
Definition meshx_txcm.h:79
meshx_txcm_msg_type_t
Definition meshx_txcm.h:83
@ MESHX_TXCM_MSG_TYPE_UNACKED
Definition meshx_txcm.h:85
@ MESHX_TXCM_MSG_TYPE_MAX
Definition meshx_txcm.h:86
@ MESHX_TXCM_MSG_TYPE_ACKED
Definition meshx_txcm.h:84
meshx_err_t(* meshx_txcm_fn_model_send_t)(meshx_cptr_t msg_param, size_t msg_param_len)
Function pointer the Model client layer needs to provide for the msg to be sent for both MESHX_TXCM_S...
Definition meshx_txcm.h:94
meshx_err_t meshx_txcm_event_cb_reg(meshx_txcm_cb_t event_cb)
Registers a callback function for handling Tx Control module events.
Structure for Tx Control module requests.
Definition meshx_txcm.h:103
meshx_ptr_t msg_param
Definition meshx_txcm.h:106
meshx_txcm_sig_t request_type
Definition meshx_txcm.h:107
meshx_txcm_fn_model_send_t send_fn
Definition meshx_txcm.h:108
uint16_t msg_param_len
Definition meshx_txcm.h:105