Changeset 79 in tmcsimulator for branches/fep_rpc_client/NetworkReader.h
- Timestamp:
- 10/05/2017 12:51:23 PM (9 years ago)
- File:
-
- 1 edited
-
branches/fep_rpc_client/NetworkReader.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/fep_rpc_client/NetworkReader.h
r78 r79 1 /** A NetworkReader reads in data about the traffic network from a specified 1 /** 2 * File: NetworkReader.h 3 * 4 * A NetworkReader reads in data about the traffic network from a specified 2 5 * xml file. 3 6 * … … 5 8 * which are getters for the list of FEP_LINES, and LDS_LOOPS, respectively. 6 9 * 7 * Example xmlfile:10 * Example XML file: 8 11 * <code> 9 12 * <Network> … … 47 50 #define __NETWORKREADER_H_INCLUDED__ 48 51 49 // Forward declared dependencies50 51 52 // Included dependencies 52 53 #include "network.h" 53 54 #include <vector> 54 #include <string>55 55 #include <string.h> 56 56 #include <iostream> 57 57 #include "tinyxml.h" 58 #include "DataPacker.h" 58 59 59 60 class NetworkReader … … 63 64 ~NetworkReader(); // Destructor 64 65 65 vector<FEP_LINE > getLines(); // Getter for FEP_LINE list66 vector<LDS_LOOP > getStations(); // Getter for LDS_LOOP list66 vector<FEP_LINE*> getLines(); // Getter for FEP_LINE list 67 vector<LDS_LOOP*> getStations(); // Getter for LDS_LOOP list 67 68 private: 68 vector<FEP_LINE > lines;69 vector<LDS_LOOP > stations;69 vector<FEP_LINE*> lines; 70 vector<LDS_LOOP*> stations; 70 71 int ldsIndex; 71 72 72 73 void loadLines(const char * networkFileName); 73 LDS_LOOP parseStation(TiXmlElement *stationElem, FEP_LINE *line); 74 FEP_LINE parseLine(TiXmlElement *lineElem); 75 76 bool DataAvail(char flag, int num); // Helper function for msgDataPack 77 unsigned char * staticDataPack(LDS_LOOP loop); // Packs the static data in message sent to ATMS 78 // int pp_data_packing(int index, int packNo, int pos); // Packs dynamic data in message sent to ATMS 74 LOOP * parseLoop(TiXmlElement * loopElem); 75 LDS_LOOP * parseStation(TiXmlElement *stationElem, FEP_LINE *line); 76 FEP_LINE * parseLine(TiXmlElement *lineElem); 79 77 }; 80 78
Note: See TracChangeset
for help on using the changeset viewer.
