source: tmcsimulator/branches/FEPSimulator/Main.cpp @ 86

Revision 86, 844 bytes checked in by jtorres, 9 years ago (diff)

branches/FEPSimulator: updated and improved comments, added Main.cpp which creates the FEPSimulator, minor project configurations (runtime command line arguments / tinyxml.a libosxtinyxml.a)

Line 
1/*
2 * File:   Main.cpp
3 * Author: John A. Torres
4 *
5 * Created on October 7, 2017, 4:27 PM
6 */
7
8#include <cstdlib>
9#include "FEPSim.h"
10
11using namespace std;
12
13/**
14 * Main driver for FEP Simulator. Creates a socket server that reads Highway
15 * Status from the ATMS Driver over the socket, in XML form. Runs persistently.
16 *
17 * @param argc argument count
18 * @param argv args
19 * @return
20 */
21int main(int argc, char *argv[]) {
22    if(argc != 5)
23    {
24        cerr << "Usage: FEPSim <ATMS_Host> <FEP_ATMSDriver_PortNo> <FEP_PROG_NUM>"
25                "<FEP_REVISION_NUM>" << endl;
26        exit(1);
27    }
28    char *FEPSimHost = argv[1];
29    int fep_prog = atoi(argv[2]);
30    int fep_rev = atoi(argv[3]);
31    int portno = atoi(argv[4]);
32   
33    FEPSim fep = FEPSim(FEPSimHost, fep_prog, fep_rev, portno);
34    fep.runSockServer();
35
36    return 0;
37}
38
Note: See TracBrowser for help on using the repository browser.