Changeset 83 in tmcsimulator for branches/trunk/src/atmsdriver/ATMSDriver.java
- Timestamp:
- 10/06/2017 08:12:32 PM (9 years ago)
- File:
-
- 1 edited
-
branches/trunk/src/atmsdriver/ATMSDriver.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/trunk/src/atmsdriver/ATMSDriver.java
r82 r83 9 9 10 10 /** 11 * 11 * ATMS Driver reads the current simulation traffic conditions 12 * from the EXCHANGE.XML file and constructs the Highway Network status info 13 * in the format required by the FEP. It then sends this XML data over 14 * a socket to the FEP Simulator. 12 15 * @author John A. Torres 13 16 * @version 09/10/2017 … … 58 61 public void run() { 59 62 // Check for packets and update the simulator 60 for (;;) { 63 while (true) 64 { 61 65 // Flush the input file 62 66 ExchangeInfo exInfo = exchangeReader.parse(ATMSDriverProperties 63 67 .getProperty(PROPERTIES.EXCHANGE_FILE_NAME.name)); 64 68 69 //System.out.println(network.toXML()); 65 70 network.writeToFEP(); 66 67 71 // Update if exchangeInfo is recieved 68 if (exInfo != null) { 69 72 if (exInfo != null) 73 { 74 // TODO: handle this condition 75 Logger.getLogger("ATMSDriver").log(Level.INFO, "exInfo is not null"); 70 76 } 71 77 72 // Sleep78 // Wait for FEP Sim to process the data we just sent 73 79 try { 74 80 Thread.sleep(SLEEP_TIME); 75 81 } catch (InterruptedException ie) { 76 82 ie.printStackTrace(); 77 83 } 78 84 } … … 111 117 112 118 /** 113 * Runs the Paramics simulator.119 * Runs the ATMS Driver. 114 120 */ 115 121 public static void main(String[] args) {
Note: See TracChangeset
for help on using the changeset viewer.
