-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfwx_main.cpp
More file actions
34 lines (31 loc) · 715 Bytes
/
fwx_main.cpp
File metadata and controls
34 lines (31 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Main.cpp
*
* Created on: Jun 8, 2014
* Author: sam
*/
#include "Controller.h"
//
#if !defined(EMBEDDED_MODE)
//
#include <csignal>
void signalHandler(int signum)
{
std::cout << "Interrupt signal (" << signum << ") received" << std::endl;
// cleanup and close up stuff here
// terminate program
//Communication::getInstance().closeInstance();
Controller::deleteInstance();
exit(signum);
}
int main(int argc, char** argv)
{
std::cout << "*** start ***" << std::endl;
// register signal SIGINT and signal handler
signal(SIGINT, signalHandler);
Controller::getInstance().main(true);
Controller::deleteInstance();
std::cout << "*** end ***" << std::endl;
return 0;
}
#endif