Changeset 195 in tmcsimulator for branches/FEPSimulator
- Timestamp:
- 10/30/2017 03:33:04 PM (9 years ago)
- Location:
- branches/FEPSimulator
- Files:
-
- 3 edited
-
FEPSim.h (modified) (2 diffs)
-
HighwaysParser.cpp (modified) (2 diffs)
-
nbproject/private/private.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/FEPSim.h
r182 r195 36 36 #include <stdlib.h> 37 37 #include "time.h" 38 #include " NetworkReader.h"38 #include "HighwaysParser.h" 39 39 #include <netdb.h> 40 40 #include <sys/types.h> … … 43 43 #include <unistd.h> 44 44 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 :) 47 const int BUFF_SIZE = 950401; // where it is now :) 46 48 47 49 class FEPSim { -
branches/FEPSimulator/HighwaysParser.cpp
r186 r195 8 8 #include "HighwaysParser.h" 9 9 10 HighwaysParser::HighwaysParser() { 10 HighwaysParser::HighwaysParser(char * hwyData) { 11 string highwaysData = hwyData; 12 istringstream stream(highwaysData); 13 parseLines(highwaysData); 11 14 } 12 15 … … 14 17 } 15 18 19 vector<FEP_LINE *> HighwaysParser::getLines() { 20 21 } 22 23 vector<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) 28 typedef struct fep_line FEP_LINE; 29 struct 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 }; 42 void 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 74 FEP_LINE * HighwaysParser::parseLine(istringstream highwaysData) 75 { 76 77 } 78 79 STATION * HighwaysParser::parseStation(istringstream highwaysData) 80 { 81 82 } 83 84 LOOP * HighwaysParser::parseLoop(istringstream highwaysData) 85 { 86 87 } -
branches/FEPSimulator/nbproject/private/private.xml
r190 r195 7 7 <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> 8 8 <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> 10 18 </open-files> 11 19 </project-private>
Note: See TracChangeset
for help on using the changeset viewer.
