Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef TITANPROCESS_H
00028 #define TITANPROCESS_H
00029
00030 #include <QObject>
00031 #include <QDateTime>
00032 #include <QLinkedList>
00033 #include <QDir>
00034
00035 #include <GeopsyCore.h>
00036 #include "KephrenFtpWatcher.h"
00037
00038 class TitanProcess : public QObject
00039 {
00040 Q_OBJECT
00041 public:
00042 TitanProcess(QObject * parent=0);
00043 ~TitanProcess();
00044
00045 void setInitialWatchDelay(int secs) {_fsWatcher.setInitialWatchDelay(secs);}
00046 void setSignalDuration(double d) {_signalDuration=d;}
00047 void setTimeReference(const QDateTime& t) {_timeReference=t;}
00048 void setStationName(const QString& name) {_stationName=name;}
00049 bool setSourcePath(const QString& path);
00050 public slots:
00051 void fileCreated(const QString& path);
00052 private:
00053 bool extractTime(const QString& path);
00054 bool loadTitan();
00055 void send();
00056 void send(const Signal * sig);
00057 void setSendLedStatus();
00058
00059 QDir _workDir;
00060 KephrenFtpWatcher _fsWatcher;
00061 QDateTime _lastTime;
00062 struct File {
00063 QDateTime time;
00064 QString path;
00065 };
00066 QLinkedList<File> _files;
00067 QStringList _fltFilter, _binFilter, _binInfoFilter;
00068 AsciiSignalFormat _titanAsciiFormat;
00069 QDateTime _timeReference;
00070 QMap<int,QString> _channels;
00071 QString _stationName;
00072 double _signalDuration;
00073 QTimer _sendLedTimer;
00074 QTime _sendLedChrono;
00075 };
00076
00077 #endif // TITANPROCESS_H