source: tmcsimulator/branches/FEPSimulator/FEPClient.h @ 80

Revision 80, 1.4 KB checked in by jtorres, 9 years ago (diff)

Renamed project. Renamed LDS_LOOP to STATION.

Line 
1/*
2 * File: FEPClient.h
3 *
4 * The FEPClient is an RPC Client which transfers network data to the
5 * ATMS Server.
6 *
7 * An FEPClient is created every 30 seconds, and an fep_reply structure
8 * for every FEP_LINE_LDS is transferred to the ATMS through an RPC Call.
9 * After the FEPClient has transferred all fep_replys, it is destroyed.
10 *
11 * An FEPClient is script-like in nature. There are no public methods other than
12 * the constructor. To construct an FEPClient, an input file (containing network
13 * data in xml form) and a host server_ip (for the ATMS) are necessary. The
14 * format of the xml input file can be fount in "networkReader.cpp" source file.
15 *
16 * @author John A. Torres
17 * @version 9/8/2017
18 */
19
20// Include guard
21#ifndef __FEPCLIENT_H_INCLUDED__
22#define __FEPCLIENT_H_INCLUDED__
23
24// Forward declared dependencies
25class NetworkReader;
26
27// Included dependencies
28#include "fep.h"
29#include <iostream>
30#include <stdlib.h>
31#include "time.h"
32#include "NetworkReader.h"
33
34class FEPClient
35{
36        public:
37        /* members */
38                CLIENT *clnt; // RPC Client
39
40        /* methods */
41                FEPClient(char * host, char * networkFile); // Constructor
42                ~FEPClient(); // Destructor
43
44        private:
45        /* members */
46        NetworkReader *networkReader;
47
48        /* methods */
49                void handleCallResponse(void *response); //
50                void createClient(char *host);
51        void updateATMS(); // updates ATMS
52
53};
54
55#endif // __FEPCLIENT_H_INCLUDED__
Note: See TracBrowser for help on using the repository browser.