MySensors Library & Examples  2.3.2-119-g6af75d19
MyCapabilities.h
Go to the documentation of this file.
1 /*
2  * The MySensors Arduino library handles the wireless radio link and protocol
3  * between your home built sensors/actuators and HA controller of choice.
4  * The sensors forms a self healing radio network with optional repeaters. Each
5  * repeater and gateway builds a routing tables in EEPROM which keeps track of the
6  * network topology allowing messages to be routed to nodes.
7  *
8  * Created by Henrik Ekblad <[email protected]>
9  * Copyright (C) 2013-2026 Sensnology AB
10  * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11  *
12  * Documentation: http://www.mysensors.org
13  * Support Forum: http://forum.mysensors.org
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * version 2 as published by the Free Software Foundation.
18  */
24 #ifndef MyCapabilities_h
25 #define MyCapabilities_h
26 
45 // Remote reset
57 #if defined(MY_DISABLE_REMOTE_RESET)
58 #define MY_CAP_RESET "N"
59 #else
60 #define MY_CAP_RESET "R"
61 #endif
62 
63 // OTA firmware update feature
75 #if defined(MY_OTA_FIRMWARE_FEATURE)
76 #define MY_CAP_OTA_FW "O"
77 #else
78 #define MY_CAP_OTA_FW "N"
79 #endif
80 
81 // Transport
100 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB)
101 #define MY_CAP_TRANSPORT "N"
102 #elif defined(MY_RADIO_RFM69)
103 #if !defined(MY_RFM69_NEW_DRIVER)
104 // old RFM69 driver
105 #define MY_CAP_TRANSPORT "R"
106 #else
107 // new RFM69 driver
108 #define MY_CAP_TRANSPORT "P"
109 #endif
110 #elif defined(MY_RADIO_RFM95)
111 #define MY_CAP_TRANSPORT "L"
112 #elif defined(MY_RS485)
113 #define MY_CAP_TRANSPORT "S"
114 #elif defined(MY_PJON)
115 #define MY_CAP_TRANSPORT "J"
116 #elif defined(MY_RADIO_SX126x)
117 #define MY_CAP_TRANSPORT "X"
118 #elif defined(MY_RADIO_CC1101)
119 #define MY_CAP_TRANSPORT "C"
120 #else
121 #define MY_CAP_TRANSPORT "-"
122 #endif
123 
124 // Node type
138 #if defined(MY_GATEWAY_FEATURE)
139 #define MY_CAP_TYPE "G"
140 #elif defined(MY_REPEATER_FEATURE)
141 #define MY_CAP_TYPE "R"
142 #elif defined(MY_PASSIVE_NODE)
143 #define MY_CAP_TYPE "P"
144 #else
145 #define MY_CAP_TYPE "N"
146 #endif
147 
148 // Architecture
167 #if defined(ARDUINO_ARCH_SAMD)
168 #define MY_CAP_ARCH "S"
169 #elif defined(ARDUINO_ARCH_NRF5)
170 #define MY_CAP_ARCH "N"
171 #elif defined(ARDUINO_ARCH_ESP8266)
172 #define MY_CAP_ARCH "E"
173 #elif defined(ARDUINO_ARCH_ESP32)
174 #define MY_CAP_ARCH "F"
175 #elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
176 #define MY_CAP_ARCH "A"
177 #elif defined(ARDUINO_ARCH_STM32)
178 #define MY_CAP_ARCH "M"
179 #elif defined(__arm__) && defined(TEENSYDUINO)
180 #define MY_CAP_ARCH "T"
181 #elif defined(__linux__)
182 #define MY_CAP_ARCH "L"
183 #else
184 #define MY_CAP_ARCH "-"
185 #endif
186 
187 // Signing
200 #if defined(MY_SIGNING_ATSHA204)
201 #define MY_CAP_SIGN "A"
202 #elif defined(MY_SIGNING_SOFT)
203 #define MY_CAP_SIGN "S"
204 #else
205 #define MY_CAP_SIGN "-"
206 #endif
207 
208 // RX queue
220 #if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
221 #define MY_CAP_RXBUF "Q"
222 #else
223 #define MY_CAP_RXBUF "-"
224 #endif
225 
226 // Radio encryption
238 #if defined(MY_ENCRYPTION_FEATURE)
239 #define MY_CAP_ENCR "X"
240 #else
241 #define MY_CAP_ENCR "-"
242 #endif
243 
244 
251 #define MY_CAPABILITIES MY_CAP_RESET MY_CAP_TRANSPORT MY_CAP_OTA_FW MY_CAP_TYPE MY_CAP_ARCH MY_CAP_SIGN MY_CAP_RXBUF MY_CAP_ENCR
252  // End of MyCapabilities group
254 #endif /* MyCapabilities_h */