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

Revision 100, 893 bytes checked in by jtorres, 9 years ago (diff)

branches/FEPSimulator/Main.cpp: Added a cout to show FEP Simulator status of running.

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    cout << "Running FEP Simulator..." << endl;
34   
35    FEPSim fep = FEPSim(FEPSimHost, fep_prog, fep_rev, portno);
36    fep.runSockServer();
37
38    return 0;
39}
40
Note: See TracBrowser for help on using the repository browser.