| [350] | 1 | // toisvr.h | 
|---|
|  | 2 | // Eric Aubourg         CEA/DAPNIA/SPP   juillet 1999 | 
|---|
|  | 3 |  | 
|---|
|  | 4 |  | 
|---|
| [310] | 5 | #ifndef TOISVR_H | 
|---|
|  | 6 | #define TOISVR_H | 
|---|
|  | 7 |  | 
|---|
|  | 8 | #include "toiiter.h" | 
|---|
| [407] | 9 | #include <list> | 
|---|
| [310] | 10 |  | 
|---|
| [358] | 11 | class AuxGPS; | 
|---|
|  | 12 |  | 
|---|
| [407] | 13 | class RequestHandler { | 
|---|
| [310] | 14 | public: | 
|---|
| [407] | 15 | virtual bool processTOIReq(string line, string toiname, TOIKind toi, int index, | 
|---|
|  | 16 | bool interp, bool repet, bool flag, bool notrig)=0; | 
|---|
|  | 17 | virtual bool processOption(string keyw, string args)=0; | 
|---|
|  | 18 | }; | 
|---|
|  | 19 |  | 
|---|
|  | 20 | class TOISvr : public RequestHandler { | 
|---|
|  | 21 | public: | 
|---|
| [310] | 22 | TOISvr(); | 
|---|
|  | 23 |  | 
|---|
| [407] | 24 | void setDirectory(string); | 
|---|
|  | 25 | void addFile(string); | 
|---|
|  | 26 | void onBoardRecorderFiles(bool); | 
|---|
|  | 27 | void useAuxGPS(AuxGPS* gps); | 
|---|
| [310] | 28 |  | 
|---|
| [432] | 29 | void setMJDInterval(double tStart, double tEnd); | 
|---|
|  | 30 | void setUTCInterval(double tStart, double tEnd); | 
|---|
|  | 31 | void setSNInterval(long sStart, long sEnd); | 
|---|
| [426] | 32 | void setUnderSample(int n); | 
|---|
| [310] | 33 |  | 
|---|
| [407] | 34 | void addInfo(TOIKind kind, int index, bool triggering=true, bool interp=false); | 
|---|
|  | 35 | void addInfo(TOIKind kind, bool triggering=true, bool interp=false); | 
|---|
| [310] | 36 |  | 
|---|
| [407] | 37 | void readReq(istream& s); | 
|---|
| [310] | 38 |  | 
|---|
| [407] | 39 | TOIIter doQuery(); | 
|---|
|  | 40 |  | 
|---|
|  | 41 | bool processRequest(string line); | 
|---|
|  | 42 | void registerReqHandler(RequestHandler*); | 
|---|
|  | 43 | virtual bool processTOIReq(string line, string toiname, TOIKind toi, int index, | 
|---|
|  | 44 | bool interp, bool repet, bool flag, bool notrig); | 
|---|
|  | 45 | virtual bool processOption(string keyw, string args); | 
|---|
| [310] | 46 |  | 
|---|
| [416] | 47 | void defaultInclude(); | 
|---|
|  | 48 |  | 
|---|
| [310] | 49 | protected: | 
|---|
|  | 50 | TOIIter iter; | 
|---|
| [407] | 51 | list<RequestHandler*> handlers; | 
|---|
| [417] | 52 |  | 
|---|
|  | 53 | bool initDone; | 
|---|
| [310] | 54 | }; | 
|---|
|  | 55 |  | 
|---|
|  | 56 |  | 
|---|
|  | 57 | #endif | 
|---|