Changeset 205 in tmcsimulator for branches/FEPSimulator/HighwaysParser.cpp
- Timestamp:
- 11/01/2017 03:53:59 AM (9 years ago)
- File:
-
- 1 edited
-
branches/FEPSimulator/HighwaysParser.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/HighwaysParser.cpp
r202 r205 76 76 int numLoops = 0; 77 77 getline(highwaysStream, currLine); 78 cout << currLine << endl;79 78 char direction; 80 79 sscanf(currLine.c_str(), "%ld %hd %d %c %f %d", &lds, &dropNum, &routeNum, &direction, 81 80 &postmile, &numLoops); 82 cout << "NumberLoops: " << numLoops << endl;83 cout << "DropNum: " << dropNum << endl;84 cout << "LDS: " << lds << endl;85 cout << "LDSIndex: " << ldsIndex << endl;86 cout << "postmile: " << postmile << endl;87 81 newLine->lds.push_back(lds); 88 82 newLine->ldsIndex.push_back(ldsIndex++); … … 101 95 cout << currLine << endl; 102 96 sscanf(currLine.c_str(), "%ld %f %d %s", &loopID, &occ, &vol, loopLoc); 103 cout << "LOOP ID: " << loopID << endl;104 cout << "OCC: " << occ << endl;105 cout << "VOL: " << vol << endl;106 cout << "LOOPLOC: " << loopLoc << endl;107 97 newLoop->loopID = loopID; 108 98 newLoop->occ = occ; 109 99 newLoop->vol = vol; 100 newLoop->spd = 0; 110 101 newLoop->loop_loc = loopLoc; 111 102 cout << "Adding " << newLoop->loopID << " to " << newStation->lds << endl; 112 103 newStation->loops.push_back(newLoop); 113 104 } 114 105 newStation->length = newStation->loops.size() * 2 + CONTROL_DATA_LEN; 115 106 newStation->dataPack = DataPacker::packData(newStation); 107 for(int byte = 0; byte < newStation->length; byte++) 108 { 109 printf("%02X", (unsigned char) newStation->dataPack[byte]); 110 } 116 111 117 cout << "NUMBER OF LOOPS: " << newStation->loops.size() << endl; 118 112 cout << "Adding " << newStation->lds << " to ldsMap " << " at index " << ldsIndex << endl; 119 113 this->stations.push_back(newStation); 120 114 } 121 115 cout << "Adding " << newLine->lineNum << " to lines" << endl; 122 116 this->lines.push_back(newLine); 123 117 }
Note: See TracChangeset
for help on using the changeset viewer.
