Z-Wave Protocol Controller Reference
zwave_helper_macros.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2022 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
24#ifndef ZWAVE_HELPER_MACROS_H
25#define ZWAVE_HELPER_MACROS_H
26
28
30#define TRANSMIT_COMPLETE_OK 0x00
32#define TRANSMIT_COMPLETE_NO_ACK 0x01
34#define TRANSMIT_COMPLETE_FAIL 0x02
36#define TRANSMIT_ROUTING_NOT_IDLE 0x03
38#define TRANSMIT_COMPLETE_NOROUTE 0x04
40#define TRANSMIT_COMPLETE_VERIFIED 0x05
41
42// Helper macro that will indicate if a Z-Wave API transmission status is successful.
43#define IS_TRANSMISSION_SUCCESSFUL(status) \
44 ((status == TRANSMIT_COMPLETE_OK) || (status == TRANSMIT_COMPLETE_VERIFIED))
45
46// Helper macro making a string out of a symbol
47#define STR_CASE(x) \
48 case x: \
49 return #x;
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif //ZWAVE_HELPER_MACROS_H