mainwindow.h
110 lines
| 3.1 KiB
| text/x-c
|
CLexer
/ gse_lesia / mainwindow.h
r23 | #ifndef MAINWINDOW_H | |||
#define MAINWINDOW_H | ||||
#include <QTcpServer> | ||||
#include <QTcpSocket> | ||||
#include <QXmlSimpleReader> | ||||
r28 | #include <QSettings> | |||
r39 | #include <QMainWindow> | |||
r25 | ||||
r23 | #include <lfrxmlhandler.h> | |||
#include <lfrxmlwriter.h> | ||||
#include <mainwindowui.h> | ||||
#include "tmpackettoread.h" | ||||
#include "wfpacket.h" | ||||
r24 | #include "lfrxmlparser.h" | |||
r45 | #include <spectrapacket.h> | |||
r23 | ||||
r39 | class MainWindow : public QMainWindow | |||
r23 | { | |||
Q_OBJECT | ||||
public: | ||||
MainWindow(QWidget *parent = 0); | ||||
~MainWindow(); | ||||
void displayNetworkInterfaces(); | ||||
void initSocketStatesList(); | ||||
r45 | // | |||
r23 | void preProcessPacket(TMPacketToRead *packet); | |||
r45 | unsigned char getPID(TMPacketToRead *packet); | |||
unsigned char getCAT(TMPacketToRead *packet); | ||||
unsigned char getTYPE(TMPacketToRead *packet); | ||||
unsigned char getSUBTYPE(TMPacketToRead *packet); | ||||
unsigned int getLENGTH(TMPacketToRead *packet); | ||||
unsigned int getCoarseTime(TMPacketToRead *packet); | ||||
unsigned int getFineTime(TMPacketToRead *packet); | ||||
unsigned int getSID(TMPacketToRead *packet, unsigned char pid, unsigned char cat, unsigned char typ, unsigned char sub); | ||||
// | ||||
r23 | void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |||
r46 | void buildWFAndDisplay_CWF_F3(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page); | |||
r27 | void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket); | |||
void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket); | ||||
void buildWFAndDisplaySBM2(TMPacketToRead *packet, WFPacket *wfPacket); | ||||
r45 | void buildSpectrumAndDisplayNORM_F0(TMPacketToRead *packet, SpectraPacket *spectraPacket); | |||
r23 | ||||
r28 | protected: | |||
void closeEvent(QCloseEvent *); | ||||
r23 | private: | |||
r28 | void readSettings(); | |||
void writeSettings(); | ||||
unsigned char echoBridgeIP0; | ||||
unsigned char echoBridgeIP1; | ||||
unsigned char echoBridgeIP2; | ||||
unsigned char echoBridgeIP3; | ||||
r24 | QByteArray dataArray; | |||
r23 | QList<TMPacketToRead*> generalCCSDSPacketStore; | |||
QTcpServer *analyserSGSEServerTC; | ||||
QTcpServer *analyserSGSEServerTM; | ||||
QTcpSocket *socketTC; | ||||
QTcpSocket *socketTM; | ||||
QTcpSocket *socketEchoServer; | ||||
unsigned int totalOfBytes; | ||||
r24 | unsigned int totalOfPackets; | |||
r23 | ||||
QXmlSimpleReader xmlReader; | ||||
QXmlInputSource *sourceTC; | ||||
LFRXmlHandler *xmlHandler; | ||||
r24 | LFRXmlParser *lfrXmlParser; | |||
r23 | ||||
QList<QString> socketStates; | ||||
char *buffer; | ||||
MainWindowUI *UI; | ||||
LFRXmlWriter *lfrXmlWriter; | ||||
WFPacket wfPacketNormal[4]; | ||||
r27 | WFPacket wfPacketBurst; | |||
WFPacket wfPacketSBM1; | ||||
WFPacket wfPacketSBM2; | ||||
r45 | SpectraPacket *spectraPacketNormalSpectrumF0; | |||
r23 | ||||
r24 | bool parsingContinue; | |||
r23 | signals: | |||
void socketTMHasChanged(QTcpSocket *socket); | ||||
public slots: | ||||
void displayOnConsole(QString message); | ||||
void listenOnTCTMPorts(); | ||||
void testTCTMPorts(); | ||||
void newConnectionOnTCServer(); | ||||
void newConnectionOnTMServer(); | ||||
void readDataOnTCPort(); | ||||
void readDataOnTMPort(); | ||||
void readDataOnSocketEchoServer(); | ||||
void openEchoServer(); | ||||
void socket_TMEcho_ServerHasChanged(); | ||||
r24 | void processIncomingPacket(TMPacketToRead *packet); | |||
void resetStatistics(); | ||||
r27 | void processPacketStore(); | |||
r23 | }; | |||
#endif // MAINWINDOW_H | ||||