IdentifierFileFormat.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * @brief Defines the communication file format
  3. * @file aman/config/CommunicationFileFormat.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 <aman/config/FileFormat.h>
  10. #include <aman/types/Communication.h>
  11. namespace aman {
  12. /**
  13. * @brief Defines the parser of communication configurations
  14. * @ingroup format
  15. *
  16. * All configuration entries need to be stored in 'AmanCommunication.txt'.
  17. *
  18. * The following entries of the configuration exist:
  19. * <table>
  20. * <caption id="multi_row">Setting entries</caption>
  21. * <tr>
  22. * <th>Name</th><th>Description</th><th>Default value</th><th>Unit</th>
  23. * </tr>
  24. * <tr>
  25. * <td>UID</td>
  26. * <td>Defines the identifier to access the backend.</td>
  27. * <td></td><td></td>
  28. * </tr>
  29. * </table>
  30. */
  31. class IdentifierFileFormat : public FileFormat {
  32. #ifndef DOXYGEN_IGNORE
  33. public:
  34. /**
  35. * @brief Initializes the identifier file format
  36. */
  37. IdentifierFileFormat();
  38. /**
  39. * @brief Parses the set configuration file
  40. * @param[in] filename The path to the configuration file
  41. * @param[out] config The resulting configuration
  42. * @return True if the configuration file was valid, else false
  43. */
  44. bool parse(const std::string& filename, Communication& config);
  45. #endif
  46. };
  47. }