Changeset 195 in tmcsimulator for branches/FEPSimulator


Ignore:
Timestamp:
10/30/2017 03:33:04 PM (9 years ago)
Author:
jtorres
Message:

FEPSim.h: changed buffer size. HighwaysParser?.cpp: began new condensed format parsing, not finished. atms_driver_config_local.properties: changed properties file for new highways_fullmap.txt. Highways.java: comments.

Location:
branches/FEPSimulator
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/FEPSimulator/FEPSim.h

    r182 r195  
    3636#include <stdlib.h> 
    3737#include "time.h" 
    38 #include "NetworkReader.h" 
     38#include "HighwaysParser.h" 
    3939#include <netdb.h> 
    4040#include <sys/types.h>  
     
    4343#include <unistd.h> 
    4444 
    45 const int BUFF_SIZE = 5500000; 
     45// const int BUFF_SIZE = 5500000; // where it was 
     46// const int BUFF_SIZE = 11522291; // what it couldnt be :) 
     47const int BUFF_SIZE = 950401; // where it is now :)  
    4648 
    4749class FEPSim { 
  • branches/FEPSimulator/HighwaysParser.cpp

    r186 r195  
    88#include "HighwaysParser.h" 
    99 
    10 HighwaysParser::HighwaysParser() { 
     10HighwaysParser::HighwaysParser(char * hwyData) { 
     11    string highwaysData = hwyData; 
     12    istringstream stream(highwaysData); 
     13    parseLines(highwaysData); 
    1114} 
    1215 
     
    1417} 
    1518 
     19vector<FEP_LINE *> HighwaysParser::getLines() { 
     20     
     21} 
     22 
     23vector<STATION *> HighwaysParser::getStations() { 
     24     
     25} 
     26// FEP line: Represents a serial communication line from field stations to the  
     27// An FEP Line has several Loop Detector Stations (Stations) connected) 
     28typedef struct fep_line FEP_LINE; 
     29struct  fep_line 
     30{ 
     31        int             lineNum; 
     32        vector<long>    lds; 
     33        vector<long>    ldsIndex;       // location in ldsMap 
     34 
     35        short   count;  // actual count from caltrans 
     36        int     schedule; 
     37        int     lineInfo; 
     38        long    systemKey; 
     39        long    globalSeq; 
     40        long    schedleSeq; 
     41}; 
     42void HighwaysParser::parseLines(istringstream highwaysData) 
     43{ 
     44    string currLine; 
     45    getline(highwaysData, currLine); 
     46    int numLines; 
     47    sscanf(highwaysData, "%d", &numLines); 
     48     
     49    int lineNum = 0; 
     50    long lds = 0; 
     51    long ldsIndex = 0; 
     52    short count = 0; 
     53    int schedule = 0; 
     54    int lineInfo = 0; 
     55    long systemKey = 0; 
     56    long globalSeq = 0; 
     57    long schedleSeq = 0; 
     58     
     59    for(int lineIndex = 0; lineIndex < numLines; lineIndex++) 
     60    { 
     61        getline(highwaysData, currLine); 
     62        int numStations = 0; 
     63        sscanf(currLine, "%d %d %d", &lineNum, &count, &numStations); 
     64        for(int stationIndex = 0; stationIndex < numStations; stationIndex++) 
     65        { 
     66            getline(highwaysData, currLine); 
     67            sscanf(currLine, "%d %d %d %d %d %d", &lds, ) 
     68             
     69        } 
     70    } 
     71    getline(highwaysData, currLine); 
     72} 
     73 
     74FEP_LINE * HighwaysParser::parseLine(istringstream highwaysData) 
     75{ 
     76 
     77} 
     78 
     79STATION * HighwaysParser::parseStation(istringstream highwaysData) 
     80{ 
     81     
     82} 
     83 
     84LOOP * HighwaysParser::parseLoop(istringstream highwaysData) 
     85{ 
     86     
     87} 
  • branches/FEPSimulator/nbproject/private/private.xml

    r190 r195  
    77    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> 
    88    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> 
    9         <group/> 
     9        <group> 
     10            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/network.h</file> 
     11            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/HighwaysParser.h</file> 
     12            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/DataPacker.h</file> 
     13            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file> 
     14            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/fep.h</file> 
     15            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.h</file> 
     16            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/HighwaysParser.cpp</file> 
     17        </group> 
    1018    </open-files> 
    1119</project-private> 
Note: See TracChangeset for help on using the changeset viewer.