Bläddra i källkod

add missing documentation

Sven Czarnian 3 år sedan
förälder
incheckning
0fa3559fc4
2 ändrade filer med 21 tillägg och 9 borttagningar
  1. 20 8
      include/aman/com/AircraftReporter.h
  2. 1 1
      src/com/AircraftReporter.cpp

+ 20 - 8
include/aman/com/AircraftReporter.h

@@ -14,10 +14,8 @@
 
 namespace aman {
     /**
-     * @brief Defines the base class for all file formats
-     * @ingroup format
-     *
-     * The base class provides error information, etc.
+     * @brief Defines the aircraft reporter class which sends aircraft information to the backend
+     * @ingroup com
      */
     class AircraftReporter {
     private:
@@ -42,12 +40,26 @@ namespace aman {
         AircraftReporter& operator=(const AircraftReporter&) = delete;
         AircraftReporter& operator=(AircraftReporter&&) = delete;
 
+        /**
+         * @brief Initializes the aircraft reporter
+         * @param[in] configuration The current AMAM communication configuration
+         * @return True if the initialization is done, else false
+         */
         bool initialize(const Communication& configuration);
+        /**
+         * @brief Terminates the reporter connection
+         */
         bool deinitialize();
-
-        bool send(zmq::message_t& message);
-
-        static AircraftReporter& instance();
+        /**
+         * @brief Sends a new message to the backend
+         * @param[in] report The new aircraft report
+         * @return True if the report is sent, else false
+         */
         bool send(const aman::AircraftReport& report);
+        /**
+         * @brief Returns the reporter instance
+         * @return The system-wide instance
+         */
+        static AircraftReporter& instance() noexcept;
     };
 }

+ 1 - 1
src/com/AircraftReporter.cpp

@@ -79,7 +79,7 @@ bool AircraftReporter::send(const aman::AircraftReport& report) {
     return retval;
 }
 
-AircraftReporter& AircraftReporter::instance() {
+AircraftReporter& AircraftReporter::instance() noexcept {
     static AircraftReporter __instance;
     return __instance;
 }