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.

MyIndication.h 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #ifndef MyIndication_h
  20. #define MyIndication_h
  21. /**
  22. * Indication type
  23. */
  24. typedef enum {
  25. INDICATION_TX = 0, //!< Sent a message.
  26. INDICATION_RX, //!< Received a message.
  27. INDICATION_GW_TX, //!< Gateway transmit message.
  28. INDICATION_GW_RX, //!< Gateway receive message.
  29. INDICATION_FIND_PARENT, //!< Start finding parent node.
  30. INDICATION_GOT_PARENT, //!< Found parent node.
  31. INDICATION_REQ_NODEID, //!< Request node ID.
  32. INDICATION_GOT_NODEID, //!< Got a node ID.
  33. INDICATION_CHECK_UPLINK, //!< Check uplink
  34. INDICATION_REQ_REGISTRATION, //!< Request node registration.
  35. INDICATION_GOT_REGISTRATION, //!< Got registration response.
  36. INDICATION_REBOOT, //!< Rebooting node.
  37. INDICATION_PRESENT, //!< Presenting node to gateway.
  38. INDICATION_CLEAR_ROUTING, //!< Clear routing table requested.
  39. INDICATION_SLEEP, //!< Node goes to sleep.
  40. INDICATION_WAKEUP, //!< Node just woke from sleep.
  41. INDICATION_FW_UPDATE_START, //!< Start of OTA firmware update process.
  42. INDICATION_FW_UPDATE_RX, //!< Received a piece of firmware data.
  43. INDICATION_FW_UPDATE_RX_ERR, //!< Received wrong piece of firmware data.
  44. INDICATION_ERR_START = 100,
  45. INDICATION_ERR_HW_INIT, //!< HW initialization error
  46. INDICATION_ERR_TX, //!< Failed to transmit message.
  47. INDICATION_ERR_TRANSPORT_FAILURE, //!< Transport failure.
  48. INDICATION_ERR_INIT_TRANSPORT, //!< MySensors transport hardware (radio) init failure.
  49. INDICATION_ERR_FIND_PARENT, //!< Failed to find parent node.
  50. INDICATION_ERR_GET_NODEID, //!< Failed to receive node ID.
  51. INDICATION_ERR_CHECK_UPLINK, //!< Failed to check uplink
  52. INDICATION_ERR_SIGN, //!< Error signing.
  53. INDICATION_ERR_LENGTH, //!< Invalid message length.
  54. INDICATION_ERR_VERSION, //!< Protocol version mismatch.
  55. INDICATION_ERR_NET_FULL, //!< Network full. All node ID's are taken.
  56. INDICATION_ERR_INIT_GWTRANSPORT, //!< Gateway transport hardware init failure.
  57. INDICATION_ERR_LOCKED, //!< Node is locked.
  58. INDICATION_ERR_FW_FLASH_INIT, //!< Firmware update flash initialisation failure.
  59. INDICATION_ERR_FW_TIMEOUT, //!< Firmware update timeout.
  60. INDICATION_ERR_FW_CHECKSUM, //!< Firmware update checksum mismatch.
  61. INDICATION_ERR_END
  62. } indication_t;
  63. /**
  64. * Function which is called when something changes about the internal state of MySensors.
  65. * @param ind Event indication of what happened.
  66. */
  67. void setIndication( const indication_t ind );
  68. /**
  69. * Allow user to define their own indication handler.
  70. */
  71. void indication( const indication_t );
  72. #endif