Z-Wave Protocol Controller Reference
zwave_tx.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
14#ifndef ZWAVE_TX_H
15#define ZWAVE_TX_H
16
17// Includes from other components
18#include "sl_status.h"
23
24#ifndef ZWAVE_TX_QUEUE_BUFFER_SIZE
25// max amount of frames that can be store int the internal zwave_tx_queue
26#define ZWAVE_TX_QUEUE_BUFFER_SIZE 64
27#endif
28
29#ifndef ZWAVE_TX_INCOMING_FRAMES_BUFFER_SIZE
30// Max amount of NodeID that can send us frames to track.
31#define ZWAVE_TX_INCOMING_FRAMES_BUFFER_SIZE 10
32#endif
33
34#ifndef ZWAVE_TX_ROUTE_CACHE_BUFFER_SIZE
35// Maximum amount of NodeIDs for which we cache the number of repeaters.
36#define ZWAVE_TX_ROUTE_CACHE_BUFFER_SIZE 50
37#endif
38
169 uint8_t status, const zwapi_tx_report_t *tx_info, void *user);
170
171#ifdef __cplusplus
172extern "C" {
173#endif
174
211 uint16_t data_length,
212 const uint8_t *data,
213 const zwave_tx_options_t *tx_options,
214 const on_zwave_tx_send_data_complete_t on_send_complete,
215 void *user,
216 zwave_tx_session_id_t *session);
217
246 zwave_node_id_t destination_node_id,
247 rf_power_level_t power_level,
248 const on_zwave_tx_send_data_complete_t on_send_complete,
249 void *user,
250 zwave_tx_session_id_t *session_id);
251
265
277
290 uint8_t number_of_incoming_frames);
291
298const uint8_t *zwave_tx_get_frame(zwave_tx_session_id_t session_id);
299
307
319
329
337void zwave_tx_log_queue(bool with_contents);
338
346 bool log_frame_payload);
347
354
355#ifdef __cplusplus
356}
357#endif
360#endif //ZWAVE_TX_H
rf_power_level_t
Definition: zwapi_protocol_basis.h:100
uint32_t sl_status_t
Definition: sl_status.h:139
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
void * zwave_tx_session_id_t
Handle that can be used for aborting ongoing transmissions or identifying TX Queue elements.
Definition: zwave_tx_definitions.h:77
void zwave_tx_log_queue(bool with_contents)
Log the contents of the TX Queue.
sl_status_t zwave_tx_abort_transmission(zwave_tx_session_id_t session_id)
Abort a queued or ongoing transmission.
int zwave_tx_get_queue_size()
Returns the current number of elements in the Tx Queue.
const uint8_t * zwave_tx_get_frame(zwave_tx_session_id_t session_id)
Returns a pointer to frame data for a given Z-Wave Tx session ID.
void zwave_tx_log_element(zwave_tx_session_id_t session_id, bool log_frame_payload)
Log the details about an element in the Tx Queue.
sl_status_t zwave_tx_send_test_frame(zwave_node_id_t destination_node_id, rf_power_level_t power_level, const on_zwave_tx_send_data_complete_t on_send_complete, void *user, zwave_tx_session_id_t *session_id)
Queues and send a test frame to a Z-Wave node.
uint8_t zwave_tx_get_number_of_responses(zwave_tx_session_id_t session_id)
Returns the total number of responses that a frame (and its parent) will generate *.
bool zwave_tx_has_frames_for_node(zwave_node_id_t node_id)
Verifies if we have frames in the queue to send to a NodeID.
void(* on_zwave_tx_send_data_complete_t)(uint8_t status, const zwapi_tx_report_t *tx_info, void *user)
Function signature for callbacks invoked when send data has completed.
Definition: zwave_tx.h:168
sl_status_t zwave_tx_send_data(const zwave_controller_connection_info_t *connection, uint16_t data_length, const uint8_t *data, const zwave_tx_options_t *tx_options, const on_zwave_tx_send_data_complete_t on_send_complete, void *user, zwave_tx_session_id_t *session)
Queue and send frames to Z-Wave nodes.
void zwave_tx_set_expected_frames(zwave_node_id_t remote_node_id, uint8_t number_of_incoming_frames)
Tell the Tx Queue that a remote NodeID is about to send some frames and we should back-off a little m...
sl_status_t zwave_tx_init()
Initialize the zwave_tx component.
uint16_t zwave_tx_get_frame_length(zwave_tx_session_id_t session_id)
Returns the length of a frame in the Z-Wave Tx Queue.
SL Status Codes.
Detailed report and data about Z-Wave transmissions.
Definition: zwapi_protocol_transport.h:225
Structure holding information about the source and destination when transmitting and receiving Z-Wave...
Definition: zwave_controller_connection_info.h:87
Definition: zwave_tx_definitions.h:131
const zwave_node_id_t node_id
Z-Wave API for basis controller/end node application interface.
Z-Wave API for transport application layer interface.