Browse Source

introduce the receiver of the scheduling information

Sven Czarnian 3 years ago
parent
commit
8230538325
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/PlugIn.cpp

+ 8 - 0
src/PlugIn.cpp

@@ -16,6 +16,7 @@
 #include <Windows.h>
 
 #include <aman/com/AircraftReporter.h>
+#include <aman/com/AircraftScheduler.h>
 #include <aman/config/CommunicationFileFormat.h>
 #include <aman/config/IdentifierFileFormat.h>
 
@@ -64,9 +65,16 @@ PlugIn::PlugIn() :
         this->DisplayUserMessage(PLUGIN_NAME, "ERROR", "Unable to initialize the reporter-connection to the backend", true, true, true, true, true);
         return;
     }
+
+    if (false == AircraftScheduler::instance().initialize(this->m_configuration)) {
+        this->DisplayUserMessage(PLUGIN_NAME, "ERROR", "Unable to initialize the scheduling-connection to the backend", true, true, true, true, true);
+        AircraftReporter::instance().deinitialize();
+        return;
+    }
 }
 
 PlugIn::~PlugIn() noexcept {
+    AircraftScheduler::instance().deinitialize();
     AircraftReporter::instance().deinitialize();
     ZmqContext::instance().deinitialize();
     google::protobuf::ShutdownProtobufLibrary();