Z-Wave Protocol Controller Reference
zwave_command_class_supervision_internals.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_COMMAND_CLASS_SUPERVISION_INTERNALS_H
23#define ZWAVE_COMMAND_CLASS_SUPERVISION_INTERNALS_H
24
25#include "zwave_utils.h" // for ZWAVE_MAX_FRAME_SIZE
26
27// Helpers to parse incoming frames
28#define SUPERVISION_GET_SESSION_ID_INDEX 2
29#define SUPERVISION_GET_ENCAPSULATED_COMMANDS_LENGTH_INDEX 3
30
31#define SUPERVISION_REPORT_MORE_STATUS_INDEX 2
32#define SUPERVISION_REPORT_SESSION_ID_INDEX 2
33#define SUPERVISION_REPORT_STATUS_INDEX 3
34#define SUPERVISION_REPORT_DURATION_INDEX 4
35
36// Missing defines from ZW_Classcmd.h
37#define SUPERVISION_VERSION_V2 0x02
38#define SUPERVISION_REPORT_PROPERTIES1_WAKE_UP_BIT_MASK 0x40
39
40// We allow to encapsulate frame as big as "ZWAVE_MAX_FRAME_SIZE"
41#define SUPERVISION_ENCAPSULATED_COMMAND_MAXIMUM_SIZE ZWAVE_MAX_FRAME_SIZE
42
43// Default session duration when nodes report Unknown duration
44#define MINUTE_IN_MS 60 * 100
45#define SUPERVISION_DEFAULT_SESSION_DURATION 1 * MINUTE_IN_MS
46
47// Unique ID/handle associated to each supervision session.
48typedef uint32_t supervision_id_t;
49#define INVALID_SUPERVISION_ID ((supervision_id_t)0)
50
58 uint8_t command;
66
71typedef struct supervision_session {
73 uint8_t session_id;
81
82#ifdef __cplusplus
83extern "C" {
84#endif
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif //ZWAVE_COMMAND_CLASS_SUPERVISION_INTERNALS_H
struct zwave_supervision_get_frame zwave_supervision_get_frame_t
#define SUPERVISION_ENCAPSULATED_COMMAND_MAXIMUM_SIZE
Definition: zwave_command_class_supervision_internals.h:41
uint32_t supervision_id_t
Definition: zwave_command_class_supervision_internals.h:48
struct supervision_session supervision_session_t
uint8_t zwave_multicast_group_id_t
Definition: zwave_controller_types.h:43
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
Definition: zwave_command_class_supervision_internals.h:71
zwave_endpoint_id_t endpoint_id
Multicast Group ID used in Multicast and Singlecast follow-up frames.
Definition: zwave_command_class_supervision_internals.h:77
uint8_t session_id
< Session ID passed as part of the Supervision Command
Definition: zwave_command_class_supervision_internals.h:73
zwave_multicast_group_id_t group_id
Definition: zwave_command_class_supervision_internals.h:79
zwave_node_id_t node_id
Endpoint associated with the Session ID.
Definition: zwave_command_class_supervision_internals.h:75
Definition: zwave_command_class_supervision_internals.h:54
uint8_t command_class
‍Command Class identifier
Definition: zwave_command_class_supervision_internals.h:56
uint8_t command
‍Command identifier
Definition: zwave_command_class_supervision_internals.h:58
uint8_t encapsulated_command[SUPERVISION_ENCAPSULATED_COMMAND_MAXIMUM_SIZE]
‍Encapsulated command
Definition: zwave_command_class_supervision_internals.h:64
uint8_t encapsulated_command_length
‍length of the encapsulated command
Definition: zwave_command_class_supervision_internals.h:62
uint8_t status_wake_session_field
‍Status Updates / Wake up Request / Session ID
Definition: zwave_command_class_supervision_internals.h:60
Various Z-Wave related utilities.