Changeset 114 in tmcsimulator


Ignore:
Timestamp:
10/14/2017 10:11:04 AM (9 years ago)
Author:
jtorres
Message:

Updating FEPSimulator for JD's linux machine. Modified ATMS/Console Driver to show red dots.

Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • branches/FEPSimulator/DataPacker.cpp

    r113 r114  
    3737 
    3838    return msg;  
     39    return msg; 
    3940} 
    4041 
  • branches/FEPSimulator/FEPSim.cpp

    r113 r114  
    7272            fsa.msg.message[2 + aa] = 0x0d; 
    7373            fsa.msg.message[3 + aa] = 0xff; 
    74    // info 
     74             
     75            for(int l = 0; l < fsa.msg.message_len + 2; l++) 
     76            { 
     77                printf("%02X", (unsigned char) fsa.msg.message[l]); 
     78            } 
     79            printf("\n"); 
     80             
     81            // info 
    7582            fsa.info.poll_error_count = 0; 
    7683            fsa.info.poll_user_info1 = ldsMap.at(index)->drop; // drop number 
  • branches/FEPSimulator/nbproject/private/private.xml

    r107 r114  
    88    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> 
    99        <group> 
     10            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/network.h</file> 
     11            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/NetworkReader.cpp</file> 
     12            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/DataPacker.cpp</file> 
    1013            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file> 
    1114            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/Main.cpp</file> 
    12             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/NetworkReader.cpp</file> 
     15            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/fep.h</file> 
     16            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.h</file> 
    1317        </group> 
    1418    </open-files> 
  • trunk/src/atmsdriver/ConsoleDriver.java

    r110 r114  
    150150        } 
    151151        System.out.println(""); 
     152        highways.writeToFEP(); 
    152153    } 
    153154     
  • trunk/src/atmsdriver/model/Highways.java

    r103 r114  
    211211    public void writeToFEP() { 
    212212        try { 
    213             Socket sock = new Socket(FEPHostName, FEPPortNum); 
     213            Socket sock = new Socket(FEPHostName /*"192.168.251.130"*/, 8080); 
    214214            PrintWriter out = new PrintWriter(sock.getOutputStream(), true); 
    215215            out.println(this.toXML()); 
  • trunk/src/atmsdriver/model/LoopDetector.java

    r103 r114  
    2222     
    2323    /* dynamic data */ 
    24     private int vol; 
    25     private int occ; 
     24    public int vol; 
     25    public int occ; 
    2626    private int spd; 
    2727     
     
    3434         
    3535        /* Init dynamic data */ 
    36         this.vol = 0; 
     36        this.vol = 100; 
    3737        this.spd = 0; 
    38         this.occ = 0; 
     38        this.occ = 100; 
    3939    } 
    4040     
  • trunk/src/atmsdriver/model/Station.java

    r109 r114  
    5050        this.routeNumber = hwy; 
    5151 
    52         this.MLTotVol = 0; 
    53         this.OppTotVol = 0; 
     52        this.MLTotVol = getMLTotVol(); 
     53        this.OppTotVol = getOPPTotVol(); 
     54    } 
     55     
     56    private int getMLTotVol() 
     57    { 
     58        int mlTotVol = 0; 
     59        for(LoopDetector loop : loops) 
     60        { 
     61            if(loop.loopLocation.startsWith("ML")) 
     62            { 
     63                mlTotVol += loop.vol; 
     64            } 
     65        } 
     66        return mlTotVol; 
     67    } 
     68     
     69    private int getOPPTotVol() 
     70    { 
     71        int oppTotVol = 0; 
     72        for(LoopDetector loop : loops) 
     73        { 
     74            if(loop.loopLocation.startsWith("OP")) 
     75            { 
     76                oppTotVol += loop.vol; 
     77            } 
     78        } 
     79        return oppTotVol; 
    5480    } 
    5581 
     
    143169                // vol and occ along with each color.  Then the updateLoop call 
    144170                // below could be update(dotColor.volume, dotColor.occ, speed) 
    145                 int volume = 0; 
    146                 int occ = 0; 
     171                int volume = 10; 
     172                int occ = 10; 
    147173                int speed = 0; 
    148174                loop.updateLoop(volume, occ, speed); 
  • trunk/src/tmcsim/application.properties

    r103 r114  
    1 #Thu, 12 Oct 2017 01:19:36 -0700 
     1#Sat, 14 Oct 2017 11:10:53 -0700 
    22 
    3 Application.revision=101 
     3Application.revision=110 
    44 
    5 Application.buildnumber=51 
     5Application.buildnumber=52 
Note: See TracChangeset for help on using the changeset viewer.