1 | #ifndef COSY_MDriveCom
|
---|
2 | #define COSY_MDriveCom
|
---|
3 |
|
---|
4 | #ifndef COSY_MCeCoCom
|
---|
5 | #include "MCeCoCom.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class RaDec;
|
---|
9 | class AltAz;
|
---|
10 | class ZdAz;
|
---|
11 | class MsgQueue;
|
---|
12 | class Ring;
|
---|
13 | class Led;
|
---|
14 | class MLog;
|
---|
15 | class MTime;
|
---|
16 | class TVector2;
|
---|
17 |
|
---|
18 | class MDriveCom : public MCeCoCom
|
---|
19 | {
|
---|
20 | private:
|
---|
21 | MsgQueue *fQueue;
|
---|
22 |
|
---|
23 | bool ReadAngle(TString &str, Double_t &d);
|
---|
24 | bool ReadPosition(TString &str, Double_t &d1, Double_t &d2);
|
---|
25 |
|
---|
26 | bool InterpreteCmd(TString cmd, TString str);
|
---|
27 | void Print(TString &str, Double_t deg) const;
|
---|
28 |
|
---|
29 | bool CommandRADEC(TString &str);
|
---|
30 | bool CommandGRB(TString &str);
|
---|
31 | bool CommandZDAZ(TString &str);
|
---|
32 | bool CommandCELEST(TString &str);
|
---|
33 | bool CommandMOON(TString &str);
|
---|
34 | bool CommandPREPS(TString &str);
|
---|
35 | bool CommandARM(TString &str);
|
---|
36 | bool CommandTPOINT(TString &str);
|
---|
37 | bool CommandSTGMD(TString &str);
|
---|
38 | bool CommandLEDS(TString &str);
|
---|
39 |
|
---|
40 | public:
|
---|
41 | enum
|
---|
42 | {
|
---|
43 | kError = 0x01,
|
---|
44 | kMoving = 0x02,
|
---|
45 | kTracking = 0x04,
|
---|
46 | kStopping = 0x08,
|
---|
47 | kStopped = 0x10,
|
---|
48 | kStandby = 0x20,
|
---|
49 | kMonitoring = 0x40
|
---|
50 | };
|
---|
51 |
|
---|
52 | MDriveCom(MsgQueue *q, const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(q) {}
|
---|
53 | MDriveCom(const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(NULL) {}
|
---|
54 |
|
---|
55 | void SetMsgQueue(MsgQueue *q) { fQueue = q; }
|
---|
56 |
|
---|
57 |
|
---|
58 | bool SendReport(UInt_t stat, Double_t mjd, RaDec rd, double ha, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd, UInt_t pdo3);
|
---|
59 | bool SendStargReport(UInt_t stat, ZdAz miss, ZdAz nompos, Ring center, Int_t num, Int_t n, Double_t bright, Double_t mjd, Int_t numleds, Int_t numrings);
|
---|
60 | bool SendTPoint(bool stat, char type, Float_t mag, const char *name, const AltAz &za0, const ZdAz &za1,
|
---|
61 | const TVector2 &xy, Float_t dzd, Float_t daz, const MTime &t,
|
---|
62 | const Ring ¢er, const Led &star, Int_t numleds, Int_t numrings,
|
---|
63 | Int_t numstars=0, Int_t numcor=0, Float_t bright=0);
|
---|
64 |
|
---|
65 | bool SendStatus(const char *stat);
|
---|
66 | };
|
---|
67 |
|
---|
68 | #endif
|
---|