/* * This file is part of the Owl Positioning System (OwlPS). * OwlPS is a project of the University of Franche-Comté * (Université de Franche-Comté), France. * * This is the main source file of OwlPS Positioning, the program that * computes the position of the mobile terminals. */ #include "userinterface.hh" #include "inputdatareader.hh" #include "stock.hh" #include "positioning.hh" #include #include #include using namespace std ; int main(int argc, char **argv) { owl_run = owl_true ; /* Read options & configuration */ delete new UserInterface(argc, argv) ; if (owl_run) { /* Read input data */ delete new InputDataReader() ; /* Set up signal handlers */ struct sigaction action ; action.sa_flags = 0 ; sigemptyset(&action.sa_mask) ; action.sa_handler = owl_sigint_handler ; sigaction(SIGINT, &action, NULL) ; action.sa_handler = owl_sigterm_handler ; sigaction(SIGTERM, &action, NULL) ; /* Run! */ Positioning positioning ; /* Clean */ Stock::clear() ; } cerr << argv[0] << ": end." << endl ; return 0 ; }