Communication.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * @brief Defines the communication configuration
  3. * @file aman/types/Communication.h
  4. * @author Sven Czarnian <devel@svcz.de>
  5. * @copyright Copyright 2021 Sven Czarnian
  6. * @license This project is published under the GNU General Public License v3 (GPLv3)
  7. */
  8. #pragma once
  9. #include <string>
  10. namespace aman {
  11. /**
  12. * @brief Defines the communication structure
  13. * @ingroup types
  14. */
  15. struct Communication {
  16. bool valid; /**< Marks if the configuration is valid */
  17. std::string address; /**< The address of the backend */
  18. std::uint16_t portReporter; /**< The reported port of the backend */
  19. std::uint16_t portNotification; /**< The notification port of the backend */
  20. std::string identifier; /**< The user's identifier for the connection */
  21. /**
  22. * @brief Initializes an invalid configuration
  23. */
  24. Communication() :
  25. valid(false),
  26. address(),
  27. portReporter(0),
  28. portNotification(0),
  29. identifier() { }
  30. };
  31. }