Z-Wave Protocol Controller Reference
zwave_command_class_supervision_process.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_COMMAND_CLASS_SUPERVISION_PROCESS_H
15#define ZWAVE_COMMAND_CLASS_SUPERVISION_PROCESS_H
16
17// Component includes
19
20// Contiki includes
21#include "process.h"
22#include "etimer.h"
23
34#define SUPERVISION_REPORT_TIMEOUT 8000
35#define SUPERVISION_SEND_DATA_EMERGENCY_TIMER 60000
36
42PROCESS_NAME(zwave_command_class_supervision_process);
43
47typedef enum {
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
60typedef struct supervised_session {
66 void *user;
72 uint8_t status;
74 clock_time_t expiry_time;
80
101
103 supervision_id_t supervision_id);
104
120 const zwave_controller_connection_info_t *connection,
121 const zwave_tx_options_t *tx_options,
123 void *user);
124
136 supervision_id_t supervision_id);
137
151 supervision_id_t supervision_id, zwave_tx_session_id_t tx_session_id);
152
157
158#ifdef __cplusplus
159}
160#endif
161
164#endif // ZWAVE_COMMAND_CLASS_SUPERVISION_PROCESS_H
uint32_t sl_status_t
Definition: sl_status.h:139
uint32_t supervision_id_t
Definition: zwave_command_class_supervision_internals.h:48
zwave_command_class_supervision_events_t
Event definitions for the Z-Wave Command Class Supervision Process.
Definition: zwave_command_class_supervision_process.h:47
PROCESS_NAME(zwave_command_class_supervision_process)
Name the of contiki process for the Supervision Command Class.
sl_status_t zwave_command_class_supervision_close_session(supervision_id_t supervision_id)
Closes a supervised session.
sl_status_t zwave_command_class_supervision_assign_session_tx_id(supervision_id_t supervision_id, zwave_tx_session_id_t tx_session_id)
Assigns a Z-Wave TX Session ID to a supervision Session ID.
supervision_id_t zwave_command_class_supervision_find_session(uint8_t session_id, zwave_node_id_t node_id, zwave_endpoint_id_t endpoint_id)
Retrieves a supervised session based on its ID.
supervised_session_t * zwave_command_class_supervision_find_session_by_unique_id(supervision_id_t supervision_id)
supervision_id_t zwave_command_class_supervision_create_session(const zwave_controller_connection_info_t *connection, const zwave_tx_options_t *tx_options, on_zwave_tx_send_data_complete_t callback, void *user)
Creates a new supe a supervised session.
struct supervised_session supervised_session_t
void zwave_command_class_supervision_process_log()
Logs the state of the Supervision process, with sessions and timers.
@ ZWAVE_COMMAND_CLASS_SUPERVISION_START_TIMER
Start a timer for a Supervised session.
Definition: zwave_command_class_supervision_process.h:49
uint8_t zwave_endpoint_id_t
Z-Wave Endpoint ID type.
Definition: zwave_node_id_definitions.h:125
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
Definition: zwave_command_class_supervision_process.h:60
supervision_session_t session
‍Session information with the remote node.
Definition: zwave_command_class_supervision_process.h:62
void * user
User pointer for the callback function.
Definition: zwave_command_class_supervision_process.h:66
bool tx_info_valid
‍Used to indicate if the data contained in tx_info is valid
Definition: zwave_command_class_supervision_process.h:68
zwapi_tx_report_t tx_info
used to forward the tx_info to the user callback.
Definition: zwave_command_class_supervision_process.h:70
clock_time_t expiry_time
‍Timeout after which we consider the supervision to have failed.
Definition: zwave_command_class_supervision_process.h:74
on_zwave_tx_send_data_complete_t callback
‍Callback for the application that initiated this supervision session
Definition: zwave_command_class_supervision_process.h:64
bool tx_session_valid
‍Indicates if the value in tx_session_id is valid.
Definition: zwave_command_class_supervision_process.h:76
zwave_tx_session_id_t tx_session_id
‍Z-Wave Tx session ID used to transmit the Supervision Get (follow-up)
Definition: zwave_command_class_supervision_process.h:78
uint8_t status
‍The Supervision Status value (SUPERVISION_REPORT_SUCCESS, SUPERVISION_REPORT_FAIL,...
Definition: zwave_command_class_supervision_process.h:72
Definition: zwave_command_class_supervision_internals.h:71
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_endpoint_id_t endpoint_id
const zwave_node_id_t node_id
static void callback(uint8_t status, const zwapi_tx_report_t *tx_info, void *user)
Z-Wave Tx Send data callback function.
Definition: zwave_s0_transport.c:601