diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: PAULs_LPPMON_PLUGINS -# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Apr 11 13:20:26 2013 +# Generated by qmake (2.01a) (Qt 4.8.4) on: Mon Apr 22 17:27:12 2013 # Project: PAULs_LPPMON_PLUGINS.pro # Template: subdirs # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro diff --git a/PAULs_LPPMON_PLUGINS.pro.user b/PAULs_LPPMON_PLUGINS.pro.user --- a/PAULs_LPPMON_PLUGINS.pro.user +++ b/PAULs_LPPMON_PLUGINS.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/rmapplugin/Makefile b/rmapplugin/Makefile --- a/rmapplugin/Makefile +++ b/rmapplugin/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: librmapplugin.so.1.0.0 -# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Apr 11 13:20:26 2013 +# Generated by qmake (2.01a) (Qt 4.8.4) on: Mon Apr 22 17:27:12 2013 # Project: rmapplugin.pro # Template: lib # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro @@ -55,6 +55,7 @@ SOURCES = rmapplugin.cpp \ gresb.cpp \ tcpackettosend.cpp \ tmpackettoread.cpp \ + wfdisplay.cpp \ /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp moc/moc_rmappluginui.cpp \ moc/moc_rmapplugin.cpp \ moc/moc_qipdialogbox.cpp \ @@ -65,6 +66,7 @@ SOURCES = rmapplugin.cpp \ moc/moc_gresb.cpp \ moc/moc_tcpackettosend.cpp \ moc/moc_tmpackettoread.cpp \ + moc/moc_wfdisplay.cpp \ moc/moc_genericPySysdriver.cpp \ moc/moc_lppmonplugin.cpp OBJECTS = obj/rmapplugin.o \ @@ -79,6 +81,7 @@ OBJECTS = obj/rmapplugin.o \ obj/gresb.o \ obj/tcpackettosend.o \ obj/tmpackettoread.o \ + obj/wfdisplay.o \ obj/lppmonplugininterface.o \ obj/moc_rmappluginui.o \ obj/moc_rmapplugin.o \ @@ -90,6 +93,7 @@ OBJECTS = obj/rmapplugin.o \ obj/moc_gresb.o \ obj/moc_tcpackettosend.o \ obj/moc_tmpackettoread.o \ + obj/moc_wfdisplay.o \ obj/moc_genericPySysdriver.o \ obj/moc_lppmonplugin.o DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ @@ -239,7 +243,7 @@ qmake: FORCE dist: @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h ../common_PLE/qipdialogbox.h ../common_PLE/gresbstatusenquiry.h spectralmatricesdmasimulator.h rmappluginpythonwrapper.h stardundee.h ../spw_usb_driver_v2.61/inc/spw_usb_api.h ../spw_usb_driver_v2.61/inc/spw_config_library.h gresb.h tcpackettosend.h tmpackettoread.h /usr/include/lppmon/genericPySysdriver.h /usr/include/lppmon/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.cpp tmpackettoread.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp obj/rmapplugin1.0.0/ && (cd `dirname obj/rmapplugin1.0.0` && $(TAR) rmapplugin1.0.0.tar rmapplugin1.0.0 && $(COMPRESS) rmapplugin1.0.0.tar) && $(MOVE) `dirname obj/rmapplugin1.0.0`/rmapplugin1.0.0.tar.gz . && $(DEL_FILE) -r obj/rmapplugin1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmappluginui.h rmapplugin.h rmapoperations.h ccsds.h ../common_PLE/qipdialogbox.h ../common_PLE/gresbstatusenquiry.h spectralmatricesdmasimulator.h rmappluginpythonwrapper.h stardundee.h ../spw_usb_driver_v2.61/inc/spw_usb_api.h ../spw_usb_driver_v2.61/inc/spw_config_library.h gresb.h tcpackettosend.h tmpackettoread.h wfdisplay.h /usr/include/lppmon/genericPySysdriver.h /usr/include/lppmon/lppmonplugin.h obj/rmapplugin1.0.0/ && $(COPY_FILE) --parents rmapplugin.cpp rmappluginui.cpp rmapoperations.cpp ccsds.cpp ../common_PLE/qipdialogbox.cpp ../common_PLE/gresbstatusenquiry.cpp spectralmatricesdmasimulator.cpp rmappluginpythonwrapper.cpp stardundee.cpp gresb.cpp tcpackettosend.cpp tmpackettoread.cpp wfdisplay.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp obj/rmapplugin1.0.0/ && (cd `dirname obj/rmapplugin1.0.0` && $(TAR) rmapplugin1.0.0.tar rmapplugin1.0.0 && $(COMPRESS) rmapplugin1.0.0.tar) && $(MOVE) `dirname obj/rmapplugin1.0.0`/rmapplugin1.0.0.tar.gz . && $(DEL_FILE) -r obj/rmapplugin1.0.0 clean:compiler_clean @@ -261,15 +265,16 @@ mocclean: compiler_moc_header_clean comp mocables: compiler_moc_header_make_all compiler_moc_source_make_all -compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp +compiler_moc_header_make_all: moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_wfdisplay.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp compiler_moc_header_clean: - -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp + -$(DEL_FILE) moc/moc_rmappluginui.cpp moc/moc_rmapplugin.cpp moc/moc_qipdialogbox.cpp moc/moc_gresbstatusenquiry.cpp moc/moc_spectralmatricesdmasimulator.cpp moc/moc_rmappluginpythonwrapper.cpp moc/moc_stardundee.cpp moc/moc_gresb.cpp moc/moc_tcpackettosend.cpp moc/moc_tmpackettoread.cpp moc/moc_wfdisplay.cpp moc/moc_genericPySysdriver.cpp moc/moc_lppmonplugin.cpp moc/moc_rmappluginui.cpp: rmapoperations.h \ spectralmatricesdmasimulator.h \ stardundee.h \ ccsds.h \ tmpackettoread.h \ gresb.h \ + wfdisplay.h \ rmappluginui.h /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmappluginui.h -o moc/moc_rmappluginui.cpp @@ -280,6 +285,7 @@ moc/moc_rmapplugin.cpp: rmappluginui.h \ ccsds.h \ tmpackettoread.h \ gresb.h \ + wfdisplay.h \ rmapplugin.h /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) rmapplugin.h -o moc/moc_rmapplugin.cpp @@ -317,6 +323,9 @@ moc/moc_tcpackettosend.cpp: tcpackettose moc/moc_tmpackettoread.cpp: tmpackettoread.h /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) tmpackettoread.h -o moc/moc_tmpackettoread.cpp +moc/moc_wfdisplay.cpp: wfdisplay.h + /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) wfdisplay.h -o moc/moc_wfdisplay.cpp + moc/moc_genericPySysdriver.cpp: /usr/include/lppmon/genericPySysdriver.h /usr/lib64/qt4/bin/moc $(DEFINES) $(INCPATH) /usr/include/lppmon/genericPySysdriver.h -o moc/moc_genericPySysdriver.cpp @@ -350,6 +359,7 @@ obj/rmapplugin.o: rmapplugin.cpp rmapplu ccsds.h \ tmpackettoread.h \ gresb.h \ + wfdisplay.h \ rmappluginpythonwrapper.h \ tcpackettosend.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmapplugin.o rmapplugin.cpp @@ -361,7 +371,8 @@ obj/rmappluginui.o: rmappluginui.cpp rma stardundee.h \ ccsds.h \ tmpackettoread.h \ - gresb.h + gresb.h \ + wfdisplay.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/rmappluginui.o rmappluginui.cpp obj/rmapoperations.o: rmapoperations.cpp rmapoperations.h @@ -404,6 +415,9 @@ obj/tcpackettosend.o: tcpackettosend.cpp obj/tmpackettoread.o: tmpackettoread.cpp tmpackettoread.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/tmpackettoread.o tmpackettoread.cpp +obj/wfdisplay.o: wfdisplay.cpp wfdisplay.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/wfdisplay.o wfdisplay.cpp + obj/lppmonplugininterface.o: /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp /usr/include/lppmon/pluginsInterface/lppmonplugininterface.h \ /usr/include/lppmon/pluginsInterface/lppmonplugininterface_global.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/lppmonplugininterface.o /usr/include/lppmon/pluginsInterface/lppmonplugininterface.cpp @@ -438,6 +452,9 @@ obj/moc_tcpackettosend.o: moc/moc_tcpack obj/moc_tmpackettoread.o: moc/moc_tmpackettoread.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_tmpackettoread.o moc/moc_tmpackettoread.cpp +obj/moc_wfdisplay.o: moc/moc_wfdisplay.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_wfdisplay.o moc/moc_wfdisplay.cpp + obj/moc_genericPySysdriver.o: moc/moc_genericPySysdriver.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_genericPySysdriver.o moc/moc_genericPySysdriver.cpp diff --git a/rmapplugin/gresb.cpp b/rmapplugin/gresb.cpp --- a/rmapplugin/gresb.cpp +++ b/rmapplugin/gresb.cpp @@ -461,10 +461,7 @@ int gresb::receiveSPWPacketLoop(unsigned { result = receiveSPWPacket(requestID); } - if (!ccsdsPacketStore.isEmpty()) - { - emit packetStoreNotEmpty(); - } + return result; } @@ -533,10 +530,10 @@ int gresb::receiveSPWPacket(unsigned cha unsigned int gresb::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) { - TMPacketToRead *packet; + TMPacketToRead *generalPacket; - packet = new TMPacketToRead(ccsdsPacket, size); - ccsdsPacketStore.append(packet); + generalPacket = new TMPacketToRead(ccsdsPacket, size); + emit sendPacket(generalPacket); return 1; } diff --git a/rmapplugin/gresb.h b/rmapplugin/gresb.h --- a/rmapplugin/gresb.h +++ b/rmapplugin/gresb.h @@ -27,15 +27,13 @@ public: unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); - QList ccsdsPacketStore; signals: void sendMessage(QString message); + void sendPacket(TMPacketToRead*); void isOpen(bool); void RMAP_write_reply_setText(QString); void appendToLog(QString); - void ccsdsPacketAvailable(unsigned char*, unsigned int); - void packetStoreNotEmpty(); public slots: void Open(); diff --git a/rmapplugin/rmapoperations.cpp b/rmapplugin/rmapoperations.cpp --- a/rmapplugin/rmapoperations.cpp +++ b/rmapplugin/rmapoperations.cpp @@ -37,10 +37,10 @@ RMAP::RMAP(RMAP_command_codes commandCod default: break; } - RMAPHeader.targetLogicalAddress = targetLogicalAddress ; + RMAPHeader.targetLogicalAddress = targetLogicalAddress; RMAPHeader.protocolIdentifier = 0x01; // 0x01 is the protocole identifier for RMAP RMAPHeader.instruction = (packetType<<6) + (command<<2) + (replyAddressLength); - RMAPHeader.key = initiatorLogicalAddress; // used for command authorization + RMAPHeader.key = DEFAULT_DESTINATION_KEY; // used for command authorization RMAPHeader.initiatorLogicalAddress = initiatorLogicalAddress; // 0 is the default address for the GRESB module RMAPHeader.transactionIdentifier1 = 0x00; RMAPHeader.transactionIdentifier0 = 0x01; diff --git a/rmapplugin/rmapoperations.h b/rmapplugin/rmapoperations.h --- a/rmapplugin/rmapoperations.h +++ b/rmapplugin/rmapoperations.h @@ -10,6 +10,7 @@ #define RMAP_DATA_CRC_LENGTH 1 // in bytes => ECSS #define RMAP_MAX_PACKET_LENGTH RMAP_READ_REPLY_HEADER_LENGTH + RMAP_MAX_DATA_LENGTH + RMAP_DATA_CRC_LENGTH +#define DEFAULT_DESTINATION_KEY 2 #define DEFAULT_SOURCE 0 #define DEFAULT_TARGET 254 diff --git a/rmapplugin/rmapplugin.cpp b/rmapplugin/rmapplugin.cpp --- a/rmapplugin/rmapplugin.cpp +++ b/rmapplugin/rmapplugin.cpp @@ -85,39 +85,37 @@ rmapplugin::rmapplugin(QWidget *parent) connect(this->UI->spectralMatricesDMASimulator, SIGNAL(rmapplugginWrite(uint*,uint,uint)), this, SLOT(Write(uint*,uint,uint))); connect(this->UI->spectralMatricesDMASimulator, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); + //****** // GRESB connect(this->UI->gresbBridge, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); connect(this->UI->gresbBridge, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); connect(this->UI->gresbBridge, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); connect(this->UI->gresbBridge, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); - connect(this->UI->gresbBridge, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), - this, SLOT(processCCSDSPacket(unsigned char*,uint))); connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->gresbBridge, SLOT(ccsdsPacketIsProcessed())); connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->UI->gresbBridge, SLOT(targetHasChanged(int))); connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->UI->gresbBridge, SLOT(sourceHasChanged(int))); - connect(this->UI->gresbBridge, SIGNAL(packetStoreNotEmpty()), - this, SLOT(processPacketStore())); + connect(this->UI->gresbBridge, SIGNAL(sendPacket(TMPacketToRead*)), + this, SLOT(receivePacketFromBridge(TMPacketToRead*))); + //************ // Star Dundee connect(this->UI->starDundee, SIGNAL(sendMessage(QString)), this, SLOT(displayOnConsole(QString))); connect(this->UI->starDundee, SIGNAL(isOpen(bool)), this, SLOT(activatePlugin(bool))); connect(this->UI->starDundee, SIGNAL(RMAP_write_reply_setText(QString)), this, SLOT(RMAP_write_reply_setText(QString))); connect(this->UI->starDundee, SIGNAL(appendToLog(QString)), this, SLOT(appendToLog(QString))); - connect(this->UI->starDundee, SIGNAL(ccsdsPacketAvailable(unsigned char*,uint)), - this, SLOT(processCCSDSPacket(unsigned char*,uint))); connect(this, SIGNAL(ccsdsPacketIsProcessed()), this->UI->starDundee, SLOT(ccsdsPacketIsProcessed())); connect(this->UI->rmapTargetLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->UI->starDundee, SLOT(targetHasChanged(int))); connect(this->UI->rmapSourceLogicalAddressSpinBox, SIGNAL(valueChanged(int)), this->UI->starDundee, SLOT(sourceHasChanged(int))); - connect(this->UI->starDundee, SIGNAL(packetStoreNotEmpty()), - this, SLOT(processPacketStore())); + connect(this->UI->starDundee, SIGNAL(sendPacket(TMPacketToRead*)), + this, SLOT(receivePacketFromBridge(TMPacketToRead*))); connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(bridgeHasChanged(selectedBridge))); - connect(this->UI, SIGNAL(bridgeHasChanged(selectedBridge)), this, SLOT(updatePacketStore(selectedBridge))); + ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->generalCCSDSPacketStore); } rmapplugin::~rmapplugin() @@ -341,6 +339,66 @@ void rmapplugin::setValueSourceAddress(u this->UI->rmapSourceLogicalAddressSpinBox->setValue(newAddress); } +void rmapplugin::receivePacketFromBridge(TMPacketToRead *packet) +{ + preProcessPacket(packet); + this->generalCCSDSPacketStore.append(packet); + processPacketStore(); +} + +void rmapplugin::preProcessPacket(TMPacketToRead *packet) +{ + unsigned char typ = 0; + unsigned char sub = 0; + unsigned char sid = 0; + unsigned char pkt_nr = 0; + unsigned int blk_nr = 0; + unsigned int i = 0; + unsigned int j = 0; + unsigned char *data; + + typ = packet->Value[11]; // TYPE + sub = packet->Value[12]; // SUBTYPE + if ( (typ == 21) & (sub == 3) ) + { + sid = packet->Value[20]; // SID + pkt_nr = packet->Value[23]; // PKT_NR + blk_nr = packet->Value[24] * 256 + packet->Value[25]; + switch (sid){ + case SID_NORMAL_SWF_F0: + emit displayOnConsole("wf packet received, sid: " + QString::number(sid) + + ", pkt_nr: " + QString::number(pkt_nr) + + ", blk_nr: " + QString::number(blk_nr) + ); + data = &packet->Value[26]; // start of the first data block; + j = (pkt_nr-1) * 340; + for ( i=0; iUI->wfDisplay->displayOnPlot(normal_swf_f0_v, 0); + this->UI->wfDisplay->displayOnPlot(normal_swf_f0_e1, 1); + this->UI->wfDisplay->displayOnPlot(normal_swf_f0_e2, 2); + this->UI->wfDisplay->displayOnPlot(normal_swf_f0_b1, 3); + } + break; + case SID_NORMAL_SWF_F1: + break; + case SID_NORMAL_SWF_F2: + break; + case SID_NORMAL_CWF_F3: + break; + } + } +} + ///////////////////// // INTERNAL FUNCTIONS @@ -382,21 +440,6 @@ void rmapplugin::processPacketStore() ((rmappluginPythonWrapper*)this->pyObject)->processPacketStore(); } -void rmapplugin::updatePacketStore(selectedBridge bridge) -{ - switch(bridge) - { - case selectedBridgeIsGRESB : - ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->gresbBridge->ccsdsPacketStore); - break; - case selectedBridgeIsStarDundee : - ((rmappluginPythonWrapper*)this->pyObject)->ccsdsPacketStore = &(this->UI->starDundee->ccsdsPacketStore); - break; - default: - break; - } -} - int rmapplugin::fetchPacket() { int ret = 0; diff --git a/rmapplugin/rmapplugin.h b/rmapplugin/rmapplugin.h --- a/rmapplugin/rmapplugin.h +++ b/rmapplugin/rmapplugin.h @@ -34,6 +34,8 @@ #include +#include "tmpackettoread.h" + #define APPENDTOLOG(message) this->UI->appendToLogFile(QTime::currentTime().toString() +":" + QString::number(QTime::currentTime().msec()) + ": " + message) #define READ_WRITE_MAX_COUNTS 4096 // in words @@ -49,6 +51,14 @@ class rmapplugin : public lppmonplugin public: explicit rmapplugin(QWidget *parent = 0); ~rmapplugin(); + QList generalCCSDSPacketStore; + void preProcessPacket(TMPacketToRead *packet); + short normal_swf_f0_v[2048]; + short normal_swf_f0_e1[2048]; + short normal_swf_f0_e2[2048]; + short normal_swf_f0_b1[2048]; + short normal_swf_f0_b2[2048]; + short normal_swf_f0_b3[2048]; public slots: unsigned int Write(unsigned int *Value,unsigned int count,unsigned int address=0); @@ -62,6 +72,7 @@ public slots: void processPacketStore(); void updatePacketStore(selectedBridge bridge); int fetchPacket(); + void receivePacketFromBridge(TMPacketToRead* packet); // void sendCCSDS(); void send_TC_LFR_UPDATE_TIME(); diff --git a/rmapplugin/rmapplugin.pro b/rmapplugin/rmapplugin.pro --- a/rmapplugin/rmapplugin.pro +++ b/rmapplugin/rmapplugin.pro @@ -44,7 +44,8 @@ HEADERS += \ ../spw_usb_driver_v2.61/inc/spw_config_library.h \ gresb.h \ tcpackettosend.h \ - tmpackettoread.h + tmpackettoread.h \ + wfdisplay.h SOURCES += \ @@ -59,7 +60,8 @@ SOURCES += \ stardundee.cpp \ gresb.cpp \ tcpackettosend.cpp \ - tmpackettoread.cpp + tmpackettoread.cpp \ + wfdisplay.cpp diff --git a/rmapplugin/rmappluginui.cpp b/rmapplugin/rmappluginui.cpp --- a/rmapplugin/rmappluginui.cpp +++ b/rmapplugin/rmappluginui.cpp @@ -31,12 +31,13 @@ rmapPluginUI::rmapPluginUI(QWidget *pare QWidget* spwTabWidgetPage2 = new QWidget; QWidget* spwTabWidgetPage3 = new QWidget; QWidget* spwTabWidgetPage4 = new QWidget; + QWidget* spwTabWidgetPage5 = new QWidget; bridgeWidget = new QWidget; mainLayout = new QVBoxLayout; - connectionLayout = new QGridLayout; ccsdsLayout = new QVBoxLayout; consoleLayout = new QVBoxLayout; selectionLayout = new QVBoxLayout; + connectionLayout = new QGridLayout; bridgeSelection_LAYOUT = new QGridLayout; generalParameters_LAYOUT = new QGridLayout; @@ -100,6 +101,7 @@ rmapPluginUI::rmapPluginUI(QWidget *pare RMAP_write_reply = new QCheckBox(tr("reply to the write command required\nlast reply status: unavailable")); spwLinkStatusEnquiry = new gresbStatusEnquiry; logFile = new QFile(); + wfDisplay = new WFDisplay(); logFileEn = false; @@ -136,12 +138,16 @@ rmapPluginUI::rmapPluginUI(QWidget *pare selectionLayout->addWidget(gresb_GROUPBOX); selectionLayout->addWidget(stardundee_GROUPBOX); + //****** + // CCSDS ccsdsLayout->addWidget(sendCCSDSCommandButton); ccsdsLayout->addWidget(send_TC_LFR_UPDATE_TIME_Button); ccsdsLayout->addWidget(reset_TC_LFR_UPDATE_TIME_Button); ccsdsLayout->addWidget(sendCCSDSCommandLabel); ccsdsLayout->addWidget(CCSDSTargetLogicalAddressSpinBox); + //******** + // CONSOLE consoleLayout->addWidget(console); consoleLayout->addWidget(clearConsoleButton); consoleLayout->addWidget(nbPacketInStore); @@ -155,12 +161,14 @@ rmapPluginUI::rmapPluginUI(QWidget *pare spwTabWidget->addTab(spwTabWidgetPage2, tr("status")); spwTabWidget->addTab(spwTabWidgetPage3, tr("console")); spwTabWidget->addTab(spwTabWidgetPage4, tr("DMA")); + spwTabWidget->addTab(spwTabWidgetPage5, tr("waveforms")); spwTabWidgetPage0->setLayout(selectionLayout); spwTabWidgetPage1->setLayout(ccsdsLayout); spwTabWidgetPage2->setLayout(this->spwLinkStatusEnquiry->mainLayout); spwTabWidgetPage3->setLayout(consoleLayout); spwTabWidgetPage4->setLayout(spectralMatricesDMASimulator->mainLayout); + spwTabWidgetPage5->setLayout(wfDisplay->layout()); mainLayout->addWidget(spwTabWidget); setLayout(mainLayout); diff --git a/rmapplugin/rmappluginui.h b/rmapplugin/rmappluginui.h --- a/rmapplugin/rmappluginui.h +++ b/rmapplugin/rmappluginui.h @@ -45,6 +45,7 @@ #include #include #include +#include "wfdisplay.h" enum selectedBridge{ selectedBridgeIsUnknown, @@ -102,6 +103,8 @@ public: QTextEdit* console; + WFDisplay* wfDisplay; + // SPACEWIRE BRIDGES StarDundee *starDundee; gresb *gresbBridge; @@ -136,13 +139,13 @@ private: QLabel *logFileName; QGridLayout *bridgeSelection_LAYOUT; + QGridLayout *connectionLayout; + QGridLayout *gresbStatusQueryDialogLayout; + QGridLayout *generalParameters_LAYOUT; QVBoxLayout *selectionLayout; QVBoxLayout *mainLayout; - QGridLayout *connectionLayout; QVBoxLayout *ccsdsLayout; QVBoxLayout *consoleLayout; - QGridLayout *gresbStatusQueryDialogLayout; - QGridLayout *generalParameters_LAYOUT; QTabWidget *spwTabWidget; diff --git a/rmapplugin/stardundee.cpp b/rmapplugin/stardundee.cpp --- a/rmapplugin/stardundee.cpp +++ b/rmapplugin/stardundee.cpp @@ -734,10 +734,7 @@ int StarDundee::receiveSPWPacketLoop(uns { result = receiveSPWPacket(requestID); } - if (!ccsdsPacketStore.isEmpty()) - { - emit packetStoreNotEmpty(); - } + return result; } @@ -811,8 +808,6 @@ int StarDundee::receiveSPWPacket(unsigne } for(unsigned int i=0; irelease(); - //emit(ccsdsPacketAvailable(ccsdsPacket, packetLength)); emit appendToLog("CCSDS packet of size " + QString::number(packetLength) + " received"); emit appendToLog("packet received, byte0 " + QString::number(spwPacket[0], 16) + " *** byte1 " + QString::number(spwPacket[1], 16) @@ -832,10 +827,10 @@ int StarDundee::receiveSPWPacket(unsigne unsigned int StarDundee::storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size) { - TMPacketToRead *packet; + TMPacketToRead *generalPacket; - packet = new TMPacketToRead(ccsdsPacket, size); - ccsdsPacketStore.append(packet); + generalPacket = new TMPacketToRead(ccsdsPacket, size); + emit sendPacket(generalPacket); return 1; } diff --git a/rmapplugin/stardundee.h b/rmapplugin/stardundee.h --- a/rmapplugin/stardundee.h +++ b/rmapplugin/stardundee.h @@ -31,15 +31,13 @@ public: unsigned int WriteSPW(char *Value, unsigned int count, char targetLogicalAddress, char userApplication); unsigned int storeCCSDSPacket(unsigned char *ccsdsPacket, unsigned int size); - QList ccsdsPacketStore; signals: void sendMessage(QString message); + void sendPacket(TMPacketToRead*); void isOpen(bool); void RMAP_write_reply_setText(QString); void appendToLog(QString); - void ccsdsPacketAvailable(unsigned char*, unsigned int); - void packetStoreNotEmpty(); public slots: void Open();