1 #include <QApplication> 4 #include <boost/stacktrace.hpp> 11 #include "rtxiConfig.h" 17 void signal_handler(
int signum)
20 ERROR_MSG(
"signal_handler : signal type {} received\n", ::strsignal(signum));
21 std::cerr << boost::stacktrace::stacktrace();
26 int main(
int argc,
char* argv[])
28 if (signal(SIGINT, signal_handler) == SIG_ERR) {
29 ERROR_MSG(
"MAIN: Unable to set SIGINT signal handler");
32 if (signal(SIGABRT, signal_handler) == SIG_ERR) {
33 ERROR_MSG(
"MAIN: Unable to set SIGABRT signal handler");
36 if (signal(SIGSEGV, signal_handler) == SIG_ERR) {
37 ERROR_MSG(
"MAIN: Unable to set SIGSEGV signal handler");
41 std::cout <<
"Welcome to RTXI Version ";
42 std::cout << RTXI_VERSION_MAJOR <<
".";
43 std::cout << RTXI_VERSION_MINOR <<
".";
44 std::cout << RTXI_VERSION_PATCH <<
"\n";
47 auto event_manager = std::make_unique<Event::Manager>();
48 auto rt_connector = std::make_unique<RT::Connector>();
50 std::make_unique<RT::System>(event_manager.get(), rt_connector.get());
51 rt_system->createTelemitryProcessor();
54 auto* app =
new QApplication(argc, argv);
55 QApplication::connect(app, SIGNAL(lastWindowClosed()), app, SLOT(quit()));
57 auto* rtxi_window =
new MainWindow(event_manager.get());
58 auto mod_manager = std::make_unique<Workspace::Manager>(event_manager.get());
59 rtxi_window->loadWindow();
60 const int retval = QApplication::exec();
void ERROR_MSG(const std::string &errmsg, Args... args)
int main(int argc, char *argv[])