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 ZdAz;
|
---|
10 | class MsgQueue;
|
---|
11 | class Ring;
|
---|
12 | class MLog;
|
---|
13 |
|
---|
14 | class MDriveCom : public MCeCoCom
|
---|
15 | {
|
---|
16 | private:
|
---|
17 | MsgQueue *fQueue;
|
---|
18 |
|
---|
19 | bool ReadAngle(TString &str, Double_t &d);
|
---|
20 | bool ReadPosition(TString &str, Double_t &d1, Double_t &d2);
|
---|
21 |
|
---|
22 | bool InterpreteCmd(TString cmd, TString str);
|
---|
23 | void Print(TString &str, Double_t deg) const;
|
---|
24 |
|
---|
25 | bool CommandRADEC(TString &str);
|
---|
26 | bool CommandGRB(TString &str);
|
---|
27 | bool CommandZDAZ(TString &str);
|
---|
28 | bool CommandPREPS(TString &str);
|
---|
29 | bool CommandARM(TString &str);
|
---|
30 | bool CommandTPOINT(TString &str);
|
---|
31 | bool CommandSTGMD(TString &str);
|
---|
32 |
|
---|
33 | public:
|
---|
34 | enum
|
---|
35 | {
|
---|
36 | kError = 0x01,
|
---|
37 | kMoving = 0x02,
|
---|
38 | kTracking = 0x04,
|
---|
39 | kStopping = 0x08,
|
---|
40 | kStopped = 0x10,
|
---|
41 | kStandby = 0x20,
|
---|
42 | kMonitoring = 0x40
|
---|
43 | };
|
---|
44 |
|
---|
45 | MDriveCom(MsgQueue *q, const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(q) {}
|
---|
46 | MDriveCom(const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(NULL) {}
|
---|
47 |
|
---|
48 | void SetMsgQueue(MsgQueue *q) { fQueue = q; }
|
---|
49 |
|
---|
50 |
|
---|
51 | bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed);
|
---|
52 | 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);
|
---|
53 | bool SendTPoint(UInt_t stat);
|
---|
54 | bool SendStatus(const char *stat);
|
---|
55 | };
|
---|
56 |
|
---|
57 | #endif
|
---|