Index: branches/FEPSimulator/HighwaysParser.cpp
===================================================================
--- branches/FEPSimulator/HighwaysParser.cpp	(revision 195)
+++ branches/FEPSimulator/HighwaysParser.cpp	(revision 199)
@@ -7,5 +7,17 @@
 
 #include "HighwaysParser.h"
-
+     /* 43                   // "number of lines"
+     * 32 0 13              // "line id" "count num" "number of stations"
+     * 1210831 1 5 S 0.9 8  // "station id" "drop num" "route num"...
+     *                      //      ..."direction" "postmile" "number of loops"
+     * 1210832  0.0 0       // "loop id" "occ" "vol"
+     * 1210833  0.0 0       // ..
+     * 1210834  0.0 0       // ..
+     * 1210835  0.0 0       // ..
+     * 1210836  0.0 0       // ..
+     * 1210837  0.0 0       // ..
+     * 1210838  0.0 0       // ..
+     * 1210839  0.0 0       // ..
+      * */
 HighwaysParser::HighwaysParser(char * hwyData) {
     string highwaysData = hwyData;
@@ -24,19 +36,18 @@
     
 }
-// FEP line: Represents a serial communication line from field stations to the 
-// An FEP Line has several Loop Detector Stations (Stations) connected)
-typedef struct fep_line FEP_LINE;
-struct  fep_line
+
+// Loop Detector: A single sensor that detects the volume, occupancy, and speed
+// in a single highway lane
+typedef struct loop LOOP;
+struct loop
 {
-	int             lineNum;
-	vector<long>    lds;
-	vector<long>    ldsIndex;	// location in ldsMap
-
-	short   count;	// actual count from caltrans
-	int	schedule;
-	int	lineInfo;
-	long	systemKey;
-	long	globalSeq;
-	long	schedleSeq;
+    // meta data
+    long loopID;
+    char *loop_loc;
+    
+    // dynamic data
+    int vol;
+    float occ;
+    double spd;
 };
 void HighwaysParser::parseLines(istringstream highwaysData)
@@ -56,18 +67,49 @@
     long globalSeq = 0;
     long schedleSeq = 0;
+    short dropNum = 0;
+    int routeNum = 0;
+    char * direction = "";
+    float postmile = 0;
+    long loopID = 0;
+    float occ = 0;
+    int vol = 0;
     
     for(int lineIndex = 0; lineIndex < numLines; lineIndex++)
     {
+        FEP_LINE * newLine = new FEP_LINE;
+        
         getline(highwaysData, currLine);
         int numStations = 0;
         sscanf(currLine, "%d %d %d", &lineNum, &count, &numStations);
+
+        newLine->lineNum = lineNum;
+        newLine->count = count;
+        newLine->schedule = schedule;
+        newLine->lineInfo = lineInfo;
+        newLine->systemKey = systemKey;
+        newLine->globalSeq = globalSeq;
+        newLine->schedleSeq = schedleSeq;
+        
         for(int stationIndex = 0; stationIndex < numStations; stationIndex++)
         {
+            STATION * newStation = new STATION;
+            
+            int numLoops = 0;
             getline(highwaysData, currLine);
-            sscanf(currLine, "%d %d %d %d %d %d", &lds, )
+            sscanf(currLine, "%ld %d %d %s %d %d", &lds, &dropNum,&routeNum, 
+                    direction, postmile, &numLoops);
             
+            newLine->lds.push_back(lds);
+            newLine->ldsIndex.push_back(ldsIndex++);
+            
+            for(int loopIndex = 0; loopIndex < numLoops; loopIndex++)
+            {
+                getline(highwaysData, currLine);
+                sscanf(currLine, "%ld %f %d", &loopID, &occ, &vol);
+            }
         }
+        
+        this->lines.push_back(newLine);
     }
-    getline(highwaysData, currLine);
 }
 
