@@ -23,19 +23,21 public: | |||
|
23 | 23 | void setupLFRSWVersion(); |
|
24 | 24 | void setupLFR_FPGA_Version(); |
|
25 | 25 | void setupVE1E2(); |
|
26 | void setupResourcesStatistics(); | |
|
26 | 27 | void setupTCStatistics(); |
|
27 | 28 | void setupAnomalyStatistics(); |
|
28 | 29 | void setupSpaceWireIFStatistics(); |
|
29 | 30 | void setupErrorCountersSpaceWire(); |
|
30 | 31 | |
|
31 | void update_lfr_status_word(Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
32 | void updateSWVersion(Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
33 | void update_FPGA_version(Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
34 | void update_v_e1_e2(Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
35 |
void update |
|
|
36 |
void update |
|
|
37 |
void update |
|
|
38 |
void update |
|
|
32 | void update_lfr_status_word( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
33 | void updateSWVersion( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
34 | void update_FPGA_version( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
35 | void update_v_e1_e2( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
36 | void updateResourceStatistics( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
37 | void updateTCStatistics( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
38 | void updateAnomalyStatistics( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
39 | void updateSpaceWireIFStatistics( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
40 | void updateErrorCountersSpaceWire( Packet_TM_LFR_HK_t *housekeepingPacket); | |
|
39 | 41 | |
|
40 | 42 | signals: |
|
41 | 43 | void displayMessage(QString message); |
@@ -49,6 +51,7 private: | |||
|
49 | 51 | QGroupBox *groupbox_tcStatistics; |
|
50 | 52 | QGroupBox *groupbox_anomalyStatistics; |
|
51 | 53 | QGroupBox *groupbox_v_e1_e2; |
|
54 | QGroupBox *groupbox_resourceStatistics; | |
|
52 | 55 | //*********************************** |
|
53 | 56 | //*********************************** |
|
54 | 57 | QGroupBox *groupbox_vhdlBlockStatus; |
@@ -63,6 +66,7 private: | |||
|
63 | 66 | QVBoxLayout *box_lfrSWVersion; |
|
64 | 67 | QVBoxLayout *box_lfr_FPGA_Version; |
|
65 | 68 | QVBoxLayout *box_v_e1_e2; |
|
69 | QVBoxLayout *box_resourceStatistics; | |
|
66 | 70 | QVBoxLayout *box_tcStatistics; |
|
67 | 71 | QVBoxLayout *box_anomalyStatistics; |
|
68 | 72 | //*********************************** |
@@ -94,6 +98,10 private: | |||
|
94 | 98 | QLabel *hk_lfr_sc_v_f3; |
|
95 | 99 | QLabel *hk_lfr_sc_e1_f3; |
|
96 | 100 | QLabel *hk_lfr_sc_e2_f3; |
|
101 | // resource_statistics | |
|
102 | QLabel *hk_lfr_cpu_load; | |
|
103 | QLabel *hk_lfr_cpu_load_max; | |
|
104 | QLabel *hk_lfr_cpu_load_ave; | |
|
97 | 105 | // |
|
98 | 106 | QLabel *hk_lfr_update_info_tc_cnt; |
|
99 | 107 | QLabel *hk_lfr_update_time_tc_cnt; |
@@ -12,6 +12,7 HKDisplay::HKDisplay(QWidget *parent) : | |||
|
12 | 12 | setupLFRSWVersion(); |
|
13 | 13 | setupLFR_FPGA_Version(); |
|
14 | 14 | setupVE1E2(); |
|
15 | setupResourcesStatistics(); | |
|
15 | 16 | setupTCStatistics(); |
|
16 | 17 | setupAnomalyStatistics(); |
|
17 | 18 | setupSpaceWireIFStatistics(); |
@@ -21,6 +22,7 HKDisplay::HKDisplay(QWidget *parent) : | |||
|
21 | 22 | groupbox_lfrSWVersion->setFont(font); |
|
22 | 23 | groupbox_lfr_FPGA_Version->setFont(font); |
|
23 | 24 | groupbox_v_e1_e2->setFont(font); |
|
25 | groupbox_resourceStatistics->setFont(font); | |
|
24 | 26 | groupbox_tcStatistics->setFont(font); |
|
25 | 27 | groupbox_anomalyStatistics->setFont(font); |
|
26 | 28 | groupbox_spacewireIFStatisctics->setFont(font); |
@@ -30,6 +32,7 HKDisplay::HKDisplay(QWidget *parent) : | |||
|
30 | 32 | mainLayout->addWidget(groupbox_lfrSWVersion, 0,1,1,1); |
|
31 | 33 | mainLayout->addWidget(groupbox_lfr_FPGA_Version, 0,2,1,1); |
|
32 | 34 | mainLayout->addWidget(groupbox_v_e1_e2, 0,3,1,1); |
|
35 | mainLayout->addWidget(groupbox_resourceStatistics, 0,4,1,1); | |
|
33 | 36 | mainLayout->addWidget(groupbox_tcStatistics, 1,0,1,1); |
|
34 | 37 | mainLayout->addWidget(groupbox_spacewireIFStatisctics, 1, 1, 1, 1); |
|
35 | 38 | mainLayout->addWidget(groupbox_errorCountersSpaceWire, 1, 2, 1, 1); |
@@ -106,6 +109,20 void HKDisplay::setupVE1E2() | |||
|
106 | 109 | groupbox_v_e1_e2->setLayout(box_v_e1_e2); |
|
107 | 110 | } |
|
108 | 111 | |
|
112 | void HKDisplay::setupResourcesStatistics() | |
|
113 | { | |
|
114 | groupbox_resourceStatistics = new QGroupBox("cpu load"); | |
|
115 | box_resourceStatistics = new QVBoxLayout(); | |
|
116 | hk_lfr_cpu_load = new QLabel("load: -"); | |
|
117 | hk_lfr_cpu_load_max = new QLabel("load max: -"); | |
|
118 | hk_lfr_cpu_load_ave = new QLabel("load ave: -"); | |
|
119 | box_resourceStatistics->addWidget(hk_lfr_cpu_load); | |
|
120 | box_resourceStatistics->addWidget(hk_lfr_cpu_load_max); | |
|
121 | box_resourceStatistics->addWidget(hk_lfr_cpu_load_ave); | |
|
122 | box_resourceStatistics->insertStretch(3); | |
|
123 | groupbox_resourceStatistics->setLayout(box_resourceStatistics); | |
|
124 | } | |
|
125 | ||
|
109 | 126 | void HKDisplay::setupTCStatistics() |
|
110 | 127 | { |
|
111 | 128 | groupbox_tcStatistics = new QGroupBox("TC Statistics"); |
@@ -225,6 +242,7 void HKDisplay::displayPacket(TMPacketTo | |||
|
225 | 242 | updateSWVersion( housekeepingPacket ); |
|
226 | 243 | update_FPGA_version( housekeepingPacket ); |
|
227 | 244 | update_v_e1_e2( housekeepingPacket ); |
|
245 | updateResourceStatistics( housekeepingPacket ); | |
|
228 | 246 | updateTCStatistics( housekeepingPacket ); |
|
229 | 247 | updateAnomalyStatistics( housekeepingPacket ); |
|
230 | 248 | updateSpaceWireIFStatistics( housekeepingPacket ); |
@@ -311,6 +329,21 void HKDisplay::update_v_e1_e2(Packet_TM | |||
|
311 | 329 | hk_lfr_sc_e2_f3->setText("e2_f3: " + QString::number( e2 ) ); |
|
312 | 330 | } |
|
313 | 331 | |
|
332 | void HKDisplay::updateResourceStatistics(Packet_TM_LFR_HK_t *housekeepingPacket) | |
|
333 | { | |
|
334 | unsigned char cpu_load; | |
|
335 | unsigned char cpu_load_max; | |
|
336 | unsigned char cpu_load_ave; | |
|
337 | ||
|
338 | cpu_load = housekeepingPacket->hk_lfr_cpu_load; | |
|
339 | cpu_load_max = housekeepingPacket->hk_lfr_cpu_load_max; | |
|
340 | cpu_load_ave = housekeepingPacket->hk_lfr_cpu_load_aver; | |
|
341 | ||
|
342 | hk_lfr_cpu_load->setText( "load: " + QString::number( cpu_load ) ); | |
|
343 | hk_lfr_cpu_load_max->setText( "load max: " + QString::number( cpu_load_max ) ); | |
|
344 | hk_lfr_cpu_load_ave->setText( "load ave: " + QString::number( cpu_load_ave ) ); | |
|
345 | } | |
|
346 | ||
|
314 | 347 | void HKDisplay::updateTCStatistics(Packet_TM_LFR_HK_t *housekeepingPacket) |
|
315 | 348 | { |
|
316 | 349 | // TC Statistics |
@@ -3,7 +3,7 | |||
|
3 | 3 | # Generated by qmake (3.0) (Qt 5.2.1) |
|
4 | 4 | # Project: rmapplugin.pro |
|
5 | 5 | # Template: lib |
|
6 |
# Command: /bin/qmake-qt5 |
|
|
6 | # Command: /usr/bin/qmake-qt5 -o Makefile rmapplugin.pro | |
|
7 | 7 | ############################################################################# |
|
8 | 8 | |
|
9 | 9 | MAKEFILE = Makefile |
@@ -21,7 +21,7 LFLAGS = -m64 -Wl,-O1 -Wl,-z,relr | |||
|
21 | 21 | LIBS = $(SUBLIBS) -L/usr/X11R6/lib64 /home/spacewire/usb/spw_usb_driver_v2.68/lib/x86_64/libSpaceWireUSBAPI.so /home/spacewire/usb/spw_usb_driver_v2.68/lib/x86_64/libConfigLibraryUSB.so -lwfdisplay -lpaulcommon -llppmonengine -llppmoncommon -ldl -lutil -lm -lpython2.7 -lPythonQt_QtAll -lPythonQt -lQt5PrintSupport -lQt5Svg -lQt5Widgets -lQt5Network -lQt5Xml -lQt5Gui -lQt5Core -lGL -lpthread |
|
22 | 22 | AR = ar cqs |
|
23 | 23 | RANLIB = |
|
24 | QMAKE = /bin/qmake-qt5 | |
|
24 | QMAKE = /usr/bin/qmake-qt5 | |
|
25 | 25 | TAR = tar -cf |
|
26 | 26 | COMPRESS = gzip -9f |
|
27 | 27 | COPY = cp -f |
@@ -347,7 +347,7 Makefile: rmapplugin.pro /usr/lib64/qt5/ | |||
|
347 | 347 | /lib64/libQt5Xml.prl \ |
|
348 | 348 | /lib64/libQt5Gui.prl \ |
|
349 | 349 | /lib64/libQt5Core.prl |
|
350 |
$(QMAKE) |
|
|
350 | $(QMAKE) -o Makefile rmapplugin.pro | |
|
351 | 351 | /usr/lib64/qt5/mkspecs/features/spec_pre.prf: |
|
352 | 352 | /usr/lib64/qt5/mkspecs/common/shell-unix.conf: |
|
353 | 353 | /usr/lib64/qt5/mkspecs/common/unix.conf: |
@@ -453,7 +453,7 rmapplugin.pro: | |||
|
453 | 453 | /lib64/libQt5Gui.prl: |
|
454 | 454 | /lib64/libQt5Core.prl: |
|
455 | 455 | qmake: FORCE |
|
456 |
@$(QMAKE) |
|
|
456 | @$(QMAKE) -o Makefile rmapplugin.pro | |
|
457 | 457 | |
|
458 | 458 | qmake_all: FORCE |
|
459 | 459 |
@@ -234,7 +234,7 bool StarDundee::Open() | |||
|
234 | 234 | // statusLink2->setText("Link 2 status code: " + QString::number(linkStatus2)); |
|
235 | 235 | // starDundeeStatusQueryDialog->exec(); |
|
236 | 236 | emit isOpen(true); |
|
237 | timer->start(1); // starts the periodical timer, period = 100ms | |
|
237 | timer->start(100); // starts the periodical timer, period = 100ms | |
|
238 | 238 | initializeTimecodeGeneration(); |
|
239 | 239 | return true; |
|
240 | 240 | } |
@@ -846,7 +846,7 void StarDundee::spaceWireLinkHasChanged | |||
|
846 | 846 | void StarDundee::receivePollingLoop() |
|
847 | 847 | { |
|
848 | 848 | timer->blockSignals(true); |
|
849 | if (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) receiveSPWPacketLoop(0); | |
|
849 | if (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0.01)) receiveSPWPacketLoop(0); | |
|
850 | 850 | timer->blockSignals(false); |
|
851 | 851 | } |
|
852 | 852 | |
@@ -856,7 +856,7 int StarDundee::receiveSPWPacketLoop(uns | |||
|
856 | 856 | emit appendToLog("Number of packets dropped by the driver: " + |
|
857 | 857 | QString::number(USBSpaceWire_GetDriverDroppedPackets(hDevice))); |
|
858 | 858 | |
|
859 | while (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0)) | |
|
859 | while (USBSpaceWire_WaitOnReadPacketAvailable(hDevice, 0.01)) | |
|
860 | 860 | { |
|
861 | 861 | result = receiveSPWPacket(requestID); |
|
862 | 862 | } |
General Comments 0
You need to be logged in to leave comments.
Login now