Index: /branches/FEPSimulator/HighwaysParser.cpp
===================================================================
--- /branches/FEPSimulator/HighwaysParser.cpp	(revision 202)
+++ /branches/FEPSimulator/HighwaysParser.cpp	(revision 205)
@@ -76,13 +76,7 @@
             int numLoops = 0;
             getline(highwaysStream, currLine);
-            cout << currLine << endl;
             char direction;
             sscanf(currLine.c_str(), "%ld %hd %d %c %f %d", &lds, &dropNum, &routeNum, &direction,
                     &postmile, &numLoops);
-            cout << "NumberLoops: " << numLoops << endl;
-            cout << "DropNum: " << dropNum << endl;
-            cout << "LDS: " << lds << endl;
-            cout << "LDSIndex: " << ldsIndex << endl;
-            cout << "postmile: " << postmile << endl;
             newLine->lds.push_back(lds);
             newLine->ldsIndex.push_back(ldsIndex++);
@@ -101,23 +95,23 @@
                 cout << currLine << endl;
                 sscanf(currLine.c_str(), "%ld %f %d %s", &loopID, &occ, &vol, loopLoc);
-                cout << "LOOP ID: " << loopID << endl;
-                cout << "OCC: " << occ << endl;
-                cout << "VOL: " << vol << endl;
-                cout << "LOOPLOC: " << loopLoc << endl;
                 newLoop->loopID = loopID;
                 newLoop->occ = occ;
                 newLoop->vol = vol;
+                newLoop->spd = 0;
                 newLoop->loop_loc = loopLoc;
-                
+                cout << "Adding " << newLoop->loopID << " to " << newStation->lds << endl;
                 newStation->loops.push_back(newLoop);
             }
             newStation->length = newStation->loops.size() * 2 + CONTROL_DATA_LEN;
             newStation->dataPack = DataPacker::packData(newStation);
+            for(int byte = 0; byte < newStation->length; byte++)
+            {
+                printf("%02X", (unsigned char) newStation->dataPack[byte]);
+            }
             
-            cout << "NUMBER OF LOOPS: " << newStation->loops.size() << endl;
-            
+            cout << "Adding " << newStation->lds << " to ldsMap " << " at index " << ldsIndex << endl;
             this->stations.push_back(newStation);
         }
-        
+        cout << "Adding " << newLine->lineNum << " to lines" << endl;
         this->lines.push_back(newLine);
     }
Index: /branches/FEPSimulator/nbproject/private/private.xml
===================================================================
--- /branches/FEPSimulator/nbproject/private/private.xml	(revision 195)
+++ /branches/FEPSimulator/nbproject/private/private.xml	(revision 205)
@@ -11,5 +11,7 @@
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/HighwaysParser.h</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/DataPacker.h</file>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/DataPacker.cpp</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.cpp</file>
+            <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/Main.cpp</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/fep.h</file>
             <file>file:/Users/jtorres/tmcsimulator/branches/FEPSimulator/FEPSim.h</file>
Index: /branches/FEPSimulator/FEPSim.cpp
===================================================================
--- /branches/FEPSimulator/FEPSim.cpp	(revision 202)
+++ /branches/FEPSimulator/FEPSim.cpp	(revision 205)
@@ -26,4 +26,5 @@
     vector<STATION*> ldsMap = highwaysParser.stations;
 
+    
     // Send one reply for every FEPLine
     for (int i = 0; i < lines.size(); i++) {
@@ -74,9 +75,9 @@
             fsa.msg.message[3 + aa] = 0xff;
             
-            for(int l = 0; l < fsa.msg.message_len + 2; l++)
+            /*for(int l = 0; l < fsa.msg.message_len + 2; l++)
             {
                 printf("%02X", (unsigned char) fsa.msg.message[l]);
             }
-            printf("\n");
+            printf("\n");*/
             
             // info
@@ -89,5 +90,5 @@
             fepReply.answers.fep_answer_list_u.shortp.answers[0] = fsa;
             // send out data
-            printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, (int)ldsMap.at(index)->drop);
+            //printf("Transferring line=%d, lds_drop_no=%d...\n", lines.at(i)->lineNum, (int)ldsMap.at(index)->drop);
             // Make RPC Call and handle response
             // printf("Handling ATMS response...\n");
@@ -178,5 +179,5 @@
         // zero out buffer
         bzero(buffer, BUFF_SIZE);
-
+        
         // read XML from socket
         int totBytes = 0;
@@ -184,4 +185,6 @@
             totBytes += n;
         }
+        HighwaysParser highwaysParser = HighwaysParser(buffer);
+
 
         if (n < 0) {
Index: /branches/FEPSimulator/FEPSim.h
===================================================================
--- /branches/FEPSimulator/FEPSim.h	(revision 195)
+++ /branches/FEPSimulator/FEPSim.h	(revision 205)
@@ -43,7 +43,5 @@
 #include <unistd.h>
 
-// const int BUFF_SIZE = 5500000; // where it was
-// const int BUFF_SIZE = 11522291; // what it couldnt be :)
-const int BUFF_SIZE = 950401; // where it is now :) 
+const int BUFF_SIZE = 1266341; // where it is now :) 
 
 class FEPSim {
Index: /trunk/src/tmcsim/application.properties
===================================================================
--- /trunk/src/tmcsim/application.properties	(revision 202)
+++ /trunk/src/tmcsim/application.properties	(revision 205)
@@ -1,5 +1,5 @@
-#Mon, 30 Oct 2017 19:17:39 -0700
+#Wed, 01 Nov 2017 05:01:19 -0700
 
-Application.revision=195
+Application.revision=202
 
 Application.buildnumber=68
Index: /trunk/test/atmsdriver/model/LoadSadDotsTest.java
===================================================================
--- /trunk/test/atmsdriver/model/LoadSadDotsTest.java	(revision 186)
+++ /trunk/test/atmsdriver/model/LoadSadDotsTest.java	(revision 205)
@@ -48,5 +48,5 @@
         System.out.println("toXML");
         Highways highways = new Highways(
-                "config/vds_data/highways_fullmap.txt",
+                "test/atmsdriver/model/lds_loadhighways_sample.txt",
                 "localhost", 8080);
         
Index: /trunk/test/atmsdriver/model/HighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 191)
+++ /trunk/test/atmsdriver/model/HighwaysTest.java	(revision 205)
@@ -56,15 +56,15 @@
     }
     String expString = 
- "241 ------------------------------------------------------------\n"
-+"  5 @-------------------------------------------------------------------------------------------------------------------------------------------\n"
-+"405 --------------------------------------------------------------------------------\n"
-+"133 ----------------\n"
-+"261 -----------------\n"
-+" 22 ----------------------------------\n"
-+" 55 ------------------------------------------\n"
-+" 73 -----------------------------------------------------\n"
-+" 57 ------------------------------------------\n"
-+" 91 --------------------------------------------------------------\n"
-+"605 ---\n";
+        "241 ------------------------------------------------------------\n"
+       +"  5 @-------------------------------------------------------------------------------------------------------------------------------------------\n"
+       +"405 --------------------------------------------------------------------------------\n"
+       +"133 ----------------\n"
+       +"261 -----------------\n"
+       +" 22 ----------------------------------\n"
+       +" 55 ------------------------------------------\n"
+       +" 73 -----------------------------------------------------\n"
+       +" 57 ------------------------------------------\n"
+       +" 91 --------------------------------------------------------------\n"
+       +"605 ---\n";
 
     /**
Index: /trunk/test/atmsdriver/model/LoadHighwaysTest.java
===================================================================
--- /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 185)
+++ /trunk/test/atmsdriver/model/LoadHighwaysTest.java	(revision 205)
@@ -26,20 +26,40 @@
             writer = new PrintWriter(new FileWriter("test/atmsdriver/model/lds_loadhighways_sample.txt"));
             
-            writer.println("lds_id	line 	drop sch lineinfo	system_key	sch_seq glo_seq		count	freeway	Dir	ca_pm	lds_name");
-            writer.println("1203081     6       17      2       2       1123005691      26491   1357639         19      55      N       4.58    BRISTOL");
-            writer.println("1210163     6       20      2       2       1123005691      26491   1357639         19      55      N       5.51    PAULARINO 1");
-            writer.println("1203244     50      4       13      13      1123005873      24148   1357650         19      55      N       10      MCFADDEN");
-            writer.println("1203211     50      5       13      13      1123005873      24148   1357650         19      55      N       9.41    EDINGER 2");
-            
-            writer.println("1203261     23      14      23      21      1123005995      26479   1357626         18      55      S       10.4    S OF 5");
-            writer.println("1203083     6       18      2       2       1123005691      26491   1357639         19      55      S       4.7     BAKER 1");
-            writer.println("1210174     6       19      2       2       1123005691      26491   1357639         19      55      S       5.06    BAKER 2");
-            writer.println("1203270     23      15      23      21      1123005995      26479   1357626         18      55      S       10.5    N OF 5");
-            
-            writer.println("1205238     22      16      4       4       1123005726      26490   1357624         19      5       S       32.25   17TH 1");
-            writer.println("1205208     22      17      4       4       1123005726      26490   1357624         19      5       S       31.6    GRAND 1");
-            writer.println("1205270	5	19	1	1	1123005673	26492	1357648		20	5	S	33	MAIN 1   ");
-            
-
+            writer.println("2");
+            writer.println("32 0 2");
+            writer.println("1210831 1 5 S 0.9 8 CALAFIA");
+            writer.println("1210832 ML_1");
+            writer.println("1210833 ML_2");
+            writer.println("1210834 ML_3");
+            writer.println("1210835 ML_4");
+            writer.println("1210836 PASSAGE");
+            writer.println("1210837 DEMAND");
+            writer.println("1210838 QUEUE");
+            writer.println("1210839 RAMP_OFF");
+            writer.println("1210845 2 5 S 1.49 9 EL CAMINO REAL");
+            writer.println("1210846 ML_1");
+            writer.println("1210847 ML_2");
+            writer.println("1210848 ML_3");
+            writer.println("1210849 ML_4");
+            writer.println("1210850 RAMP_ON");
+            writer.println("1210851 PASSAGE");
+            writer.println("1210853 DEMAND");
+            writer.println("1210854 QUEUE");
+            writer.println("1210855 RAMP_OFF");
+            writer.println("74 0 1");
+            writer.println("1204203 2 5 N 1.26 13 MAGDALENA");
+            writer.println("1204205 RAMP_ON");
+            writer.println("1204206 QUEUE");
+            writer.println("1204207 DEMAND");
+            writer.println("1204208 PASSAGE");
+            writer.println("1204210 RAMP_OFF");
+            writer.println("1204212 ML_1");
+            writer.println("1204213 ML_2");
+            writer.println("1204214 ML_3");
+            writer.println("1204215 ML_4");
+            writer.println("1204217 OS_1");
+            writer.println("1204218 OS_2");
+            writer.println("1204219 OS_3");
+            writer.println("1204220 OS_4");
             writer.close();
         } catch (Exception e) {
@@ -61,17 +81,20 @@
         System.out.println("toXML");
         Highways highways = new Highways(
-                "config/vds_data/highways_fullmap.txt",
+                "test/atmsdriver/model/lds_loadhighways_sample.txt",
                 "localhost", 8080);
         
         // Test for correct number of highways
         ArrayList<Highway> result = highways.highways;
-        assertEquals(2, result.size());
+        assertEquals(1, result.size());
         
-        // Test 55 N was loaded
-        Highway fiftyfiveN = result.get(0);
-        assertEquals(new Integer(55), fiftyfiveN.routeNumber);
+        // Test 5 was loaded
+        Highway fiveS = result.get(0);
+        assertEquals(new Integer(5), fiveS.routeNumber);
         
-        // Test 55 N stations are sorted by postmile
-        ArrayList<Station> stations = fiftyfiveN.stations;
+        // Test for correct number of stations
+        assertEquals(new Integer(3), new Integer(fiveS.stations.size()));
+        
+        // Test 5 stations are sorted by postmile
+        ArrayList<Station> stations = fiveS.stations;
         ArrayList<Double> stationsPostmiles = new ArrayList<>();
         for(Station station : stations)
@@ -82,33 +105,8 @@
         // Create expected station postmile list (sorted)
         ArrayList<Double> expectedStationsPostmiles = new ArrayList<>();
-        expectedStationsPostmiles.add(new Double(4.58));
-        expectedStationsPostmiles.add(new Double(4.7));
-        expectedStationsPostmiles.add(new Double(5.06));
-        expectedStationsPostmiles.add(new Double(5.51));
-        expectedStationsPostmiles.add(new Double(9.41));
-        expectedStationsPostmiles.add(new Double(10));
-        expectedStationsPostmiles.add(new Double(10.4));
-        expectedStationsPostmiles.add(new Double(10.5));
-        for(int i = 0; i < 8; i++)
-        {
-            assertEquals(expectedStationsPostmiles.get(i), 
-                    stationsPostmiles.get(i));
-        }
-        
-        // Test 55 S was loaded
-        Highway fiftyfiveS = result.get(1);
-        assertEquals(new Integer(5), fiftyfiveS.routeNumber);
-        
-        // Test 55 S stations are sorted by postmile
-        stations = fiftyfiveS.stations;
-        stationsPostmiles.clear();
-        for(Station station : stations)
-        {
-            stationsPostmiles.add(station.postmile);
-        }
-        expectedStationsPostmiles.clear();
-        expectedStationsPostmiles.add(new Double(31.6));
-        expectedStationsPostmiles.add(new Double(32.25));
-        expectedStationsPostmiles.add(new Double(33));
+        expectedStationsPostmiles.add(new Double(0.9));
+        expectedStationsPostmiles.add(new Double(1.26));
+        expectedStationsPostmiles.add(new Double(1.49));
+
         for(int i = 0; i < 3; i++)
         {
