Changeset 82 in tmcsimulator for branches/FEPSimulator/FEPSim.h
- Timestamp:
- 10/06/2017 06:54:21 PM (9 years ago)
- File:
-
- 1 moved
-
branches/FEPSimulator/FEPSim.h (moved) (moved from branches/FEPSimulator/FEPClient.h) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/FEPSim.h
r80 r82 1 1 /* 2 * File: FEP Client.h2 * File: FEPSim.h 3 3 * 4 * The FEP Clientis an RPC Client which transfers network data to the4 * The FEPSim is an RPC Client which transfers network data to the 5 5 * ATMS Server. 6 6 * 7 * An FEP Clientis created every 30 seconds, and an fep_reply structure7 * An FEPSim is created every 30 seconds, and an fep_reply structure 8 8 * for every FEP_LINE_LDS is transferred to the ATMS through an RPC Call. 9 * After the FEP Clienthas transferred all fep_replys, it is destroyed.9 * After the FEPSim has transferred all fep_replys, it is destroyed. 10 10 * 11 * An FEP Clientis script-like in nature. There are no public methods other than12 * the constructor. To construct an FEP Client, an input file (containing network11 * An FEPSim is script-like in nature. There are no public methods other than 12 * the constructor. To construct an FEPSim, an input file (containing network 13 13 * data in xml form) and a host server_ip (for the ATMS) are necessary. The 14 14 * format of the xml input file can be fount in "networkReader.cpp" source file. … … 19 19 20 20 // Include guard 21 #ifndef __FEP CLIENT_H_INCLUDED__22 #define __FEP CLIENT_H_INCLUDED__21 #ifndef __FEPSIM_H_INCLUDED__ 22 #define __FEPSIM_H_INCLUDED__ 23 23 24 24 // Forward declared dependencies … … 28 28 #include "fep.h" 29 29 #include <iostream> 30 #include <stdio.h> 30 31 #include <stdlib.h> 31 32 #include "time.h" 32 33 #include "NetworkReader.h" 34 #include <netdb.h> 35 #include <sys/types.h> 36 #include <sys/socket.h> 37 #include <netinet/in.h> 38 #include <unistd.h> 33 39 34 class FEPClient 40 const int BUFF_SIZE = 1000000; 41 42 class FEPSim 35 43 { 36 44 public: … … 39 47 40 48 /* methods */ 41 FEP Client(char * host, char * networkFile); // Constructor42 ~FEP Client(); // Destructor49 FEPSim(char * host, char * networkFile); // Constructor 50 ~FEPSim(); // Destructor 43 51 44 52 private: 45 53 /* members */ 46 54 NetworkReader *networkReader; 47 55 char * ATMSHost; 56 48 57 /* methods */ 49 void handleCallResponse(void *response); //50 void createClient(char *host);58 void handleCallResponse(void *response); // 59 void createClient(char *host); 51 60 void updateATMS(); // updates ATMS 52 61 53 62 }; 54 63 55 #endif // __FEP CLIENT_H_INCLUDED__64 #endif // __FEPSIM_H_INCLUDED__
Note: See TracChangeset
for help on using the changeset viewer.
