Changeset 258 in tmcsimulator for trunk/src


Ignore:
Timestamp:
02/11/2019 03:36:49 PM (7 years ago)
Author:
jdalbey
Message:

TrafficModelManager?: update to read json output destination from properties file.

Location:
trunk/src
Files:
3 edited

Legend:

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

    r248 r258  
    347347             
    348348            // Print the number of bytes the highways data message contains 
    349             System.out.println("BYTES: " + this.toCondensedFormat(false).toCharArray().length + 1); 
     349            System.out.println("Highways sending " + this.toCondensedFormat(false).toCharArray().length + 1 + "bytes to FEPSIM."); 
    350350             
    351351            // Write the highways data over the socket 
  • trunk/src/tmcsim/application.properties

    r257 r258  
    1 #Mon, 11 Feb 2019 11:45:31 -0800 
     1#Mon, 11 Feb 2019 16:19:24 -0800 
    22 
    3 Application.revision=255 
     3Application.revision=257 
    44 
    5 Application.buildnumber=92 
     5Application.buildnumber=94 
  • trunk/src/tmcsim/cadsimulator/managers/TrafficModelManager.java

    r248 r258  
    6363        FEPSIM_IP_ADDR("FEPSim_IP_addr"), 
    6464        EVENTS_FILE("Events_File"), 
    65         OUTPUT_DEST("Output_Destination"); 
     65        OUTPUT_DEST("Output_Destination"), 
     66        JSON_PATH("Json_Path"); 
    6667         
    6768        public String name; 
     
    102103     */ 
    103104    private String currentClock = ""; 
    104        
     105     
     106    /** 
     107     * Path for writing highway data to Json file. 
     108     */ 
     109    private String jsonPath; 
     110     
    105111    /** 
    106112     * Constructor. Loads the Properties file and initializes the 
     
    117123        { 
    118124            props = loadProperties(propertiesFile); 
     125            jsonPath = props.getProperty(PROPERTIES.JSON_PATH.name); 
     126            logger.logp(Level.INFO, "Traffic Managr", "Constructor",  
     127                    "Highway network json output: " + jsonPath); 
    119128            // Initialize the highway model 
    120129            incidents = new HashMap<String, List<TrafficEvent>>(); 
     
    455464                { 
    456465                    // currently writes to local file 
    457                     out = new PrintWriter("highways.json"); 
     466                    out = new PrintWriter(jsonPath); 
    458467                    out.print(geojson); 
    459468                    out.close(); 
Note: See TracChangeset for help on using the changeset viewer.