source: BAORadio/libindi/v1.0.1/BAOControl/baocontrol.h @ 614

Last change on this file since 614 was 502, checked in by frichard, 14 years ago

-BAOControl : petite interface permettant de contrôler les antennes via le pilote indi_BAO
-Le pilote indi_BAO utilise désormais indilib v 0.7

File size: 1.8 KB
Line 
1#include <iostream>
2#include <string.h>
3#include <sstream>
4#include "ClientSocket.h"
5#include "SocketException.h"
6#include <stdio.h>
7#include <pthread.h>
8#include <X11/Xlib.h>
9#include "filetools.h"
10#include "astro.h"
11#include "math.h"
12#include <time.h>
13#include <unistd.h>
14#include <sys/time.h>
15
16
17#define red "\033[0;31m"
18#define blue "\033[0;34m"
19#define green "\033[0;32m"
20#define black "\033[0;30m"
21
22#define MAXLOG 1000
23#define MAXOBJETS 100
24#define MAXANTENNES 100
25
26#define larg 600
27#define haut 10+30*12
28
29using namespace std;
30
31
32struct DefAntenne
33{
34    unsigned char ip;
35
36    char ok;
37};
38
39struct DefObjets
40{
41    double JJ;
42    double Duree;
43    char ad[10];
44    char de[10];
45    bool exec;
46};
47
48
49char Latitude[80];
50char Longitude[80];
51char Serveur[80];
52
53std::string logs[MAXLOG];
54
55std::stringstream os;
56
57int Port=0;
58int delaitransit=0;
59int delaitracking=0;
60int lognum=0;
61int numAntenne=0;
62int numobjets=0;
63int runnum=1;
64
65struct DefAntenne Antennes[MAXANTENNES];
66struct DefObjets objets[MAXOBJETS];
67
68bool NoExit=true;
69bool Transit=false;
70bool run=false;
71bool exitrun=false;
72
73ClientSocket *client_socket;
74Astro *astro;
75
76Display * d;
77Window w;
78Pixmap db;
79GC noir, vert, rouge, gris;
80
81
82void initialiserFenetre();
83void Dessiner();
84void rouler(char* reponse);
85void LireReponse();
86void *my_thread_process (void * arg);
87bool Decomposition(std::string chaine, char type, float *a1, float *a2, float *a3);
88bool DecompositionCommande(std::string chaine, std::string commande, std::string *chaine1, std::string *chaine2);
89bool EncoyerCoordGeographiques();
90bool Connect(bool connect);
91bool Park();
92bool Abort();
93bool Goto(std::string ar, std::string dec, bool Transit);
94bool LectureFichierMouvements(char * fileName);
95bool Run(std::string fichier);
96void DecodageFonction(std::string chaine);
97bool ChargementParametres(); 
Note: See TracBrowser for help on using the repository browser.