#include #include #include #include "ClientSocket.h" #include "SocketException.h" #include #include #include #include "filetools.h" #include "astro.h" #include "math.h" #include #include #include #define red "\033[0;31m" #define blue "\033[0;34m" #define green "\033[0;32m" #define black "\033[0;30m" #define MAXLOG 1000 #define MAXOBJETS 100 #define MAXANTENNES 100 #define larg 600 #define haut 10+30*12 using namespace std; struct DefAntenne { unsigned char ip; char ok; }; struct DefObjets { double JJ; double Duree; char ad[10]; char de[10]; bool exec; }; char Latitude[80]; char Longitude[80]; char Serveur[80]; std::string logs[MAXLOG]; std::stringstream os; int Port=0; int delaitransit=0; int delaitracking=0; int lognum=0; int numAntenne=0; int numobjets=0; int runnum=1; struct DefAntenne Antennes[MAXANTENNES]; struct DefObjets objets[MAXOBJETS]; bool NoExit=true; bool Transit=false; bool run=false; bool exitrun=false; ClientSocket *client_socket; Astro *astro; Display * d; Window w; Pixmap db; GC noir, vert, rouge, gris; void initialiserFenetre(); void Dessiner(); void rouler(char* reponse); void LireReponse(); void *my_thread_process (void * arg); bool Decomposition(std::string chaine, char type, float *a1, float *a2, float *a3); bool DecompositionCommande(std::string chaine, std::string commande, std::string *chaine1, std::string *chaine2); bool EncoyerCoordGeographiques(); bool Connect(bool connect); bool Park(); bool Abort(); bool Goto(std::string ar, std::string dec, bool Transit); bool LectureFichierMouvements(char * fileName); bool Run(std::string fichier); void DecodageFonction(std::string chaine); bool ChargementParametres();