|
305 | 305 | //#define MY_RS485_DE_INVERSE
|
306 | 306 |
|
307 | 307 | /**
|
308 |
| - * @def MY_RS485_HWSERIAL |
309 |
| - * @brief Define this if RS485 is connected to a hardware serial port. |
310 |
| - * |
311 |
| - * Example: @code #define MY_RS485_HWSERIAL Serial1 @endcode |
312 |
| - */ |
| 308 | +* @def MY_RS485_HWSERIAL |
| 309 | +* @brief Define this if RS485 is connected to a hardware serial port. |
| 310 | +* |
| 311 | +* Example: @code #define MY_RS485_HWSERIAL Serial1 @endcode |
| 312 | +*/ |
313 | 313 | //#define MY_RS485_HWSERIAL (Serial1)
|
314 | 314 | /** @}*/ // End of RS485SettingGrpPub group
|
315 | 315 |
|
| 316 | +/** |
| 317 | +* @defgroup EtherTcpSettingGrpPub ETHER_TCP |
| 318 | +* @ingroup RadioSettingGrpPub |
| 319 | +* @brief These options are specific to the Ethernet via TCP transport. |
| 320 | +* @{ |
| 321 | +*/ |
| 322 | + |
| 323 | +/** |
| 324 | +* @def MY_ETHER_TCP |
| 325 | +* @brief Define this to use the Ethernet via TCP transport or WiFi with ESP8266 for sensor network communication. |
| 326 | +*/ |
| 327 | +//#define MY_ETHER_TCP |
| 328 | + |
| 329 | +/** |
| 330 | +* @def MY_ETHER_TCP_SERVER |
| 331 | +* @brief The ETHER_TCP server name or server IP. |
| 332 | +*/ |
| 333 | +#ifndef MY_ETHER_TCP_SERVER |
| 334 | +#define MY_ETHER_TCP_SERVER "localhost" |
| 335 | +#endif |
| 336 | + |
| 337 | +/** |
| 338 | +* @def MY_ETHER_TCP_PORT |
| 339 | +* @brief The ETHER_TCP server IP port. |
| 340 | +*/ |
| 341 | +#ifndef MY_ETHER_TCP_PORT |
| 342 | +#define MY_ETHER_TCP_PORT (5445) |
| 343 | +#endif |
| 344 | + |
| 345 | +/** |
| 346 | +* @def MY_ETHER_TCP_MAX_MESSAGE_LENGTH |
| 347 | +* @brief The maximum message length used for Ethernet TCP transport. |
| 348 | +*/ |
| 349 | +#ifndef MY_ETHER_TCP_MAX_MESSAGE_LENGTH |
| 350 | +#define MY_ETHER_TCP_MAX_MESSAGE_LENGTH (40) |
| 351 | +#endif |
| 352 | +/** @}*/ // End of EtherTcpSettingGrpPub group |
| 353 | + |
316 | 354 | /**
|
317 | 355 | * @defgroup RF24SettingGrpPub RF24
|
318 | 356 | * @ingroup TransportSettingGrpPub
|
|
1250 | 1288 | * Incompatible libraries are unable to send sensor data.
|
1251 | 1289 | */
|
1252 | 1290 | #define MY_CORE_COMPATIBILITY_CHECK
|
| 1291 | + |
| 1292 | +/** |
| 1293 | +* @def MY_PROCESS_SYNCHRONIZATION |
| 1294 | +* @brief This applies only to MyVirtualSensor WIN32 applications. |
| 1295 | +* If defined, _coreprocess() will acquire a named mutex and stop |
| 1296 | +* all other running virtual MySensors applications until _process ends. |
| 1297 | +* This is useful for debug of this application in Visual Studio |
| 1298 | +* while other MyVirtualSensor WIN32 applications are running at the same time. |
| 1299 | +* When you reach a breakpoint in this app then all ather applications also will stop. |
| 1300 | +*/ |
| 1301 | +//#define MY_PROCESS_SYNCHRONIZATION |
1253 | 1302 | /** @}*/ // End of CoreSettingGrpPub group
|
1254 | 1303 |
|
1255 | 1304 | /**
|
|
1445 | 1494 | * @brief Define this for Ethernet GW based on the ESP32.
|
1446 | 1495 | * @def MY_GATEWAY_LINUX
|
1447 | 1496 | * @brief Define this for Ethernet GW based on Linux.
|
| 1497 | + * @def MY_GATEWAY_WIN32 |
| 1498 | + * @brief Define this for Ethernet GW based on Windows. |
1448 | 1499 | * @def MY_GATEWAY_TINYGSM
|
1449 | 1500 | * @brief Define this for Ethernet GW based on GSM modems supported by TinyGSM library.
|
1450 | 1501 | * @def MY_GATEWAY_MQTT_CLIENT
|
|
1459 | 1510 | //#define MY_GATEWAY_ESP8266_SECURE
|
1460 | 1511 | //#define MY_GATEWAY_ESP32
|
1461 | 1512 | //#define MY_GATEWAY_LINUX
|
| 1513 | +//#define MY_GATEWAY_WIN32 |
1462 | 1514 | //#define MY_GATEWAY_TINYGSM
|
1463 | 1515 | //#define MY_GATEWAY_MQTT_CLIENT
|
1464 | 1516 | //#define MY_GATEWAY_SERIAL
|
|
2271 | 2323 | #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
|
2272 | 2324 | #endif
|
2273 | 2325 | /** @}*/ // End of LinuxSettingGrpPub group
|
| 2326 | + |
| 2327 | +/** |
| 2328 | + * @defgroup Win32SettingGrpPub Win32 |
| 2329 | + * @ingroup PlatformSettingGrpPub |
| 2330 | + * @brief These options control Win32 specific configurations. |
| 2331 | + * @{ |
| 2332 | + */ |
| 2333 | + |
| 2334 | +/** |
| 2335 | +* @def MY_WIN32_CONFIG_FILE |
| 2336 | +* @brief Sets the filepath for the gateway config file. |
| 2337 | +* |
| 2338 | +* @note For now the configuration file is only used to store the emulated eeprom state. |
| 2339 | +*/ |
| 2340 | +#ifndef MY_WIN32_CONFIG_FILE |
| 2341 | +#define MY_WIN32_CONFIG_FILE "mysensors-eeprom.dat" |
| 2342 | +#endif |
| 2343 | +/** @}*/ // End of Win32SettingGrpPub group |
2274 | 2344 | /** @}*/ // End of PlatformSettingGrpPub group
|
2275 | 2345 |
|
2276 | 2346 | /*
|
|
2283 | 2353 | * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
|
2284 | 2354 | * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
|
2285 | 2355 | */
|
2286 |
| -#if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32)|| defined(MY_GATEWAY_LINUX) || defined(MY_GATEWAY_MQTT_CLIENT) || defined(MY_GATEWAY_TINYGSM) |
| 2356 | +#if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32)|| defined(MY_GATEWAY_LINUX) || defined(MY_GATEWAY_MQTT_CLIENT) || defined(MY_GATEWAY_TINYGSM) || defined(MY_GATEWAY_WIN32) |
2287 | 2357 | #define MY_GATEWAY_FEATURE
|
2288 | 2358 | #define MY_IS_GATEWAY (true)
|
2289 | 2359 | #define MY_NODE_TYPE "GW"
|
|
2313 | 2383 | #if defined(MY_DEBUG) || defined(MY_DEBUG_VERBOSE_CORE) || defined(MY_DEBUG_VERBOSE_TRANSPORT) || defined(MY_DEBUG_VERBOSE_GATEWAY) || defined(MY_DEBUG_VERBOSE_SIGNING) || defined(MY_DEBUG_VERBOSE_OTA_UPDATE) || defined(MY_DEBUG_VERBOSE_RF24) || defined(MY_DEBUG_VERBOSE_NRF5_ESB) || defined(MY_DEBUG_VERBOSE_RFM69) || defined(MY_DEBUG_VERBOSE_RFM95) || defined(MY_DEBUG_VERBOSE_TRANSPORT_HAL)
|
2314 | 2384 | #define DEBUG_OUTPUT_ENABLED //!< DEBUG_OUTPUT_ENABLED
|
2315 | 2385 | #ifndef MY_DEBUG_OTA
|
| 2386 | +#if defined(WIN32) |
| 2387 | +#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, __VA_ARGS__) //!< debug |
| 2388 | +#else |
2316 | 2389 | #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
|
| 2390 | +#endif |
2317 | 2391 | #else
|
2318 | 2392 | #ifndef MY_OTA_LOG_SENDER_FEATURE
|
2319 | 2393 | #define MY_OTA_LOG_SENDER_FEATURE
|
2320 | 2394 | #endif
|
2321 | 2395 | #ifndef MY_DEBUG_OTA_DISABLE_ECHO
|
| 2396 | +#if defined(WIN32) |
| 2397 | +#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, __VA_ARGS__) //!< debug |
| 2398 | +#else |
2322 | 2399 | #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__) //!< debug
|
| 2400 | +#endif |
| 2401 | +#else |
| 2402 | +#if defined(WIN32) |
| 2403 | +#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, __VA_ARGS__) //!< debug |
2323 | 2404 | #else
|
2324 | 2405 | #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__) //!< debug
|
2325 | 2406 | #endif
|
| 2407 | +#endif |
2326 | 2408 | // disable radio related debugging messages
|
2327 | 2409 | #undef MY_DEBUG_VERBOSE_RF24
|
2328 | 2410 | #undef MY_DEBUG_VERBOSE_NRF5_ESB
|
|
2469 | 2551 | #define MY_WIFI_BSSID
|
2470 | 2552 | #define MY_WIFI_PASSWORD
|
2471 | 2553 | #define MY_GATEWAY_LINUX
|
| 2554 | +#define MY_GATEWAY_WIN32 |
2472 | 2555 | #define MY_GATEWAY_TINYGSM
|
2473 | 2556 | #define MY_GATEWAY_MQTT_CLIENT
|
2474 | 2557 | #define MY_GATEWAY_SERIAL
|
|
0 commit comments