Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Proxies/TrainingAreaBase/Plugins/UAS/Test/test6.cpp
T

38 lines
724 B
C++
Executable File

#include <QApplication>
#include <QTimer>
#include <iostream>
#include <thread>
#include <dlfcn.h>
#include <TmsIfAdapter/module_loader.h>
#include <TmsIfAdapter/tms_if_adapter.h>
#include <TmsIfAdapter/uav_commander.h>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
std::cout << "App started ..." << std::endl;
UAS::ModuleLoader::dlopen_handle handle = UAS::ModuleLoader::load("../lib/");
UAS::ModuleLoader::get(handle);
app.exec();
std::cout << "Stopping ..." << std::endl;
UAS::ModuleLoader::unload(handle);
std::cout << "Stopped ..." << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
std::cout << "Exit ..." << std::endl;
return 0;
}