source: trunk/MagicSoft/Cosy/tcpip/MDriveCom.h@ 9472

Last change on this file since 9472 was 9439, checked in by tbretz, 15 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef COSY_MDriveCom
2#define COSY_MDriveCom
3
4#ifndef COSY_MCeCoCom
5#include "MCeCoCom.h"
6#endif
7
8class RaDec;
9class AltAz;
10class ZdAz;
11class MsgQueue;
12class Ring;
13class Led;
14class MLog;
15class MTime;
16class TVector2;
17
18class MDriveCom : public MCeCoCom
19{
20private:
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 CommandPREPS(TString &str);
33 bool CommandARM(TString &str);
34 bool CommandTPOINT(TString &str);
35 bool CommandSTGMD(TString &str);
36
37public:
38 enum
39 {
40 kError = 0x01,
41 kMoving = 0x02,
42 kTracking = 0x04,
43 kStopping = 0x08,
44 kStopped = 0x10,
45 kStandby = 0x20,
46 kMonitoring = 0x40
47 };
48
49 MDriveCom(MsgQueue *q, const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(q) {}
50 MDriveCom(const char *addr, const int tx, const int rx, MLog *out=NULL) : MCeCoCom(addr, tx, rx, out), fQueue(NULL) {}
51
52 void SetMsgQueue(MsgQueue *q) { fQueue = q; }
53
54
55 bool SendReport(UInt_t stat, RaDec rd, ZdAz so, ZdAz is, ZdAz er, Bool_t armed, Int_t stargmd);
56 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);
57// bool SendTPoint(char type);
58 bool SendTPoint(bool stat, char type, Float_t mag, const char *name, const AltAz &za0, const ZdAz &za1,
59 const TVector2 &xy, Float_t dzd, Float_t daz, const MTime &t,
60 const Ring &center, const Led &star, Int_t numleds, Int_t numrings,
61 Int_t numstars=0, Int_t numcor=0, Float_t bright=0);
62 bool SendStatus(const char *stat);
63};
64
65#endif
Note: See TracBrowser for help on using the repository browser.