Changeset 79 in tmcsimulator for branches/fep_rpc_client/NetworkReader.h


Ignore:
Timestamp:
10/05/2017 12:51:23 PM (9 years ago)
Author:
jtorres
Message:

new atmsdriver package in trunk. fep_rpc_client dynamic data packing added in branches. fep_rpc_client refactored data packing code into static DataPacker? class. Added vds_data folder into config/. Added new project configuration for ATMSDriver.

File:
1 edited

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 
    25 * xml file. 
    36 *  
     
    58 * which are getters for the list of FEP_LINES, and LDS_LOOPS, respectively. 
    69 *  
    7  * Example xml file: 
     10 * Example XML file: 
    811 * <code> 
    912 * <Network> 
     
    4750#define __NETWORKREADER_H_INCLUDED__ 
    4851 
    49 // Forward declared dependencies 
    50  
    5152// Included dependencies 
    5253#include "network.h" 
    5354#include <vector> 
    54 #include <string> 
    5555#include <string.h> 
    5656#include <iostream> 
    5757#include "tinyxml.h" 
     58#include "DataPacker.h" 
    5859 
    5960class NetworkReader 
     
    6364        ~NetworkReader(); // Destructor 
    6465         
    65         vector<FEP_LINE> getLines(); // Getter for FEP_LINE list 
    66         vector<LDS_LOOP> getStations(); // Getter for LDS_LOOP list 
     66        vector<FEP_LINE*> getLines(); // Getter for FEP_LINE list 
     67        vector<LDS_LOOP*> getStations(); // Getter for LDS_LOOP list 
    6768    private: 
    68         vector<FEP_LINE> lines; 
    69         vector<LDS_LOOP> stations; 
     69        vector<FEP_LINE*> lines; 
     70        vector<LDS_LOOP*> stations; 
    7071        int ldsIndex; 
    7172 
    7273        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); 
    7977}; 
    8078 
Note: See TracChangeset for help on using the changeset viewer.