##// END OF EJS Templates
spooling frequency of the star dundee bridge changed from 100 ms to 1 ms
leroy -
r53:cd731a3327c0 default
parent child
Show More
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: PAULs_LPPMON_PLUGINS
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Sep 27 14:11:49 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Oct 21 07:16:42 2013
4 4 # Project: PAULs_LPPMON_PLUGINS.pro
5 5 # Template: subdirs
6 6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile PAULs_LPPMON_PLUGINS.pro
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-10-11T09:55:13. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-07T12:53:04. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -41,12 +41,14 void HKDisplay::setupLFRStatusWord()
41 41 hk_lfr_mode = new QLabel("hk_lfr_mode: -");
42 42 hk_lfr_dpu_spw_enabled = new QLabel("hk_lfr_dpu_spw_enabled: -");
43 43 hk_lfr_dpu_link_state = new QLabel("hk_lfr_dpu_link_state: -");
44 hk_lfr_dpu_spare = new QLabel("hk_lfr_dpu_spare: -");
44 45 sy_lfr_watchdog_enabled = new QLabel("sy_lfr_watchdog_enabled: -");
45 46 hk_lfr_calib_enabled = new QLabel("hk_lfr_calib_enabled: -");
46 47 hk_lfr_reset_cause = new QLabel("hk_lfr_reset_cause: -");
47 48 box_lfrStatusWord->addWidget(hk_lfr_mode);
48 49 box_lfrStatusWord->addWidget(hk_lfr_dpu_spw_enabled);
49 50 box_lfrStatusWord->addWidget(hk_lfr_dpu_link_state);
51 box_lfrStatusWord->addWidget(hk_lfr_dpu_spare);
50 52 box_lfrStatusWord->addWidget(sy_lfr_watchdog_enabled);
51 53 box_lfrStatusWord->addWidget(hk_lfr_calib_enabled);
52 54 box_lfrStatusWord->addWidget(hk_lfr_reset_cause);
@@ -189,12 +191,12 void HKDisplay::displayPacket(TMPacketTo
189 191 else {
190 192 housekeepingPacket = (Packet_TM_LFR_HK_t *) tmPacketToRead->Value;
191 193
192 updateLFRMode(housekeepingPacket);
193 updateSWVersion(housekeepingPacket);
194 updateTCStatistics(housekeepingPacket);
195 updateAnomalyStatistics(housekeepingPacket);
196 updateSpaceWireIFStatistics(housekeepingPacket);
197 updateErrorCountersSpaceWire(housekeepingPacket);
194 update_lfr_status_word( housekeepingPacket );
195 updateSWVersion( housekeepingPacket );
196 updateTCStatistics( housekeepingPacket );
197 updateAnomalyStatistics( housekeepingPacket );
198 updateSpaceWireIFStatistics( housekeepingPacket );
199 updateErrorCountersSpaceWire( housekeepingPacket );
198 200 }
199 201 }
200 202
@@ -210,20 +212,44 void HKDisplay::displayPacketLESIA(TMPac
210 212 else {
211 213 housekeepingPacket = (Packet_TM_LFR_HK_t *) (tmPacketToRead->Value-4);
212 214
213 updateLFRMode(housekeepingPacket);
214 updateSWVersion(housekeepingPacket);
215 updateTCStatistics(housekeepingPacket);
216 updateAnomalyStatistics(housekeepingPacket);
217 updateSpaceWireIFStatistics(housekeepingPacket);
218 updateErrorCountersSpaceWire(housekeepingPacket);
215 update_lfr_status_word( housekeepingPacket );
216 updateSWVersion( housekeepingPacket );
217 updateTCStatistics( housekeepingPacket );
218 updateAnomalyStatistics( housekeepingPacket );
219 updateSpaceWireIFStatistics( housekeepingPacket );
220 updateErrorCountersSpaceWire( housekeepingPacket );
219 221 }
220 222 }
221 223
222 void HKDisplay::updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket)
224 void HKDisplay::update_lfr_status_word(Packet_TM_LFR_HK_t *housekeepingPacket)
223 225 {
224 226 hk_lfr_mode->setText("hk_lfr_mode: "
225 +QString::number( ( (housekeepingPacket->lfr_status_word[0] & 0x70) >> 4 ) )
226 );
227 +QString::number( ( (housekeepingPacket->lfr_status_word[0] & 0xf0) >> 4 ) )
228 );
229
230 hk_lfr_dpu_spw_enabled->setText("hk_lfr_dpu_spw_enabled: "
231 +QString::number( ( (housekeepingPacket->lfr_status_word[0] & 0x08) >> 3 ) )
232 );
233
234 hk_lfr_dpu_link_state->setText("hk_lfr_dpu_link_state: "
235 +QString::number( ( (housekeepingPacket->lfr_status_word[0] & 0x07) >> 0 ) )
236 );
237
238 hk_lfr_dpu_spare->setText("hk_lfr_dpu_spare: "
239 +QString::number( ( (housekeepingPacket->lfr_status_word[1] & 0xe0) >> 5 ) )
240 );
241
242 sy_lfr_watchdog_enabled->setText("sy_lfr_watchdog_enabled: "
243 +QString::number( ( (housekeepingPacket->lfr_status_word[1] & 0x10) >> 4 ) )
244 );
245
246 hk_lfr_calib_enabled->setText("hk_lfr_calib_enabled: "
247 +QString::number( ( (housekeepingPacket->lfr_status_word[1] & 0x08) >> 3 ) )
248 );
249
250 hk_lfr_reset_cause->setText(" hk_lfr_reset_cause: "
251 +QString::number( ( (housekeepingPacket->lfr_status_word[1] & 0x07) >> 0 ) )
252 );
227 253
228 254 }
229 255
@@ -27,7 +27,7 public:
27 27 void setupSpaceWireIFStatistics();
28 28 void setupErrorCountersSpaceWire();
29 29
30 void updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket);
30 void update_lfr_status_word(Packet_TM_LFR_HK_t *housekeepingPacket);
31 31 void updateSWVersion(Packet_TM_LFR_HK_t *housekeepingPacket);
32 32 void updateTCStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
33 33 void updateAnomalyStatistics(Packet_TM_LFR_HK_t *housekeepingPacket);
@@ -70,6 +70,7 private:
70 70 QLabel *hk_lfr_mode;
71 71 QLabel *hk_lfr_dpu_spw_enabled;
72 72 QLabel *hk_lfr_dpu_link_state;
73 QLabel *hk_lfr_dpu_spare;
73 74 QLabel *sy_lfr_watchdog_enabled;
74 75 QLabel *hk_lfr_calib_enabled;
75 76 QLabel *hk_lfr_reset_cause;
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.0, 2013-10-11T14:18:06. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-07T12:35:53. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
1 NO CONTENT: modified file, binary diff hidden
@@ -1,9 +1,9
1 1 #############################################################################
2 2 # Makefile for building: librmapplugin.so.1.0.0
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Sep 20 14:37:48 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Oct 14 07:55:31 2013
4 4 # Project: rmapplugin.pro
5 5 # Template: lib
6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
6 # Command: /usr/bin/qmake-qt4 -o Makefile rmapplugin.pro
7 7 #############################################################################
8 8
9 9 ####### Compiler, tools and options
@@ -223,7 +223,7 Makefile: rmapplugin.pro /usr/lib64/qt4
223 223 /usr/lib64/libQtCore.prl \
224 224 /usr/lib64/libQtGui.prl \
225 225 /usr/lib64/libQtNetwork.prl
226 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
226 $(QMAKE) -o Makefile rmapplugin.pro
227 227 /usr/lib64/qt4/mkspecs/common/unix.conf:
228 228 /usr/lib64/qt4/mkspecs/common/linux.conf:
229 229 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
@@ -257,7 +257,7 Makefile: rmapplugin.pro /usr/lib64/qt4
257 257 /usr/lib64/libQtGui.prl:
258 258 /usr/lib64/libQtNetwork.prl:
259 259 qmake: FORCE
260 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile rmapplugin.pro
260 @$(QMAKE) -o Makefile rmapplugin.pro
261 261
262 262 dist:
263 263 @$(CHK_DIR_EXISTS) obj/rmapplugin1.0.0 || $(MKDIR) obj/rmapplugin1.0.0
@@ -87,7 +87,7 void EnterMode::sendEnterMode( unsigned
87 87 packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19;
88 88 packet.serviceType = TC_TYPE_DEFAULT;
89 89 packet.serviceSubType = TC_SUBTYPE_ENTER_MODE;
90 packet.sourceID = SID_DEFAULT;
90 packet.sourceID = SID_TC_DEFAULT;
91 91 packet.spare = 0x00;
92 92 packet.mode = mode;
93 93 packet.enterModeTime[0] = 0x00;
@@ -146,7 +146,7 void EnterMode::sendReset()
146 146 packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19;
147 147 packet.serviceType = TC_TYPE_DEFAULT;
148 148 packet.serviceSubType = TC_SUBTYPE_RESET;
149 packet.sourceID = SID_DEFAULT;
149 packet.sourceID = SID_TC_DEFAULT;
150 150
151 151 parameterDump->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes,
152 152 PACKET_LENGTH_TC_LFR_RESET + CCSDS_TC_TM_PACKET_OFFSET - 2);
@@ -172,7 +172,7 void EnterMode::sendUpdateInfo()
172 172 packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19;
173 173 packet.serviceType = TC_TYPE_DEFAULT;
174 174 packet.serviceSubType = TC_SUBTYPE_UPDATE_INFO;
175 packet.sourceID = SID_DEFAULT;
175 packet.sourceID = SID_TC_DEFAULT;
176 176
177 177 packet.set1 = 0x00;
178 178 packet.set2 = 0x00;
@@ -229,7 +229,7 void EnterMode::sendEnableCalibration()
229 229 packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19;
230 230 packet.serviceType = TC_TYPE_DEFAULT;
231 231 packet.serviceSubType = TC_SUBTYPE_ENABLE_CALIBRATION;
232 packet.sourceID = SID_DEFAULT;
232 packet.sourceID = SID_TC_DEFAULT;
233 233
234 234 parameterDump->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes,
235 235 PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION + CCSDS_TC_TM_PACKET_OFFSET - 2);
@@ -255,7 +255,7 void EnterMode::sendDisableCalibration()
255 255 packet.ccsdsSecHeaderFlag_pusVersion_ack = 0x19;
256 256 packet.serviceType = TC_TYPE_DEFAULT;
257 257 packet.serviceSubType = TC_SUBTYPE_DISABLE_CALIBRATION;
258 packet.sourceID = SID_DEFAULT;
258 packet.sourceID = SID_TC_DEFAULT;
259 259
260 260 parameterDump->GetCRCAsTwoBytes((unsigned char*) &packet, crcAsTwoBytes,
261 261 PACKET_LENGTH_TC_LFR_DISABLE_CALIBRATION + CCSDS_TC_TM_PACKET_OFFSET - 2);
@@ -150,7 +150,7 void StarDundee::Open()
150 150 if (getLinkStatus(linkNumber_SPINBOX->value()))
151 151 {
152 152 emit isOpen(true);
153 timer->start(100); // starts the periodical timer, period = 100ms
153 timer->start(1); // starts the periodical timer, period = 100ms
154 154 }
155 155 else
156 156 {
@@ -243,6 +243,7 unsigned int StarDundee::Write(unsigned
243 243 data = (char*) malloc(READ_WRITE_MAX_COUNTS*4);
244 244
245 245 emit appendToLog(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
246 emit sendMessage(QString("*** START *** WRITE ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
246 247
247 248 while (remainingCount > READ_WRITE_MAX_COUNTS)
248 249 {
@@ -289,6 +290,7 unsigned int StarDundee::Write(unsigned
289 290 }
290 291
291 292 emit appendToLog(QString("*** STOP *** WRITE"));
293 emit sendMessage(QString("*** STOP *** WRITE"));
292 294 free(data);
293 295 return count;
294 296 }
@@ -304,7 +306,9 unsigned int StarDundee::Read(unsigned i
304 306 emit appendToLog("WARNING === in function READ of rmapplugin *** RMAP request already running, READ access stopped");
305 307 return 1;
306 308 }
309
307 310 emit appendToLog(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
311 emit sendMessage(QString("*** START *** READ ")+ QString::number(count) + QString(" word(s) @0x")+ QString::number(address,16));
308 312
309 313 while (remainingCount > READ_WRITE_MAX_COUNTS)
310 314 {
@@ -356,6 +360,7 unsigned int StarDundee::Read(unsigned i
356 360 }
357 361
358 362 emit appendToLog(QString("*** STOP *** READ "));
363 emit sendMessage(QString("*** STOP *** READ "));
359 364 return count;
360 365 }
361 366
@@ -412,7 +417,7 unsigned int StarDundee::WriteBLOCK(char
412 417 free(data);
413 418 return 1;
414 419 }
415 else emit sendMessage("OK *** WriteStarDundee when sending packet of size " + QString::number(totalSize));
420 // else emit sendMessage("OK *** WriteStarDundee when sending packet of size " + QString::number(totalSize));
416 421
417 422 //**************
418 423 // Free the send
@@ -554,14 +559,14 unsigned int StarDundee::ReadBLOCK(unsig
554 559 if (result != TRANSFER_SUCCESS) emit sendMessage("ERR *** ReadStarDundee *** ReadBLOCK *** sending the READ command ");
555 560 else
556 561 {
557 emit sendMessage("OK *** ReadStarDundee *** ReadBLOCK *** sending the READ command");
558 emit appendToLog("packet sent, B0 = " + QString::number(packet[0], 16)
559 + " *** B1 = " + QString::number(packet[1], 16)
560 + " *** B2 = " + QString::number(packet[2], 16)
561 + " *** B3 = " + QString::number(packet[3], 16)
562 + " *** B4 = " + QString::number(packet[4], 16)
563 + " *** B5 = " + QString::number(packet[5], 16)
564 );
562 // emit sendMessage("OK *** ReadStarDundee *** ReadBLOCK *** sending the READ command");
563 // emit appendToLog("packet sent, B0 = " + QString::number(packet[0], 16)
564 // + " *** B1 = " + QString::number(packet[1], 16)
565 // + " *** B2 = " + QString::number(packet[2], 16)
566 // + " *** B3 = " + QString::number(packet[3], 16)
567 // + " *** B4 = " + QString::number(packet[4], 16)
568 // + " *** B5 = " + QString::number(packet[5], 16)
569 // );
565 570 }
566 571
567 572 //**************
@@ -771,10 +776,10 int StarDundee::receiveSPWPacket(unsigne
771 776 {
772 777 emit appendToLog("No end of packet marker received");
773 778 }
774 else if (properties.eop == SPACEWIRE_USB_EOP)
775 {
776 emit appendToLog("Normal end of packet marker received");
777 }
779 // else if (properties.eop == SPACEWIRE_USB_EOP)
780 // {
781 // emit appendToLog("Normal end of packet marker received");
782 // }
778 783 else if (properties.eop == SPACEWIRE_USB_EEP)
779 784 {
780 785 emit appendToLog("Error end of packet marker received");
@@ -790,14 +795,14 int StarDundee::receiveSPWPacket(unsigne
790 795 for(unsigned int i=0; i<packetLength; i++) rmapPacket[i] = spwPacket[i];
791 796 rmapPacketSize = packetLength;
792 797 rmapPacketSEMAPHORE->release();
793 emit appendToLog("RMAP packet of size " + QString::number(packetLength) + " received");
794 emit appendToLog("packet received, B0 = " + QString::number(spwPacket[0], 16)
795 + " *** B1 = " + QString::number(spwPacket[1], 16)
796 + " *** B2 = " + QString::number(spwPacket[2], 16)
797 + " *** B3 = " + QString::number(spwPacket[3], 16)
798 + " *** B4 = " + QString::number(spwPacket[4], 16)
799 + " *** B5 = " + QString::number(spwPacket[5], 16)
800 );
798 // emit appendToLog("RMAP packet of size " + QString::number(packetLength) + " received");
799 // emit appendToLog("packet received, B0 = " + QString::number(spwPacket[0], 16)
800 // + " *** B1 = " + QString::number(spwPacket[1], 16)
801 // + " *** B2 = " + QString::number(spwPacket[2], 16)
802 // + " *** B3 = " + QString::number(spwPacket[3], 16)
803 // + " *** B4 = " + QString::number(spwPacket[4], 16)
804 // + " *** B5 = " + QString::number(spwPacket[5], 16)
805 // );
801 806 return packetLength;
802 807
803 808 case 2: // 0x02 is the protocole identifier for CCSDS packets
@@ -438,27 +438,27 void TMStatistics::updateStatistics(unsi
438 438 }
439 439 else if (sub == TM_SUBTYPE_EXE_NOK)
440 440 {
441 if (sid == SID_EXE_INC)
441 if (sid == WRONG_APP_DATA)
442 442 {
443 443 INCO_nb = INCO_nb + 1;
444 444 label_INCO_nb->setText(QString::number(INCO_nb));
445 445 }
446 else if (sid == SID_NOT_EXE)
446 else if (sid == TC_NOT_EXE)
447 447 {
448 448 NOTE_nb = NOTE_nb + 1;
449 449 label_NOTE_nb->setText(QString::number(NOTE_nb));
450 450 }
451 else if (sid == SID_NOT_IMP)
451 else if (sid == FUNCT_NOT_IMPL)
452 452 {
453 453 NOTI_nb = NOTI_nb + 1;
454 454 label_NOTI_nb->setText(QString::number(NOTI_nb));
455 455 }
456 else if (sid == SID_EXE_ERR)
456 else if (sid == FAIL_DETECTED)
457 457 {
458 458 ERRO_nb = ERRO_nb + 1;
459 459 label_ERRO_nb->setText(QString::number(ERRO_nb));
460 460 }
461 else if (sid == SID_EXE_CORR)
461 else if (sid == CORRUPTED)
462 462 {
463 463 CORR_nb = CORR_nb + 1;
464 464 label_CORR_nb->setText(QString::number(CORR_nb));
@@ -838,11 +838,11 QString TMStatistics::getPacketName(unsi
838 838 if (subtype== TM_SUBTYPE_EXE_OK) packetName = "TM_LFR_TC_EXE_SUCCESS";
839 839 if (subtype == TM_SUBTYPE_EXE_NOK)
840 840 {
841 if (sid == SID_EXE_INC) packetName = "TM_LFR_TC_EXE_INCONSISTENT";
842 if (sid == SID_NOT_EXE) packetName = "TM_LFR_TC_EXE_NOT_EXECUTABLE";
843 if (sid == SID_NOT_IMP) packetName = "TM_LFR_TC_EXE_NOT_IMPLEMENTED";
844 if (sid == SID_EXE_ERR) packetName = "TM_LFR_TC_EXE_ERROR";
845 if (sid == SID_EXE_CORR) packetName = "TM_LFR_TC_EXE_CORRUPTED";
841 if (sid == WRONG_APP_DATA) packetName = "TM_LFR_TC_EXE_INCONSISTENT";
842 if (sid == TC_NOT_EXE) packetName = "TM_LFR_TC_EXE_NOT_EXECUTABLE";
843 if (sid == FUNCT_NOT_IMPL) packetName = "TM_LFR_TC_EXE_NOT_IMPLEMENTED";
844 if (sid == FAIL_DETECTED) packetName = "TM_LFR_TC_EXE_ERROR";
845 if (sid == CORRUPTED) packetName = "TM_LFR_TC_EXE_CORRUPTED";
846 846 }
847 847 }
848 848 if (type == TM_TYPE_HK)
General Comments 0
You need to be logged in to leave comments. Login now