Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
14
15#include "ControlsManager.hpp"
16#include <QCoreApplication>
17#include <csignal>
18#include <iostream>
19
20volatile bool keepRunning = true;
21
27void handleSigint(int) {
28 qDebug() << "SIGINT received. Quitting application...";
29 QCoreApplication::quit();
30}
31
42
43int main(int argc, char *argv[]) {
44 QCoreApplication a(argc, argv);
45 std::signal(SIGINT, handleSigint);
46
47 try {
48 ControlsManager *m_controlsManager;
49 m_controlsManager = new ControlsManager(argc, argv);
50
51 return a.exec();
52 } catch (const std::exception &e) {
53 std::cerr << "Error: " << e.what() << std::endl;
54 return 1;
55 }
56 std::cout << "Service has stopped." << std::endl;
57}
void handleSigint(int)
SIGINT signal handler.
Definition main.cpp:27
int main(int argc, char *argv[])
Entry point for the car controls service.
Definition main.cpp:43
volatile bool keepRunning
Definition main.cpp:20
The ControlsManager class.