#include #include #include // TODO: no UAS for windoof #include using GetFn = void *(*)(); int main(int , char *[]) { std::cout << "App started ..." << std::endl; void *handle = dlopen("libTmsIfAdapter.so", RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); if (handle == nullptr) { std::cerr << "no libTmsIfAdapter.so :( => " << dlerror() << std::endl; return 1; } auto get = reinterpret_cast(dlsym(handle, "get")); if (get == nullptr) { std::cerr << "no 'get' in libTmsIfAdapter.so :( => " << dlerror() << std::endl; return 1; } UAS::TmsIfAdapter *adapter = reinterpret_cast(get()); // adapter->test(); std::cout << "Now waiting ..." << std::endl; // keep app running: while(true){std::this_thread::sleep_for(std::chrono::milliseconds(500));} std::this_thread::sleep_for(std::chrono::milliseconds(500)); // std::string blub; // std::cin >> blub; std::cout << "Stopping ..." << std::endl; // UAS::TmsIfAdapter::stop(); std::cout << "Stopped ..." << std::endl; // std::this_thread::sleep_for(std::chrono::milliseconds(2000)); std::cout << "Exit ..." << std::endl; return 0; }