Changeset 127 in tmcsimulator for trunk/src/atmsdriver/model


Ignore:
Timestamp:
10/16/2017 04:38:16 PM (9 years ago)
Author:
jdalbey
Message:

Station.java Enhance DOTCOLOR enum to have volume and occupancy fields. Minor changes to error messages in other files.

Location:
trunk/src/atmsdriver/model
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/atmsdriver/model/Highways.java

    r118 r127  
    211211    public void writeToFEP() { 
    212212        try { 
    213             Socket sock = new Socket(/*FEPHostName*/ "192.168.251.130", 8080); 
     213            Socket sock = new Socket(FEPHostName /*"192.168.251.130"*/, 8080); 
    214214            PrintWriter out = new PrintWriter(sock.getOutputStream(), true); 
    215215            out.println(this.toXML()); 
     
    217217        } catch (IOException ex) { 
    218218            Logger.getLogger(Highways.class.getName()).log(Level.SEVERE, null, ex); 
     219            System.out.println("Highway Model failed writing to FEPSim."); 
    219220        } 
    220221    } 
  • trunk/src/atmsdriver/model/Station.java

    r114 r127  
    166166            { 
    167167                // UPDATE LOOP WITH VALUES 
    168                 // TODO: Perhaps enhance DOTCOLOR enum to include constants for 
    169                 // vol and occ along with each color.  Then the updateLoop call 
    170                 // below could be update(dotColor.volume, dotColor.occ, speed) 
    171                 int volume = 10; 
    172                 int occ = 10; 
    173168                int speed = 0; 
    174                 loop.updateLoop(volume, occ, speed); 
     169                loop.updateLoop(dotColor.volume(), dotColor.occupancy(), speed); 
    175170            } 
    176171        } 
Note: See TracChangeset for help on using the changeset viewer.