source: tmcsimulator/branches/ATMSDriver/src/atmsdriver/ATMSDriver.java @ 76

Revision 76, 1.0 KB checked in by jtorres, 9 years ago (diff)

In network.java, LoopDetectorStation?.java and LoopDetector?.java, added network writing capabilities. The network can now be written to a specified xml file to be read by the cpp ATMS RPC program. The network reader is finished and reads in all static network data correctly

Line 
1package atmsdriver;
2
3import atmsdriver.network.model.Network;
4import java.io.File;
5import java.util.logging.Level;
6import java.util.logging.Logger;
7
8/**
9 *
10 * @author John A. Torres
11 * @version 09/10/2017
12 */
13public class ATMSDriver {
14    final private String ldsFileName = "./lds_data/lookup_lds";
15    final private String loopFileName = "./lds_data/lookup_loop";
16    final private String networkFileName = "./networkFile.txt";
17    final private Network network;
18   
19    public ATMSDriver()
20    {
21        File ldsFile = new File(ldsFileName);
22        File loopFile = new File(loopFileName);
23        File networkFile = new File(networkFileName);
24        network = new Network(ldsFile, loopFile, networkFile);
25        try {
26            network.toXML();
27        } catch (Exception ex) {
28            Logger.getLogger(ATMSDriver.class.getName()).log(Level.SEVERE, null, ex);
29        }
30    }
31   
32    /**
33     * @param args the command line arguments
34     */
35    public static void main(String[] args) {
36        ATMSDriver driver = new ATMSDriver();
37    }
38   
39}
Note: See TracBrowser for help on using the repository browser.