// Include guard
#ifndef __NETWORKREADER_H_INCLUDED__
#define __NETWORKREADER_H_INCLUDED__

// Forward declared dependencies

// Included dependencies
#include "network.h"
#include <string>
#include <string.h>

/* A NetworkReader reads in traffic network data from an input file.
 *
 * A NetworkReader contains two public methods 'getLines' and 'getLoops',
 * which are getters for the list of FEP_LINES, and LDS_LOOPS, respectively.
 *
 * Example of network input file:
 * < INSERT EXAMPLE HERE >
 *
 * Author: John A Torres
 * Version: 9/8/2017
 */
class NetworkReader
{
    public:
        // Constructor:
        //    networkFile: name of network input file
        NetworkReader(string networkFile);
        // Destructor
        ~NetworkReader(); // Destructor

        vector<FEP_LINE> getLines(); // Getter for FEP_LINE list
        vector<LDS_LOOP> getLoops(); // Getter for LDS_LOOP list
    private:
        string networkFile; // File containing Line and Loop data

        bool DataAvail(char flag, int num); // Helper function for msgDataPack
        unsigned char * msgDataPack(LDS_LOOP loop); // Packs the message sent to ATMS
};

#endif
