source: BAORadio/libindi/v1.0.1/BAOTest/baocontrol.h @ 558

Last change on this file since 558 was 501, 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 libindi v 0.7

File size: 1.7 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
26using namespace std;
27
28
29struct DefAntenne
30{
31    unsigned char ip;
32
33    char ok;
34};
35
36struct DefObjets
37{
38    double JJ;
39    double Duree;
40    char ad[10];
41    char de[10];
42    bool exec;
43};
44
45
46char Latitude[80];
47char Longitude[80];
48char Serveur[80];
49
50std::string logs[MAXLOG];
51
52std::stringstream os;
53
54int Port=0;
55int delaitransit=0;
56int delaitracking=0;
57int lognum=0;
58int numAntenne=0;
59int numobjets=0;
60int runnum=1;
61
62struct DefAntenne Antennes[MAXANTENNES];
63struct DefObjets objets[MAXOBJETS];
64
65bool NoExit=true;
66bool Transit=false;
67bool run=false;
68bool exitrun=false;
69
70ClientSocket *client_socket;
71Astro *astro;
72
73Display * d;
74Window w;
75GC noir, vert, rouge, gris;
76
77
78void initialiserFenetre();
79void Dessiner();
80void rouler(char* reponse);
81void LireReponse();
82void *my_thread_process (void * arg);
83bool Decomposition(std::string chaine, char type, float *a1, float *a2, float *a3);
84bool DecompositionCommande(std::string chaine, std::string commande, std::string *chaine1, std::string *chaine2);
85bool EncoyerCoordGeographiques();
86bool Connect(bool connect);
87bool Park();
88bool Abort();
89bool Goto(std::string ar, std::string dec, bool Transit);
90bool LectureFichierMouvements(char * fileName);
91bool Run(std::string fichier);
92void DecodageFonction(std::string chaine);
93bool ChargementParametres(); 
Note: See TracBrowser for help on using the repository browser.