##// END OF EJS Templates
lfrsgse updated after integration at LESIA...
admin@pc-p-leroy3.LAB-LPP.LOCAL -
r44:8d1a3ffe9394 default
parent child
Show More
@@ -198,6 +198,27 void HKDisplay::displayPacket(TMPacketTo
198 198 }
199 199 }
200 200
201 void HKDisplay::displayPacketLESIA(TMPacketToRead *tmPacketToRead)
202 {
203 Packet_TM_LFR_HK_t *housekeepingPacket;
204 if (tmPacketToRead->size != (HK_PACKET_SIZE - 4)) {
205 emit displayMessage("in displayPacket *** HK packet size is "
206 + QString::number(tmPacketToRead->size)
207 + " instead of "
208 + QString::number(HK_PACKET_SIZE-4));
209 }
210 else {
211 housekeepingPacket = (Packet_TM_LFR_HK_t *) (tmPacketToRead->Value-4);
212
213 updateLFRMode(housekeepingPacket);
214 updateSWVersion(housekeepingPacket);
215 updateTCStatistics(housekeepingPacket);
216 updateAnomalyStatistics(housekeepingPacket);
217 updateSpaceWireIFStatistics(housekeepingPacket);
218 updateErrorCountersSpaceWire(housekeepingPacket);
219 }
220 }
221
201 222 void HKDisplay::updateLFRMode(Packet_TM_LFR_HK_t *housekeepingPacket)
202 223 {
203 224 hk_lfr_mode->setText("hk_lfr_mode: "
@@ -18,6 +18,7 class HKDisplay : public QWidget
18 18 public:
19 19 explicit HKDisplay(QWidget *parent = 0);
20 20 void displayPacket(TMPacketToRead *tmPacketToRead);
21 void displayPacketLESIA(TMPacketToRead *tmPacketToRead);
21 22
22 23 void setupLFRStatusWord();
23 24 void setupLFRSWVersion();
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: lfrsgse
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jul 12 07:38:59 2013
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jul 12 08:12:46 2013
4 4 # Project: gselesia.pro
5 5 # Template: app
6 6 # Command: /usr/bin/qmake-qt4 -o Makefile gselesia.pro
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by Qt Creator 2.4.1, 2013-07-09T15:49:44. -->
3 <!-- Written by Qt Creator 2.4.1, 2013-07-12T14:03:51. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
1 NO CONTENT: modified file, binary diff hidden
@@ -22,7 +22,7 void LFRXmlParser::processIncomingStr(QS
22 22 eventBinaryStr = xmlBuffer.mid(
23 23 indexOfStartStr + startStr.size(),
24 24 indexOfStopStr - (indexOfStartStr + startStr.size() ) );
25 processIncomingData( eventBinaryStr );
25 processIncomingDataLESIA( eventBinaryStr );
26 26 xmlBuffer.remove(0, indexOfStopStr + stopStr.size());
27 27 result = findPattern( startStr, stopStr, &indexOfStartStr, &indexOfStopStr);
28 28 }
@@ -63,3 +63,27 void LFRXmlParser::processIncomingData(c
63 63
64 64 generalCCSDSPacketStore->append(incomingPacket);
65 65 }
66
67 void LFRXmlParser::processIncomingDataLESIA(const QString &ch)
68 {
69 QByteArray newdat;
70 char *values;
71 unsigned char *ccsdsData;
72 unsigned int ccsdsSize = 0;
73
74 TMPacketToRead *incomingPacket;
75
76 newdat = QByteArray::fromHex(ch.toAscii());
77 newdat.prepend((char) 1);
78 newdat.prepend((char) 2);
79 newdat.prepend((char) 0);
80 newdat.prepend((char) 0);
81
82 values = (char*) newdat.data();
83 ccsdsSize = newdat.size();
84 ccsdsData = (unsigned char *) values;
85
86 incomingPacket = new TMPacketToRead(ccsdsData, ccsdsSize);
87
88 generalCCSDSPacketStore->append(incomingPacket);
89 }
@@ -12,6 +12,7 public:
12 12 void processIncomingStr(QString incomingStr);
13 13 int findPattern(QString startStr, QString stopStr, int *indexOfStartStr, int *indexOfStopStr);
14 14 void processIncomingData(const QString &ch);
15 void processIncomingDataLESIA(const QString &ch);
15 16 QList<TMPacketToRead*> *generalCCSDSPacketStore;
16 17
17 18 signals:
@@ -283,7 +283,7 void MainWindow::preProcessPacket(TMPack
283 283
284 284 //***************************************************
285 285 // if the packet is an HK packet, display its content
286 if ( (typ == TYPE_HK) & (sub == SUBTYPE_HK) )
286 if ( (pid == 76) & (cat == 4) & (typ == TYPE_HK) & (sub == SUBTYPE_HK) )
287 287 {
288 288 this->UI->hkDisplay->displayPacket(packet);
289 289 }
@@ -319,6 +319,88 void MainWindow::preProcessPacket(TMPack
319 319 }
320 320 }
321 321
322 void MainWindow::preProcessPacketLESIA(TMPacketToRead *packet)
323 {
324 unsigned char pid = 0;
325 unsigned char cat = 0;
326 unsigned char typ = 0;
327 unsigned char sub = 0;
328 unsigned int sid = 0;
329 unsigned int length = 0;
330 unsigned int coarse_t = 0;
331 unsigned int fine_t = 0;
332
333 unsigned int offset;
334
335 offset = 4;
336
337 //*********************************
338 // get the parameters of the packet
339 pid = ((packet->Value[4-offset] & 0x07) << 4) + ((packet->Value[5-offset] & 0xf0) >> 4);
340 cat = packet->Value[5-offset] & 0x0f;
341 typ = packet->Value[11-offset]; // TYPE
342 sub = packet->Value[12-offset]; // SUBTYPE
343 sid = 0;
344 length = packet->Value[8-offset] * 256 + packet->Value[9-offset];
345 // compare length in the packet with the size of the packet
346 if ( (length + 1 + 6) != (packet->size))
347 {
348 displayOnConsole("reception of " + QString::number(packet->size)
349 + " bytes instead of " + QString::number(length + 1 + 6));
350 }
351 coarse_t = packet->Value[14-offset] * pow(2, 24) + packet->Value[15-offset] * pow(2, 16)
352 + packet->Value[16-offset] * pow(2, 8) + packet->Value[17-offset];
353 fine_t = packet->Value[18-offset] * pow(2, 8) + packet->Value[19-offset];
354
355 if ((pid == 76) & (cat == 1) & (typ == 1) & (sub == 8))
356 sid = packet->Value[20-offset] * 256 + packet->Value[21-offset];
357 else if ((pid == 76) & (cat == 4) & (typ == 3) & (sub == 25))
358 sid = 1;
359 else if ((pid == 76) & (cat == 12) & (typ == 21) & (sub == 3))
360 sid = packet->Value[20-offset];
361 else if ((pid == 79) & (cat == 12) & (typ == 21) & (sub == 3))
362 sid = packet->Value[20-offset];
363
364 this->UI->tmStatistics->updateStatistics(pid, cat, typ, sub, sid, length, coarse_t, fine_t);
365
366 //***************************************************
367 // if the packet is an HK packet, display its content
368 if ( (pid == 76) & (4) & (typ == TYPE_HK) & (sub == SUBTYPE_HK) )
369 {
370 this->UI->hkDisplay->displayPacketLESIA(packet);
371 }
372
373 //****************************************
374 // if the packet is a waveform, display it
375 if ( (typ == 21) & (sub == 3) )
376 {
377 sid = packet->Value[20-offset]; // SID
378 switch (sid){
379 case SID_NORMAL_SWF_F0:
380 buildWFAndDisplay(packet, &wfPacketNormal[0], 0);
381 break;
382 case SID_NORMAL_SWF_F1:
383 buildWFAndDisplay(packet, &wfPacketNormal[1], 1);
384 break;
385 case SID_NORMAL_SWF_F2:
386 buildWFAndDisplay(packet, &wfPacketNormal[2], 2);
387 break;
388 case SID_NORMAL_CWF_F3:
389 buildWFAndDisplay(packet, &wfPacketNormal[3], 3);
390 break;
391 case SID_BURST_CWF_F2:
392 buildWFAndDisplayBurst(packet, &wfPacketBurst);
393 break;
394 case SID_SBM1_CWF_F1:
395 buildWFAndDisplaySBM1(packet, &wfPacketSBM1);
396 break;
397 case SID_SBM2_CWF_F2:
398 buildWFAndDisplaySBM2(packet, &wfPacketSBM2);
399 break;
400 }
401 }
402 }
403
322 404 void MainWindow::buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page)
323 405 {
324 406 unsigned int i = 0;
@@ -25,6 +25,7 public:
25 25 void displayNetworkInterfaces();
26 26 void initSocketStatesList();
27 27 void preProcessPacket(TMPacketToRead *packet);
28 void preProcessPacketLESIA(TMPacketToRead *packet);
28 29 void buildWFAndDisplay(TMPacketToRead *packet, WFPacket *wfPacket, unsigned char num_page);
29 30 void buildWFAndDisplayBurst(TMPacketToRead *packet, WFPacket *wfPacket);
30 31 void buildWFAndDisplaySBM1(TMPacketToRead *packet, WFPacket *wfPacket);
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: libwfdisplay.so.1.0.0
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jul 12 07:38:20 2013
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jul 12 08:12:10 2013
4 4 # Project: wfdisplay.pro
5 5 # Template: lib
6 6 # Command: /usr/bin/qmake-qt4 -o Makefile wfdisplay.pro
@@ -301,11 +301,11 moc_qcustomplot.o: moc_qcustomplot.cpp
301 301
302 302 install_header: first FORCE
303 303 @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/ || $(MKDIR) $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
304 -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
305 -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay_global.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
306 -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfpage.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
307 -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfplot.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
308 -$(INSTALL_FILE) /opt/LPPMON_PLUGINS_PAUL/wfdisplay/wfdisplay/wfdisplay_params.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
304 -$(INSTALL_FILE) /home/admin/opt/LPPMON_PLUGINS_PLE/wfdisplay/wfdisplay/wfdisplay.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
305 -$(INSTALL_FILE) /home/admin/opt/LPPMON_PLUGINS_PLE/wfdisplay/wfdisplay/wfdisplay_global.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
306 -$(INSTALL_FILE) /home/admin/opt/LPPMON_PLUGINS_PLE/wfdisplay/wfdisplay/wfpage.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
307 -$(INSTALL_FILE) /home/admin/opt/LPPMON_PLUGINS_PLE/wfdisplay/wfdisplay/wfplot.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
308 -$(INSTALL_FILE) /home/admin/opt/LPPMON_PLUGINS_PLE/wfdisplay/wfdisplay/wfdisplay_params.h $(INSTALL_ROOT)/usr/include/lppmon/wfdisplay/
309 309
310 310
311 311 uninstall_header: FORCE
General Comments 0
You need to be logged in to leave comments. Login now