|
16 | 16 | * modify it under the terms of the GNU General Public License
|
17 | 17 | * version 2 as published by the Free Software Foundation.
|
18 | 18 | */
|
19 |
| - |
| 19 | +/** |
| 20 | + * @file MyCapabilities.h |
| 21 | + * @ingroup MyCapabilities |
| 22 | + */ |
20 | 23 |
|
21 | 24 | #ifndef MyCapabilities_h
|
22 | 25 | #define MyCapabilities_h
|
| 26 | +/** |
| 27 | + * @defgroup MyCapabilities Node capabilities indicator |
| 28 | + * @ingroup MyConfigGrp |
| 29 | + * |
| 30 | + * @brief MySensors capabilities indications. |
| 31 | + * |
| 32 | + * At node startup, a capabilities string is shown as part of the initialization logs. |
| 33 | + * This string indicate what configuration the node is running with. |
| 34 | + * |
| 35 | + * The string symbols are ordered in the following way: |
| 36 | + * | Setting | Reset | Radio | OTA | Node | Architecture | Signing | Buffering | Encryption |
| 37 | + * |-----------|-------------------|-------------------|--------------------|------------------|------------------|------------------|-------------------|----------------- |
| 38 | + * | Indicator | @ref MY_CAP_RESET | @ref MY_CAP_RADIO | @ref MY_CAP_OTA_FW | @ref MY_CAP_TYPE | @ref MY_CAP_ARCH | @ref MY_CAP_SIGN | @ref MY_CAP_RXBUF | @ref MY_CAP_ENCR |
| 39 | + * |
| 40 | + * @see MY_CAPABILITIES |
| 41 | + * |
| 42 | + * @{ |
| 43 | + */ |
23 | 44 |
|
24 | 45 | // Remote reset
|
| 46 | +/** |
| 47 | + * @def MY_CAP_RESET |
| 48 | + * @brief Indicate the remote reset setting. |
| 49 | + * |
| 50 | + * @see MY_DISABLE_REMOTE_RESET |
| 51 | + * |
| 52 | + * | Setting | Indicator |
| 53 | + * |------------|---------- |
| 54 | + * | Enabled | R |
| 55 | + * | Disabled | N |
| 56 | + */ |
25 | 57 | #if defined(MY_DISABLE_REMOTE_RESET)
|
26 | 58 | #define MY_CAP_RESET "N"
|
27 | 59 | #else
|
28 | 60 | #define MY_CAP_RESET "R"
|
29 | 61 | #endif
|
30 | 62 |
|
31 |
| -// OTA firmware uodate feature |
| 63 | +// OTA firmware update feature |
| 64 | +/** |
| 65 | + * @def MY_CAP_OTA_FW |
| 66 | + * @brief Indicate the OTA update setting. |
| 67 | + * |
| 68 | + * @see MY_OTA_FIRMWARE_FEATURE |
| 69 | + * |
| 70 | + * | Setting | Indicator |
| 71 | + * |------------|---------- |
| 72 | + * | Enabled | O |
| 73 | + * | Disabled | N |
| 74 | + */ |
32 | 75 | #if defined(MY_OTA_FIRMWARE_FEATURE)
|
33 | 76 | #define MY_CAP_OTA_FW "O"
|
34 | 77 | #else
|
35 | 78 | #define MY_CAP_OTA_FW "N"
|
36 | 79 | #endif
|
37 | 80 |
|
38 | 81 | // Transport
|
39 |
| -#if defined(MY_RADIO_NRF24) || defined(MY_RADIO_NRF5_ESB) |
| 82 | +/** |
| 83 | + * @def MY_CAP_RADIO |
| 84 | + * @brief Indicate the type of transport selected. |
| 85 | + * |
| 86 | + * @see MY_RADIO_RF24, MY_RADIO_NRF5_ESB, MY_RADIO_RFM69, MY_RFM69_NEW_DRIVER, MY_RADIO_RFM95, MY_RS485 |
| 87 | + * |
| 88 | + * | Radio | Indicator |
| 89 | + * |--------------|---------- |
| 90 | + * | nRF24/nRF5 | N |
| 91 | + * | %RFM69 (old) | R |
| 92 | + * | %RFM69 (new) | P |
| 93 | + * | RFM95 | L |
| 94 | + * | RS485 | S |
| 95 | + * | None | - |
| 96 | + */ |
| 97 | +#if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) |
40 | 98 | #define MY_CAP_RADIO "N"
|
41 | 99 | #elif defined(MY_RADIO_RFM69)
|
42 | 100 | #if !defined(MY_RFM69_NEW_DRIVER)
|
|
55 | 113 | #endif
|
56 | 114 |
|
57 | 115 | // Node type
|
| 116 | +/** |
| 117 | + * @def MY_CAP_TYPE |
| 118 | + * @brief Indicate the type of node. |
| 119 | + * |
| 120 | + * @see MY_GATEWAY_FEATURE, MY_REPEATER_FEATURE, MY_PASSIVE_NODE |
| 121 | + * |
| 122 | + * | Node type | Indicator |
| 123 | + * |-----------|---------- |
| 124 | + * | Gateway | G |
| 125 | + * | Repeater | R |
| 126 | + * | Passive | P |
| 127 | + * | Node | N |
| 128 | + */ |
58 | 129 | #if defined(MY_GATEWAY_FEATURE)
|
59 | 130 | #define MY_CAP_TYPE "G"
|
60 | 131 | #elif defined(MY_REPEATER_FEATURE)
|
|
66 | 137 | #endif
|
67 | 138 |
|
68 | 139 | // Architecture
|
| 140 | +/** |
| 141 | + * @def MY_CAP_ARCH |
| 142 | + * @brief Indicate the architecture. |
| 143 | + * |
| 144 | + * @see ARDUINO_ARCH_SAMD, ARDUINO_ARCH_NRF5, ARDUINO_ARCH_ESP8266, ARDUINO_ARCH_AVR, ARDUINO_ARCH_STM32F1, TEENSYDUINO |
| 145 | + * |
| 146 | + * | Architecture | Indicator |
| 147 | + * |--------------|---------- |
| 148 | + * | SAMD | S |
| 149 | + * | nRF5 | N |
| 150 | + * | ESP8266 | E |
| 151 | + * | AVR | A |
| 152 | + * | STM32F1 | F |
| 153 | + * | TEENSY | T |
| 154 | + * | Linux | L |
| 155 | + * | Unknown | - |
| 156 | + */ |
69 | 157 | #if defined(ARDUINO_ARCH_SAMD)
|
70 | 158 | #define MY_CAP_ARCH "S"
|
71 | 159 | #elif defined(ARDUINO_ARCH_NRF5)
|
|
85 | 173 | #endif
|
86 | 174 |
|
87 | 175 | // Signing
|
| 176 | +/** |
| 177 | + * @def MY_CAP_SIGN |
| 178 | + * @brief Indicate the signing backend used. |
| 179 | + * |
| 180 | + * @see MY_SIGNING_ATSHA204, MY_SIGNING_SOFT |
| 181 | + * |
| 182 | + * | Signing backend | Indicator |
| 183 | + * |-----------------|---------- |
| 184 | + * | ATSHA204 | A |
| 185 | + * | Software | S |
| 186 | + * | No signing | - |
| 187 | + */ |
88 | 188 | #if defined(MY_SIGNING_ATSHA204)
|
89 | 189 | #define MY_CAP_SIGN "A"
|
90 | 190 | #elif defined(MY_SIGNING_SOFT)
|
|
94 | 194 | #endif
|
95 | 195 |
|
96 | 196 | // RX queue
|
| 197 | +/** |
| 198 | + * @def MY_CAP_RXBUF |
| 199 | + * @brief Indicate the rx message buffer setting. |
| 200 | + * |
| 201 | + * @see MY_RX_MESSAGE_BUFFER_FEATURE |
| 202 | + * |
| 203 | + * | Setting | Indicator |
| 204 | + * |------------|---------- |
| 205 | + * | Enabled | Q |
| 206 | + * | Disabled | - |
| 207 | + */ |
97 | 208 | #if defined(MY_RX_MESSAGE_BUFFER_FEATURE)
|
98 | 209 | #define MY_CAP_RXBUF "Q"
|
99 | 210 | #else
|
100 | 211 | #define MY_CAP_RXBUF "-"
|
101 | 212 | #endif
|
102 | 213 |
|
103 | 214 | // Radio encryption
|
104 |
| -#if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) |
| 215 | +/** |
| 216 | + * @def MY_CAP_ENCR |
| 217 | + * @brief Indicate the encryption setting. |
| 218 | + * |
| 219 | + * @see MY_RF24_ENABLE_ENCRYPTION, MY_RFM69_ENABLE_ENCRYPTION, MY_NRF5_ESB_ENABLE_ENCRYPTION |
| 220 | + * |
| 221 | + * | Setting | Indicator |
| 222 | + * |------------|---------- |
| 223 | + * | Enabled | X |
| 224 | + * | Disabled | - |
| 225 | + */ |
| 226 | +#if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined (MY_NRF5_ESB_ENABLE_ENCRYPTION) |
105 | 227 | #define MY_CAP_ENCR "X"
|
106 | 228 | #else
|
107 | 229 | #define MY_CAP_ENCR "-"
|
108 | 230 | #endif
|
109 | 231 |
|
110 | 232 |
|
| 233 | +/** |
| 234 | + * @def MY_CAPABILITIES |
| 235 | + * @brief This is the resulting capabilities string. |
| 236 | + * |
| 237 | + * @see MY_CAP_RESET, MY_CAP_RADIO, MY_CAP_OTA_FW, MY_CAP_TYPE, MY_CAP_ARCH, MY_CAP_SIGN, MY_CAP_RXBUF, MY_CAP_ENCR |
| 238 | + */ |
111 | 239 | #define MY_CAPABILITIES MY_CAP_RESET MY_CAP_RADIO MY_CAP_OTA_FW MY_CAP_TYPE MY_CAP_ARCH MY_CAP_SIGN MY_CAP_RXBUF MY_CAP_ENCR
|
112 | 240 |
|
| 241 | +/** @}*/ // End of MyCapabilities group |
113 | 242 | #endif /* MyCapabilities_h */
|
0 commit comments