Changeset 128 in tmcsimulator for trunk/src/atmsdriver


Ignore:
Timestamp:
10/17/2017 09:11:22 AM (9 years ago)
Author:
jdalbey
Message:

ATMSBatchDriver.java Added a GUI to display event queue. Highways.java modified to throw an exception when writeToFEP can't connect to FEP_Sim.

Location:
trunk/src/atmsdriver
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/ATMSDriver.java

    r103 r128  
    66import java.util.logging.Level; 
    77import java.util.logging.Logger; 
     8import tmcsim.common.SimulationException; 
    89 
    910/** 
     
    7374                    .getProperty(PROPERTIES.EXCHANGE_FILE_NAME.name)); 
    7475 
    75             highways.writeToFEP(); 
     76            try { 
     77                highways.writeToFEP(); 
     78            } catch (SimulationException ex) { 
     79                            System.out.println("Skipping writeToFEP..."); 
     80            } 
    7681            // Update if exchangeInfo is recieved 
    7782            if (exInfo != null) { 
  • trunk/src/atmsdriver/ConsoleDriver.java

    r127 r128  
    1313import java.util.logging.Level; 
    1414import java.util.logging.Logger; 
     15import tmcsim.common.SimulationException; 
    1516 
    1617/** 
     
    198199        } 
    199200        System.out.println(""); 
    200         highways.writeToFEP(); 
     201        try { 
     202            highways.writeToFEP(); 
     203        } catch (SimulationException ex) { 
     204            System.out.println("Skipping writeToFEP..."); 
     205        } 
    201206    } 
    202207     
  • trunk/src/atmsdriver/model/Highways.java

    r127 r128  
    2727import org.w3c.dom.Document; 
    2828import org.w3c.dom.Element; 
     29import tmcsim.common.SimulationException; 
    2930 
    3031/** The Highways class aggregates all Highway instances within a geographic 
     
    209210     */ 
    210211 
    211     public void writeToFEP() { 
     212    public void writeToFEP() throws SimulationException { 
    212213        try { 
    213214            Socket sock = new Socket(FEPHostName /*"192.168.251.130"*/, 8080); 
     
    218219            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE, null, ex); 
    219220            System.out.println("Highway Model failed writing to FEPSim."); 
     221            throw new SimulationException(SimulationException.BINDING); 
    220222        } 
    221223    } 
Note: See TracChangeset for help on using the changeset viewer.