Index: branches/FEPSimulator/FEPSim.h
===================================================================
--- branches/FEPSimulator/FEPSim.h	(revision 82)
+++ branches/FEPSimulator/FEPSim.h	(revision 82)
@@ -0,0 +1,64 @@
+/* 
+ * File: FEPSim.h
+ * 
+ * The FEPSim is an RPC Client which transfers network data to the
+ * ATMS Server.
+ *
+ * An FEPSim is created every 30 seconds, and an fep_reply structure
+ * for every FEP_LINE_LDS is transferred to the ATMS through an RPC Call.
+ * After the FEPSim has transferred all fep_replys, it is destroyed.
+ *
+ * An FEPSim is script-like in nature. There are no public methods other than
+ * the constructor. To construct an FEPSim, an input file (containing network 
+ * data in xml form) and a host server_ip (for the ATMS) are necessary. The 
+ * format of the xml input file can be fount in "networkReader.cpp" source file.
+ *
+ * @author John A. Torres
+ * @version 9/8/2017
+ */
+
+// Include guard
+#ifndef __FEPSIM_H_INCLUDED__
+#define __FEPSIM_H_INCLUDED__
+
+// Forward declared dependencies
+class NetworkReader;
+
+// Included dependencies
+#include "fep.h"
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+#include "time.h"
+#include "NetworkReader.h"
+#include <netdb.h>
+#include <sys/types.h> 
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <unistd.h>
+
+const int BUFF_SIZE = 1000000;
+
+class FEPSim
+{
+	public:
+        /* members */
+		CLIENT *clnt; // RPC Client
+
+        /* methods */
+		FEPSim(char * host, char * networkFile); // Constructor
+		~FEPSim(); // Destructor
+
+	private:
+        /* members */
+        NetworkReader *networkReader;
+        char * ATMSHost;
+        
+        /* methods */
+        void handleCallResponse(void *response); //
+        void createClient(char *host);
+        void updateATMS(); // updates ATMS
+
+};
+
+#endif // __FEPSIM_H_INCLUDED__
Index: branches/FEPSimulator/DataPacker.h
===================================================================
--- branches/FEPSimulator/DataPacker.h	(revision 80)
+++ branches/FEPSimulator/DataPacker.h	(revision 82)
@@ -14,5 +14,5 @@
 
 // Include dependencies
-#include "network.h";
+#include "network.h"
 #include <iostream>
 #include <string.h>
Index: branches/FEPSimulator/nbproject/Makefile-Debug.mk
===================================================================
--- branches/FEPSimulator/nbproject/Makefile-Debug.mk	(revision 80)
+++ branches/FEPSimulator/nbproject/Makefile-Debug.mk	(revision 82)
@@ -22,6 +22,6 @@
 
 # Macros
-CND_PLATFORM=GNU-Linux-x86
-CND_DLIB_EXT=so
+CND_PLATFORM=GNU-MacOSX
+CND_DLIB_EXT=dylib
 CND_CONF=Debug
 CND_DISTDIR=dist
@@ -37,5 +37,5 @@
 OBJECTFILES= \
 	${OBJECTDIR}/DataPacker.o \
-	${OBJECTDIR}/FEPClient.o \
+	${OBJECTDIR}/FEPSim.o \
 	${OBJECTDIR}/NetworkReader.o \
 	${OBJECTDIR}/fep_clnt.o \
@@ -57,15 +57,15 @@
 
 # Link Libraries and Options
-LDLIBSOPTIONS=tinyxml/tinyxml.a
+LDLIBSOPTIONS=tinyxml/libosxtinyxml.a
 
 # Build Targets
 .build-conf: ${BUILD_SUBPROJECTS}
-	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client
+	"${MAKE}"  -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator
 
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client: tinyxml/tinyxml.a
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator: tinyxml/libosxtinyxml.a
 
-${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client: ${OBJECTFILES}
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator: ${OBJECTFILES}
 	${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
-	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client ${OBJECTFILES} ${LDLIBSOPTIONS}
+	${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator ${OBJECTFILES} ${LDLIBSOPTIONS}
 
 ${OBJECTDIR}/DataPacker.o: DataPacker.cpp 
@@ -74,8 +74,8 @@
 	$(COMPILE.cc) -g -Itinyxml -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/DataPacker.o DataPacker.cpp
 
-${OBJECTDIR}/FEPClient.o: FEPClient.cpp 
+${OBJECTDIR}/FEPSim.o: FEPSim.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} "$@.d"
-	$(COMPILE.cc) -g -Itinyxml -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/FEPClient.o FEPClient.cpp
+	$(COMPILE.cc) -g -Itinyxml -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/FEPSim.o FEPSim.cpp
 
 ${OBJECTDIR}/NetworkReader.o: NetworkReader.cpp 
@@ -100,5 +100,5 @@
 .clean-conf: ${CLEAN_SUBPROJECTS}
 	${RM} -r ${CND_BUILDDIR}/${CND_CONF}
-	${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client
+	${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator
 
 # Subprojects
Index: branches/FEPSimulator/nbproject/Makefile-variables.mk
===================================================================
--- branches/FEPSimulator/nbproject/Makefile-variables.mk	(revision 77)
+++ branches/FEPSimulator/nbproject/Makefile-variables.mk	(revision 82)
@@ -8,11 +8,11 @@
 CND_DISTDIR=dist
 # Debug configuration
-CND_PLATFORM_Debug=GNU-Linux-x86
-CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86
-CND_ARTIFACT_NAME_Debug=fep_rpc_client
-CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/fep_rpc_client
-CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package
-CND_PACKAGE_NAME_Debug=feprpcclient.tar
-CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/feprpcclient.tar
+CND_PLATFORM_Debug=GNU-MacOSX
+CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-MacOSX
+CND_ARTIFACT_NAME_Debug=fepsimulator
+CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-MacOSX/fepsimulator
+CND_PACKAGE_DIR_Debug=dist/Debug/GNU-MacOSX/package
+CND_PACKAGE_NAME_Debug=fepsimulator.tar
+CND_PACKAGE_PATH_Debug=dist/Debug/GNU-MacOSX/package/fepsimulator.tar
 # Release configuration
 CND_PLATFORM_Release=GNU-Linux-x86
Index: branches/FEPSimulator/nbproject/configurations.xml
===================================================================
--- branches/FEPSimulator/nbproject/configurations.xml	(revision 80)
+++ branches/FEPSimulator/nbproject/configurations.xml	(revision 82)
@@ -6,5 +6,5 @@
                    projectFiles="true">
       <itemPath>DataPacker.h</itemPath>
-      <itemPath>FEPClient.h</itemPath>
+      <itemPath>FEPSim.h</itemPath>
       <itemPath>NetworkReader.h</itemPath>
       <itemPath>fep.h</itemPath>
@@ -19,5 +19,5 @@
                    projectFiles="true">
       <itemPath>DataPacker.cpp</itemPath>
-      <itemPath>FEPClient.cpp</itemPath>
+      <itemPath>FEPSim.cpp</itemPath>
       <itemPath>NetworkReader.cpp</itemPath>
       <itemPath>fep_clnt.c</itemPath>
@@ -52,5 +52,5 @@
         <linkerTool>
           <linkerLibItems>
-            <linkerLibFileItem>tinyxml/tinyxml.a</linkerLibFileItem>
+            <linkerLibFileItem>tinyxml/libosxtinyxml.a</linkerLibFileItem>
           </linkerLibItems>
         </linkerTool>
@@ -60,7 +60,7 @@
       <item path="DataPacker.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="FEPClient.cpp" ex="false" tool="1" flavor2="0">
+      <item path="FEPSim.cpp" ex="false" tool="1" flavor2="0">
       </item>
-      <item path="FEPClient.h" ex="false" tool="3" flavor2="0">
+      <item path="FEPSim.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="NetworkReader.cpp" ex="false" tool="1" flavor2="0">
@@ -101,7 +101,7 @@
       <item path="DataPacker.h" ex="false" tool="3" flavor2="0">
       </item>
-      <item path="FEPClient.cpp" ex="false" tool="1" flavor2="0">
+      <item path="FEPSim.cpp" ex="false" tool="1" flavor2="0">
       </item>
-      <item path="FEPClient.h" ex="false" tool="3" flavor2="0">
+      <item path="FEPSim.h" ex="false" tool="3" flavor2="0">
       </item>
       <item path="NetworkReader.cpp" ex="false" tool="1" flavor2="0">
Index: branches/FEPSimulator/nbproject/private/configurations.xml
===================================================================
--- branches/FEPSimulator/nbproject/private/configurations.xml	(revision 80)
+++ branches/FEPSimulator/nbproject/private/configurations.xml	(revision 82)
@@ -6,5 +6,5 @@
       <toolsSet>
         <developmentServer>localhost</developmentServer>
-        <platform>2</platform>
+        <platform>4</platform>
       </toolsSet>
       <dbx_gdbdebugger version="1">
@@ -28,6 +28,8 @@
           <runcommandpicklistitem>"${OUTPUT_PATH}" localhost networkFile.txt</runcommandpicklistitem>
           <runcommandpicklistitem>"${OUTPUT_PATH}" 192.168.251.27 networkFile.txt</runcommandpicklistitem>
+          <runcommandpicklistitem>"${OUTPUT_PATH}" 192.168.251.27</runcommandpicklistitem>
+          <runcommandpicklistitem>"${OUTPUT_PATH}" 192.168.251.27 8080</runcommandpicklistitem>
         </runcommandpicklist>
-        <runcommand>"${OUTPUT_PATH}" 192.168.251.27 networkFile.txt</runcommand>
+        <runcommand>"${OUTPUT_PATH}" 192.168.251.27 8080</runcommand>
         <rundir></rundir>
         <buildfirst>true</buildfirst>
Index: branches/FEPSimulator/nbproject/Package-Debug.bash
===================================================================
--- branches/FEPSimulator/nbproject/Package-Debug.bash	(revision 77)
+++ branches/FEPSimulator/nbproject/Package-Debug.bash	(revision 82)
@@ -7,14 +7,14 @@
 # Macros
 TOP=`pwd`
-CND_PLATFORM=GNU-Linux-x86
+CND_PLATFORM=GNU-MacOSX
 CND_CONF=Debug
 CND_DISTDIR=dist
 CND_BUILDDIR=build
-CND_DLIB_EXT=so
+CND_DLIB_EXT=dylib
 NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
 TMPDIRNAME=tmp-packaging
-OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fep_rpc_client
-OUTPUT_BASENAME=fep_rpc_client
-PACKAGE_TOP_DIR=feprpcclient/
+OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/fepsimulator
+OUTPUT_BASENAME=fepsimulator
+PACKAGE_TOP_DIR=fepsimulator/
 
 # Functions
@@ -61,5 +61,5 @@
 # Copy files and create directories and links
 cd "${TOP}"
-makeDirectory "${NBTMPDIR}/feprpcclient/bin"
+makeDirectory "${NBTMPDIR}/fepsimulator/bin"
 copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
 
@@ -67,7 +67,7 @@
 # Generate tar file
 cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/feprpcclient.tar
+rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fepsimulator.tar
 cd ${NBTMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/feprpcclient.tar *
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fepsimulator.tar *
 checkReturnCode
 
Index: branches/FEPSimulator/nbproject/Makefile-impl.mk
===================================================================
--- branches/FEPSimulator/nbproject/Makefile-impl.mk	(revision 77)
+++ branches/FEPSimulator/nbproject/Makefile-impl.mk	(revision 82)
@@ -25,5 +25,5 @@
 
 # Project Name
-PROJECTNAME=fep_rpc_client
+PROJECTNAME=FEPSimulator
 
 # Active Configuration
Index: branches/FEPSimulator/NetworkReader.cpp
===================================================================
--- branches/FEPSimulator/NetworkReader.cpp	(revision 80)
+++ branches/FEPSimulator/NetworkReader.cpp	(revision 82)
@@ -5,7 +5,7 @@
  * @param networkFileName input xml file
  */
-NetworkReader::NetworkReader(const char * networkFileName) {
+NetworkReader::NetworkReader(const char * xml) {
     ldsIndex = 0;
-    loadLines(networkFileName);
+    loadLines(xml);
 }
 
@@ -108,11 +108,8 @@
  * @param networkFileName the input xml file
  */
-void NetworkReader::loadLines(const char * networkFileName) {
+void NetworkReader::loadLines(const char * xml) {
     // Load network xml file
-    TiXmlDocument doc(networkFileName);
-    if (!doc.LoadFile()) {
-        cerr << "TiXmlDocument did not load network file..." << endl;
-        return;
-    }
+    TiXmlDocument doc;
+    doc.Parse((const char*)xml, 0, TIXML_ENCODING_UTF8);
 
     // grab <Network> element
Index: branches/FEPSimulator/FEPSim.cpp
===================================================================
--- branches/FEPSimulator/FEPSim.cpp	(revision 82)
+++ branches/FEPSimulator/FEPSim.cpp	(revision 82)
@@ -0,0 +1,206 @@
+#include "FEPSim.h"
+
+/**
+ * Constructor
+ * 
+ * @param host The host rpc server ip address
+ * @param networkFile the xml network file
+ */
+FEPSim::FEPSim(char * ATMShost, char * xml) {
+    networkReader = new NetworkReader(xml);
+    this->ATMSHost = ATMShost;
+    updateATMS();
+}
+
+/**
+ * Destructor
+ */
+FEPSim::~FEPSim() {
+    cout << "Destroying client..." << endl;
+    clnt_destroy(clnt);
+}
+
+/**
+ * Handler for the ATMS RPC Response (to the client RPC Call)
+ * @param response pointer to fep_reply struct
+ */
+void FEPSim::handleCallResponse(void *response) {
+    /* If ATMS reply call fails */
+    if (response == NULL) {
+        clnt_perror(clnt, "RPC call failed");
+    }/* If ATMS reply is successful */
+    else {
+        cout << "Successful RPC call to ATMS..." << endl;
+    }
+}
+
+/**
+ * Sends an fep_reply for every line in the FEP.
+ */
+void FEPSim::updateATMS() {
+    int i, j; // i == line_index, j == lds_index
+    void *rv;
+    vector<FEP_LINE*> lines = networkReader->getLines();
+    vector<STATION*> ldsMap = networkReader->getStations();
+
+    // Send one reply for every "line" in the FEP
+    for (i = 0; i < lines.size(); i++) {
+        fep_reply fepReply;
+        cout << "Sending fepReply for line #" << lines.at(i)->lineNum << endl;
+        // populate reply
+        fepReply.reply = SHORTPOLL;
+        fepReply.schedule = lines.at(i)->schedule;
+        fepReply.lineinfo = lines.at(i)->lineInfo;
+        fepReply.kind = (enum polltype) 0;
+        fepReply.flag = (enum replykind) 0;
+
+        /***********************************
+                 This is an update to an extern, this should happen on the Java driver side??
+        lines.at(i).schedleSeq += 1;
+        lines.at(i).globalSeq += 51;
+         */
+
+        fepReply.schedule_sequence = lines.at(i)->schedleSeq;
+        fepReply.global_sequence = lines.at(i)->globalSeq;
+        /************************************
+                 Need to find out what appropriate schedule time is: look at uci_unix_simulation_time src code
+        fepReply.schedule_time =
+                uci_unix_simulation_time(uci_simulation_time());	// GMT time
+         */
+        fepReply.schedule_time = time(NULL);
+
+        fepReply.user_info1 = lines.at(i)->lineNum;
+        fepReply.user_info2 = lines.at(i)->lineNum;
+        fepReply.system_key = lines.at(i)->systemKey;
+
+        fepReply.answers.size = 1;
+        fepReply.answers.fep_answer_list_u.shortp.count = 1;
+
+        /* for each LDS in the Line.... (constructs the short_answer message) */
+        for (j = 0; j < lines.at(i)->lds.size(); j++) {
+            fep_shortanswer fsa;
+            int index = lines.at(i)->ldsIndex.at(j);
+            cout << "LDS index: " << index << endl;
+            // msg: oa, od, ldsMap.at(index).dataPack, od, ff
+            fsa.msg.message_len = ldsMap.at(index)->length + 2;
+            fsa.msg.message[0] = 0x0d;
+            fsa.msg.message[1] = 0x0a;
+            for (int k = 0; k < ldsMap.at(index)->length; k++)
+                fsa.msg.message[2 + k] = ldsMap.at(index)->dataPack[k];
+            int aa = ldsMap.at(index)->length;
+            fsa.msg.message[2 + aa] = 0x0d;
+            fsa.msg.message[3 + aa] = 0xff; //????????????? warning ?????
+
+            // info
+            fsa.info.poll_error_count = 0;
+            /***************************************
+                     Need to find out polltime uci time function src code
+            fsa.info.poll_time = uci_unix_simulation_time(uci_simulation_time());
+             */
+            fsa.info.poll_user_info1 = ldsMap.at(index)->drop; // drop number
+            fsa.info.poll_user_info2 = 1; //always 1
+            fsa.info.retries = 0;
+            fsa.info.status = (enum replystatus) 1;
+
+            //fepReply.answers.fep_answer_list_u.shortp.answers[j +1] = fsa;
+            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, ldsMap.at(index)->drop);
+            rv = fep_reply_xfer_32(&fepReply, clnt);
+
+            /* Handle ATMS response to RPC Call */
+            printf("Handling ATMS response...\n");
+            handleCallResponse(rv);
+        }
+    }
+}
+
+/**
+ * Creates the RPC Client. If not successful, exit with status 1.
+ * @param host rpc server ip
+ */
+void FEPSim::createClient(char * host) {
+    /* Create RPC Client to communicate with ATMS */
+    cout << "Creating RPC Client" << endl;
+    clnt = clnt_create(host, /*100090,*/ 103121, 32, "tcp");
+    cout << "Client created" << endl;
+    /* Check if client creation failed */
+    if (clnt == (CLIENT *) NULL) {
+        cerr << "Can't create client to " << host << endl;
+        exit(1);
+    }
+}
+
+/**
+ * Main driver for ATMSCommunicator. Creates an RPC Client from command line args.
+ * @param argc
+ * @param argv
+ * @return 
+ */
+int main(int argc, char *argv[]) {
+
+    int sockfd, newsockfd, portno, clilen;
+    char buffer[BUFF_SIZE];
+    struct sockaddr_in serv_addr, cli_addr;
+    int n;
+    
+    char *FEPSimHost = argv[1];
+    portno = atoi(argv[2]);
+
+    /* First call to socket() function */
+    sockfd = socket(AF_INET, SOCK_STREAM, 0);
+
+    if (sockfd < 0) {
+        perror("ERROR opening socket");
+        exit(1);
+    }
+
+    /* Initialize socket structure */
+    bzero((char *) &serv_addr, sizeof (serv_addr));
+
+    serv_addr.sin_family = AF_INET;
+    serv_addr.sin_addr.s_addr = INADDR_ANY;
+    serv_addr.sin_port = htons(portno);
+
+    /* Now bind the host address using bind() call.*/
+    if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof (serv_addr)) < 0) {
+        perror("ERROR on binding");
+        exit(1);
+    }
+
+    /* Now start listening for the clients, here process will
+     * go in sleep mode and will wait for the incoming connection
+     */
+
+    listen(sockfd, 5);
+    clilen = sizeof (cli_addr);
+
+    /* Accept actual connection from the client */
+    while(1) {
+        newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, (socklen_t *)&clilen);
+
+        if (newsockfd < 0) {
+            perror("ERROR on accept");
+            exit(1);
+        }
+
+        /* If connection is established then start communicating */
+        bzero(buffer, BUFF_SIZE);
+        
+        // NEEDS OUTER LOOP TO GET WHOLE MESSAGE FROM TCP CONN
+        n = read(newsockfd, buffer, sizeof(buffer));
+
+        if (n < 0) {
+            perror("ERROR reading from socket");
+            exit(1);
+        }
+        
+        /* Create RPC Client to send an fep_reply to ATMS */
+
+        FEPSim *client = new FEPSim(FEPSimHost, buffer);
+        delete client;
+    }
+
+    return 0;
+}
Index: branches/FEPSimulator/FEPClient.cpp
===================================================================
--- branches/FEPSimulator/FEPClient.cpp	(revision 80)
+++ 	(revision )
@@ -1,160 +1,0 @@
-#include "FEPClient.h"
-
-/**
- * Constructor
- * 
- * @param host The host rpc server ip address
- * @param networkFile the xml network file
- */
-FEPClient::FEPClient(char * host, char * networkFile) {
-    networkReader = new NetworkReader(networkFile);
-    createClient(host);
-    updateATMS();
-}
-
-/**
- * Destructor
- */
-FEPClient::~FEPClient() {
-    cout << "Destroying client..." << endl;
-    clnt_destroy(clnt);
-}
-
-/**
- * Handler for the ATMS RPC Response (to the client RPC Call)
- * @param response pointer to fep_reply struct
- */
-void FEPClient::handleCallResponse(void *response) {
-    /* If ATMS reply call fails */
-    if (response == NULL) {
-        clnt_perror(clnt, "RPC call failed");
-    }        /* If ATMS reply is successful */
-    else {
-        cout << "Successful RPC call to ATMS..." << endl;
-    }
-}
-
-/**
- * Sends an fep_reply for every line in the FEP.
- */
-void FEPClient::updateATMS() {
-    int i, j; // i == line_index, j == lds_index
-    void *rv;
-
-    vector<FEP_LINE*> lines = networkReader->getLines();
-    vector<STATION*> ldsMap = networkReader->getStations();
-
-    // Send one reply for every "line" in the FEP
-    for (i = 0; i < lines.size(); i++) {
-        fep_reply fepReply;
-        cout << "Sending fepReply for line #" << lines.at(i)->lineNum << endl;
-        // populate reply
-        fepReply.reply = SHORTPOLL;
-        fepReply.schedule = lines.at(i)->schedule;
-        fepReply.lineinfo = lines.at(i)->lineInfo;
-        fepReply.kind = (enum polltype) 0;
-        fepReply.flag = (enum replykind) 0;
-
-        /***********************************
-                 This is an update to an extern, this should happen on the Java driver side??
-        lines.at(i).schedleSeq += 1;
-        lines.at(i).globalSeq += 51;
-         */
-
-        fepReply.schedule_sequence = lines.at(i)->schedleSeq;
-        fepReply.global_sequence = lines.at(i)->globalSeq;
-        /************************************
-                 Need to find out what appropriate schedule time is: look at uci_unix_simulation_time src code
-        fepReply.schedule_time =
-                uci_unix_simulation_time(uci_simulation_time());	// GMT time
-         */
-        fepReply.schedule_time = time(NULL);
-
-        fepReply.user_info1 = lines.at(i)->lineNum;
-        fepReply.user_info2 = lines.at(i)->lineNum;
-        fepReply.system_key = lines.at(i)->systemKey;
-
-        fepReply.answers.size = 1;
-        fepReply.answers.fep_answer_list_u.shortp.count = 1;
-
-        /* for each LDS in the Line.... (constructs the short_answer message) */
-        for (j = 0; j < lines.at(i)->lds.size(); j++) {
-            fep_shortanswer fsa;
-            int index = lines.at(i)->ldsIndex.at(j);
-            cout << "LDS index: " << index << endl;
-            // msg: oa, od, ldsMap.at(index).dataPack, od, ff
-            fsa.msg.message_len = ldsMap.at(index)->length + 2;
-            fsa.msg.message[0] = 0x0d;
-            fsa.msg.message[1] = 0x0a;
-            for (int k = 0; k < ldsMap.at(index)->length; k++)
-                fsa.msg.message[2 + k] = ldsMap.at(index)->dataPack[k];
-            int aa = ldsMap.at(index)->length;
-            fsa.msg.message[2 + aa] = 0x0d;
-            fsa.msg.message[3 + aa] = 0xff; //????????????? warning ?????
-
-            // info
-            fsa.info.poll_error_count = 0;
-            /***************************************
-                     Need to find out polltime uci time function src code
-            fsa.info.poll_time = uci_unix_simulation_time(uci_simulation_time());
-             */
-            fsa.info.poll_user_info1 = ldsMap.at(index)->drop; // drop number
-            fsa.info.poll_user_info2 = 1; //always 1
-            fsa.info.retries = 0;
-            fsa.info.status = (enum replystatus) 1;
-
-            //fepReply.answers.fep_answer_list_u.shortp.answers[j +1] = fsa;
-            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, ldsMap.at(index)->drop);
-            rv = fep_reply_xfer_32(&fepReply, clnt);
-
-            /* Handle ATMS response to RPC Call */
-            printf("Handling ATMS response...\n");
-            handleCallResponse(rv);
-        }
-    }
-}
-
-/**
- * Creates the RPC Client. If not successful, exit with status 1.
- * @param host rpc server ip
- */
-void FEPClient::createClient(char * host) {
-    /* Create RPC Client to communicate with ATMS */
-    cout << "Creating RPC Client" << endl;
-    clnt = clnt_create(host, /*100090,*/ 103121, 32, "tcp");
-    cout << "Client created" << endl;
-    /* Check if client creation failed */
-    if (clnt == (CLIENT *) NULL) {
-        cerr << "Can't create client to " << host << endl;
-        exit(1);
-    }
-}
-
-/**
- * Main driver for ATMSCommunicator. Creates an RPC Client from command line args.
- * @param argc
- * @param argv
- * @return 
- */
-int main(int argc, char *argv[]) {
-
-    char *host;
-    char *networkFile;
-
-    if (argc < 3) {
-        cout << "usage:  " << argv[0] << " server_host networkFile" << endl;
-        exit(1);
-    }
-
-    /* Create RPC Client to send an fep_reply to ATMS */
-    host = argv[1];
-    networkFile = argv[2];
-
-    FEPClient *client = new FEPClient(host, networkFile);
-    delete client;
-
-    return 0;
-}
Index: branches/FEPSimulator/FEPClient.h
===================================================================
--- branches/FEPSimulator/FEPClient.h	(revision 80)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/* 
- * File: FEPClient.h
- * 
- * The FEPClient is an RPC Client which transfers network data to the
- * ATMS Server.
- *
- * An FEPClient is created every 30 seconds, and an fep_reply structure
- * for every FEP_LINE_LDS is transferred to the ATMS through an RPC Call.
- * After the FEPClient has transferred all fep_replys, it is destroyed.
- *
- * An FEPClient is script-like in nature. There are no public methods other than
- * the constructor. To construct an FEPClient, an input file (containing network 
- * data in xml form) and a host server_ip (for the ATMS) are necessary. The 
- * format of the xml input file can be fount in "networkReader.cpp" source file.
- *
- * @author John A. Torres
- * @version 9/8/2017
- */
-
-// Include guard
-#ifndef __FEPCLIENT_H_INCLUDED__
-#define __FEPCLIENT_H_INCLUDED__
-
-// Forward declared dependencies
-class NetworkReader;
-
-// Included dependencies
-#include "fep.h"
-#include <iostream>
-#include <stdlib.h>
-#include "time.h"
-#include "NetworkReader.h"
-
-class FEPClient
-{
-	public:
-        /* members */
-		CLIENT *clnt; // RPC Client
-
-        /* methods */
-		FEPClient(char * host, char * networkFile); // Constructor
-		~FEPClient(); // Destructor
-
-	private:
-        /* members */
-        NetworkReader *networkReader;
-
-        /* methods */
-		void handleCallResponse(void *response); //
-		void createClient(char *host);
-        void updateATMS(); // updates ATMS
-
-};
-
-#endif // __FEPCLIENT_H_INCLUDED__
