- Timestamp:
- 10/16/2017 04:38:16 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
-
atmsdriver/ConsoleDriver.java (modified) (2 diffs)
-
atmsdriver/model/Highways.java (modified) (2 diffs)
-
atmsdriver/model/Station.java (modified) (1 diff)
-
tmcsim/application.properties (modified) (1 diff)
-
tmcsim/client/ATMSBatchDriver.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/ConsoleDriver.java
r121 r127 409 409 410 410 /** 411 * Enum for highway status dot colors. 411 * Enum for highway status dot colors. Each color has associated volume 412 * and occupancy constants. 412 413 * 413 * @author John A. Torres 414 * @author John A. Torres, jdalbey 414 415 * @version 10/11/2017 415 416 */ 416 417 public static enum DOTCOLOR { 417 418 418 RED ,419 YELLOW ,420 GREEN ;419 RED(10,10), 420 YELLOW(5,5), 421 GREEN(0,0); 421 422 422 423 // All the first letters of the values, in order. 423 424 private static String allLetters = "RYG"; 424 425 426 private int vol; /* volume */ 427 private int occ; /* occupancy */ 428 429 private DOTCOLOR(int v, int o) 430 { 431 vol = v; 432 occ = o; 433 } 425 434 /** 426 435 * Return the first letter of this enum. … … 432 441 } 433 442 443 public int volume() 444 { 445 return vol; 446 } 447 public int occupancy() 448 { 449 return occ; 450 } 434 451 /** 435 452 * Returns a dot color given its first character. -
trunk/src/atmsdriver/model/Highways.java
r118 r127 211 211 public void writeToFEP() { 212 212 try { 213 Socket sock = new Socket( /*FEPHostName*/ "192.168.251.130", 8080);213 Socket sock = new Socket(FEPHostName /*"192.168.251.130"*/, 8080); 214 214 PrintWriter out = new PrintWriter(sock.getOutputStream(), true); 215 215 out.println(this.toXML()); … … 217 217 } catch (IOException ex) { 218 218 Logger.getLogger(Highways.class.getName()).log(Level.SEVERE, null, ex); 219 System.out.println("Highway Model failed writing to FEPSim."); 219 220 } 220 221 } -
trunk/src/atmsdriver/model/Station.java
r114 r127 166 166 { 167 167 // UPDATE LOOP WITH VALUES 168 // TODO: Perhaps enhance DOTCOLOR enum to include constants for169 // vol and occ along with each color. Then the updateLoop call170 // below could be update(dotColor.volume, dotColor.occ, speed)171 int volume = 10;172 int occ = 10;173 168 int speed = 0; 174 loop.updateLoop( volume, occ, speed);169 loop.updateLoop(dotColor.volume(), dotColor.occupancy(), speed); 175 170 } 176 171 } -
trunk/src/tmcsim/application.properties
r124 r127 1 # Sun, 15 Oct 2017 17:38:51-07001 #Mon, 16 Oct 2017 17:41:29 -0700 2 2 3 Application.revision=12 33 Application.revision=125 4 4 5 5 Application.buildnumber=53 -
trunk/src/tmcsim/client/ATMSBatchDriver.java
r121 r127 60 60 public void refresh() throws RemoteException 61 61 { 62 throw new UnsupportedOperationException("Not supported yet.");62 System.out.println("ATMSBatchDriver.refresh() was invoked."); 63 63 } 64 64 … … 214 214 timer.start(); 215 215 216 // Start the FEP thread (to update ATMS every 30 sec) 216 // Start the FEP thread (to update ATMS every 30 sec). (See class def below) 217 217 new WriteToFEPThread().run(); 218 218
Note: See TracChangeset
for help on using the changeset viewer.
