Smart-Home am Beispiel der Präsenzerkennung im Raum Projektarbeit Lennart Heimbs, Johannes Krug, Sebastian Dohle und Kevin Holzschuh bei Prof. Oliver Hofmann SS2019
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MyOTALogging.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <henrik.ekblad@mysensors.org>
  9. * Copyright (C) 2013-2018 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. */
  19. /**
  20. * @file MyOTALogging.h
  21. *
  22. * @brief API declaration for MyOTALogging
  23. * @defgroup MyOTALogginggrp MyOTALogging
  24. * @ingroup internals
  25. * @{
  26. *
  27. * @brief Enables ending and receiving debug messages over the air.
  28. */
  29. #ifndef MyOTALogging_h
  30. #define MyOTALogging_h
  31. #include "MySensorsCore.h"
  32. #include "MyTransport.h"
  33. /**
  34. * @brief Send a log message to a node
  35. *
  36. * If MY_OTA_LOG_RECEIVER_FEATURE is enabled on the destination node, the given
  37. * message is printed to the serial port. You have to define MY_OTA_LOG_SENDER_FEATURE
  38. * or MY_DEBUG_OTA to enable the OTALog() function.
  39. *
  40. * Output format of each line:
  41. * Node ID;CHILD_NODE_ID;C_INTERNAL;I_LOG_MESSAGE;hwMillis() MESSAGE
  42. *
  43. * You will see the hwMillis() of the receiving node. After each \n character, a
  44. * new debug message line starts. Incomplete messages are ending with '...'
  45. *
  46. * @param logNode Destination node ID
  47. * @param enableAck Enable or disable ACK flag
  48. * @param fmt printf format string
  49. * @param ... arguments
  50. */
  51. void OTALog(uint8_t logNode, bool enableAck, const char *fmt, ... );
  52. /**
  53. * @brief Handles output of OTA log or debug messages
  54. *
  55. * This function is used by MyTransport.cpp
  56. *
  57. * Output format of each line:
  58. * Node ID;CHILD_NODE_ID;C_INTERNAL;I_LOG_MESSAGE;hwMillis() MESSAGE
  59. *
  60. * You will see the hwMillis() of the receiving node. After each \n character, a
  61. * new debug message line starts. Incomplete messages are ending with '...'
  62. *
  63. * @param message Message buffer to use.
  64. */
  65. inline void OTALogPrint(const MyMessage &message);
  66. #endif /* MyOTALogging_h */
  67. /** @}*/