| 1 | #ifndef MGCOSY_H
|
|---|
| 2 | #define MGCOSY_H
|
|---|
| 3 |
|
|---|
| 4 | #ifndef ROOT_TGFrame
|
|---|
| 5 | #include <TGFrame.h>
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef MARS_MObservatory
|
|---|
| 9 | #include "MObservatory.h"
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 | #ifndef COSY_MStarList
|
|---|
| 13 | #include "MStarList.h"
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | class TIterator;
|
|---|
| 17 |
|
|---|
| 18 | class TGTab;
|
|---|
| 19 | class TGLabel;
|
|---|
| 20 | class TGTextView;
|
|---|
| 21 | class TGPopupMenu;
|
|---|
| 22 | class TGLayoutHints;
|
|---|
| 23 | class TGCompositeFrame;
|
|---|
| 24 | class TGHorizontal3DLine;
|
|---|
| 25 |
|
|---|
| 26 | class ZdAz;
|
|---|
| 27 | class RaDec;
|
|---|
| 28 | class MsgQueue;
|
|---|
| 29 | class MCeCoCom;
|
|---|
| 30 |
|
|---|
| 31 | class MGList;
|
|---|
| 32 | class MGImage;
|
|---|
| 33 | class MGAccuracy;
|
|---|
| 34 | class MGAccuracyTime;
|
|---|
| 35 | class MGVelocity;
|
|---|
| 36 | class MGCoordinates;
|
|---|
| 37 | class MGSkyPosition;
|
|---|
| 38 |
|
|---|
| 39 | class MGCosy : public TGMainFrame
|
|---|
| 40 | {
|
|---|
| 41 | private:
|
|---|
| 42 | const MObservatory::LocationName_t fObservatory;
|
|---|
| 43 |
|
|---|
| 44 | //
|
|---|
| 45 | // Create a main frame with a number of different buttons.
|
|---|
| 46 | //
|
|---|
| 47 | MGList *fList;
|
|---|
| 48 |
|
|---|
| 49 | TGLabel *fLabel1;
|
|---|
| 50 | TGLabel *fLabel2;
|
|---|
| 51 | // TGLabel *fLabel3;
|
|---|
| 52 |
|
|---|
| 53 | // TGLabel *fOffsetZd;
|
|---|
| 54 | // TGLabel *fOffsetAz;
|
|---|
| 55 |
|
|---|
| 56 | TGLabel *fRaEst;
|
|---|
| 57 | TGLabel *fDecEst;
|
|---|
| 58 |
|
|---|
| 59 | TGLabel *fRaSoll;
|
|---|
| 60 | TGLabel *fDecSoll;
|
|---|
| 61 |
|
|---|
| 62 | TGLabel *fZdSoll;
|
|---|
| 63 | TGLabel *fAzSoll;
|
|---|
| 64 |
|
|---|
| 65 | TGLabel *fMsgZd;
|
|---|
| 66 | TGLabel *fMsgAz;
|
|---|
| 67 |
|
|---|
| 68 | TGLabel *fUtc;
|
|---|
| 69 | TGLabel *fMjd;
|
|---|
| 70 |
|
|---|
| 71 | TGLabel *fWeather;
|
|---|
| 72 |
|
|---|
| 73 | MStarList fPreDefList;
|
|---|
| 74 | MStarList fStarList;
|
|---|
| 75 |
|
|---|
| 76 | MGCoordinates *fCZdAz;
|
|---|
| 77 | MGCoordinates *fCRaDec;
|
|---|
| 78 | MGCoordinates *fCCalib;
|
|---|
| 79 |
|
|---|
| 80 | MGSkyPosition *fSkyPosition;
|
|---|
| 81 | MGAccuracy *fAccuracy;
|
|---|
| 82 | MGVelocity *fVelocity;
|
|---|
| 83 | MGVelocity *fOffset;
|
|---|
| 84 |
|
|---|
| 85 | MGImage *fImage;
|
|---|
| 86 |
|
|---|
| 87 | MsgQueue *fQueue;
|
|---|
| 88 |
|
|---|
| 89 | TGTab *fTab;
|
|---|
| 90 |
|
|---|
| 91 | TGLabel *fArmed;
|
|---|
| 92 | TGLabel *fError;
|
|---|
| 93 | TGLabel *fMoving;
|
|---|
| 94 | TGLabel *fTracking;
|
|---|
| 95 | TGLabel *fStopping;
|
|---|
| 96 | TGLabel *fStopped;
|
|---|
| 97 | //TGLabel *fAvailDkc1;
|
|---|
| 98 | //TGLabel *fAvailDkc2;
|
|---|
| 99 | TGLabel *fAvailTcp;
|
|---|
| 100 |
|
|---|
| 101 | TGLabel *fDkcReady1;
|
|---|
| 102 | TGLabel *fDkcReady2;
|
|---|
| 103 | TGLabel *fDkcEmergency;
|
|---|
| 104 | TGLabel *fDkcPcMode;
|
|---|
| 105 | TGLabel *fDkcRF1;
|
|---|
| 106 | TGLabel *fDkcRF2;
|
|---|
| 107 | TGLabel *fDkcBrake;
|
|---|
| 108 | TGLabel *fDkcPower;
|
|---|
| 109 |
|
|---|
| 110 | TGTextView *fLog;
|
|---|
| 111 |
|
|---|
| 112 | FontStruct_t fFont;
|
|---|
| 113 |
|
|---|
| 114 | void CreateMenu();
|
|---|
| 115 | void CreateLabel(TGCompositeFrame *f);
|
|---|
| 116 | void CreateTabs(const char *prepos);
|
|---|
| 117 | void CreatePredefinedPos(TGCompositeFrame *tf1, const char *prepos);
|
|---|
| 118 | void CreateStarList(TGCompositeFrame *tf1);
|
|---|
| 119 |
|
|---|
| 120 | void StartPos();
|
|---|
| 121 | void StartTrack(bool track);
|
|---|
| 122 | void StartTrackPos(Long_t mp1=0);
|
|---|
| 123 | void StartDemo();
|
|---|
| 124 | //void StartCalib();
|
|---|
| 125 | void StartTPoint();
|
|---|
| 126 |
|
|---|
| 127 | void EnableLabel(TGLabel *label, Bool_t stat);
|
|---|
| 128 | void SetLabelColor(TGLabel *label, Bool_t col);
|
|---|
| 129 | //void UpdateOffset(ZdAz &off);
|
|---|
| 130 | void UpdateZdAz(ZdAz &off);
|
|---|
| 131 | void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
|
|---|
| 132 | double UpdateTime();
|
|---|
| 133 |
|
|---|
| 134 | public:
|
|---|
| 135 | MGCosy(MObservatory::LocationName_t key, const char *prepos, MsgQueue *q);
|
|---|
| 136 | ~MGCosy();
|
|---|
| 137 |
|
|---|
| 138 | void CloseWindow();
|
|---|
| 139 |
|
|---|
| 140 | TGLabel *GetLabel1() const { return fLabel1; }
|
|---|
| 141 | TGLabel *GetLabel2() const { return fLabel2; }
|
|---|
| 142 | //TGLabel *GetLabel3() const { return fLabel3; }
|
|---|
| 143 |
|
|---|
| 144 | TGTextView *GetLog() const { return fLog; }
|
|---|
| 145 | MGImage *GetImage() { return fImage; }
|
|---|
| 146 |
|
|---|
| 147 | void Update(ZdAz pos, ZdAz acc, /*ZdAz vel, ZdAz off,*/ RaDec radec, ZdAz soll, UInt_t stat, UInt_t pdo3, UInt_t stat2, Bool_t armed, const TString &statzd, const TString &stataz);
|
|---|
| 148 | void UpdateWeather(const MCeCoCom &com);
|
|---|
| 149 |
|
|---|
| 150 | Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
|
|---|
| 151 |
|
|---|
| 152 | ClassDef(MGCosy, 0)
|
|---|
| 153 | };
|
|---|
| 154 |
|
|---|
| 155 | #endif
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|