MySensors Library & Examples  2.3.2-81-gc6a82f99
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-2025 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
99 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB)
100 #define MY_CAP_TRANSPORT "N"
101 #elif defined(MY_RADIO_RFM69)
102 #if !defined(MY_RFM69_NEW_DRIVER)
103 // old RFM69 driver
104 #define MY_CAP_TRANSPORT "R"
105 #else
106 // new RFM69 driver
107 #define MY_CAP_TRANSPORT "P"
108 #endif
109 #elif defined(MY_RADIO_RFM95)
110 #define MY_CAP_TRANSPORT "L"
111 #elif defined(MY_RS485)
112 #define MY_CAP_TRANSPORT "S"
113 #elif defined(MY_PJON)
114 #define MY_CAP_TRANSPORT "J"
115 #elif defined(MY_RADIO_SX126x)
116 #define MY_CAP_TRANSPORT "X"
117 #else
118 #define MY_CAP_TRANSPORT "-"
119 #endif
120 
121 // Node type
135 #if defined(MY_GATEWAY_FEATURE)
136 #define MY_CAP_TYPE "G"
137 #elif defined(MY_REPEATER_FEATURE)
138 #define MY_CAP_TYPE "R"
139 #elif defined(MY_PASSIVE_NODE)
140 #define MY_CAP_TYPE "P"
141 #else
142 #define MY_CAP_TYPE "N"
143 #endif
144 
145 // Architecture
164 #if defined(ARDUINO_ARCH_SAMD)
165 #define MY_CAP_ARCH "S"
166 #elif defined(ARDUINO_ARCH_NRF5)
167 #define MY_CAP_ARCH "N"
168 #elif defined(ARDUINO_ARCH_ESP8266)
169 #define MY_CAP_ARCH "E"
170 #elif defined(ARDUINO_ARCH_ESP32)
171 #define MY_CAP_ARCH "F"
172 #elif defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
173 #define MY_CAP_ARCH "A"
174 #elif defined(ARDUINO_ARCH_STM32)
175 #define MY_CAP_ARCH "M"
176 #elif defined(__arm__) && defined(TEENSYDUINO)
177 #define MY_CAP_ARCH "T"
178 #elif defined(__linux__)
179 #define MY_CAP_ARCH "L"
180 #else
181 #define MY_CAP_ARCH "-"
182 #endif
183 
184 // Signing
197 #if defined(MY_SIGNING_ATSHA204)
198 #define MY_CAP_SIGN "A"
199 #elif defined(MY_SIGNING_SOFT)
200 #define MY_CAP_SIGN "S"
201 #else
202 #define MY_CAP_SIGN "-"
203 #endif
204 
205 // RX queue
217 #if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
218 #define MY_CAP_RXBUF "Q"
219 #else
220 #define MY_CAP_RXBUF "-"
221 #endif
222 
223 // Radio encryption
235 #if defined(MY_ENCRYPTION_FEATURE)
236 #define MY_CAP_ENCR "X"
237 #else
238 #define MY_CAP_ENCR "-"
239 #endif
240 
241 
248 #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
249  // End of MyCapabilities group
251 #endif /* MyCapabilities_h */