| Revision 233,
894 bytes
checked in by jtorres, 8 years ago
(diff) |
|
FEPSim: finalized comments, added to both header and source files.
|
| Rev | Line | |
|---|
| 1 | /** |
|---|
| 2 | * File: Main.cpp |
|---|
| 3 | * |
|---|
| 4 | * Main driver for FEP Simulator. Creates an FEPSimulator that reads Highway |
|---|
| 5 | * Status from the ATMS Driver over a socket. Runs persistently. |
|---|
| 6 | * |
|---|
| 7 | * @author John A. Torres |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | #include <cstdlib> |
|---|
| 11 | #include "FEPSim.h" |
|---|
| 12 | |
|---|
| 13 | using namespace std; |
|---|
| 14 | |
|---|
| 15 | int main(int argc, char *argv[]) { |
|---|
| 16 | // if argument count is not correct, display usage message |
|---|
| 17 | if(argc != 5) |
|---|
| 18 | { |
|---|
| 19 | cerr << "Usage: FEPSim <ATMS_Host> <FEP_ATMSDriver_PortNo> <FEP_PROG_NUM>" |
|---|
| 20 | "<FEP_REVISION_NUM>" << endl; |
|---|
| 21 | exit(1); |
|---|
| 22 | } |
|---|
| 23 | // get the FEP Sim command line arguments |
|---|
| 24 | char *FEPSimHost = argv[1]; |
|---|
| 25 | int fep_prog = atoi(argv[2]); |
|---|
| 26 | int fep_rev = atoi(argv[3]); |
|---|
| 27 | int portno = atoi(argv[4]); |
|---|
| 28 | |
|---|
| 29 | // run the FEPSim |
|---|
| 30 | cout << "Running FEP Simulator..." << endl; |
|---|
| 31 | FEPSim fep = FEPSim(FEPSimHost, fep_prog, fep_rev, portno); |
|---|
| 32 | fep.runSockServer(); |
|---|
| 33 | |
|---|
| 34 | return 0; |
|---|
| 35 | } |
|---|
| 36 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.