Z-Wave Protocol Controller Reference
zwave_api_transport.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
22#ifndef ZWAVE_API_TRANSPORT_H
23#define ZWAVE_API_TRANSPORT_H
24
25// Unify includes
26#include "sl_status.h"
27
28// ZPC includes
29#include "zwave_tx.h"
30
31// Contiki
32#include "etimer.h"
33
34// Maximum frame length that the Z-Wave API can take
35#define ZWAVE_API_MAXIMUM_FRAME_LENGTH 255
36
37// Value used to indicate that our destination is not a singlecast
38#define INVALID_NODE_ID 0
39
42#define SEND_DATA_EMERGENCY_TIMEOUT 65
43
44// Session data for send data call
45typedef struct send_data_state {
46 // User Callback to invoken when transmission is completed
48 // User pointer to use for the invoking the on_send_data_complete function
49 void *user;
50 // Are we idle or currently transmitting.
52 // Save the Parent Tx session ID to be able to abort
54 // Who's our destination?
56 // Fast-track setting enabled or not
58 // Are we waiting for a NIF from the remote node?
60 // Emergency timer, in case the Z-Wave API does not callback
61 struct etimer emergency_timer;
63
67typedef enum {
71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
83
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif //ZWAVE_API_TRANSPORT_H
bool transmission_ongoing
Definition: zwave_crc16_transport.c:48
void * user
Definition: zwave_crc16_transport.c:46
on_zwave_tx_send_data_complete_t on_send_data_complete
Definition: zwave_crc16_transport.c:44
zwave_tx_session_id_t parent_session_id
Definition: zwave_crc16_transport.c:50
uint32_t sl_status_t
Definition: sl_status.h:139
sl_status_t zwave_api_transport_init(void)
Initialize the Z-Wave API Transport *.
Definition: zwave_api_transport.c:429
void zwave_api_transport_reset()
Resets the state of the Z-Wave API transport.
Definition: zwave_api_transport.c:455
zwave_api_transport_events_t
Event definitions for the Z-Wave API transport Process.
Definition: zwave_api_transport.h:67
struct send_data_state send_data_state_t
@ ZWAVE_API_TRANSPORT_START_TIMER
Send the next message in the TX Queue.
Definition: zwave_api_transport.h:69
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(* 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 Codes.
Definition: zwave_crc16_transport.c:42
bool awaiting_nif
Definition: zwave_api_transport.h:59
zwave_node_id_t remote_node_id
Definition: zwave_api_transport.h:55
bool fast_track
Definition: zwave_api_transport.h:57
struct etimer emergency_timer
Definition: zwave_api_transport.h:61