source: tmcsimulator/branches/fep_rpc_client/FEPClient.h @ 77

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

fep_rpc_client: NetworkReader? complete. All cpp code is commented and cleaned. Added tinyxml lib.

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