##// END OF EJS Templates
SpwPlugin:...
jeandet -
r65:67168ff4b6e7 default
parent child
Show More
@@ -0,0 +1,57
1 #include "fakestardundeespwusbgui.h"
2 #include "ui_fakestardundeespwusbgui.h"
3 #include "fakestardundeespwusb_lib.h"
4
5 FakeStardundeeSpwUsbGui::FakeStardundeeSpwUsbGui(QWidget *parent) :
6 QWidget(parent),
7 ui(new Ui::FakeStardundeeSpwUsbGui)
8 {
9 ui->setupUi(this);
10 }
11
12 FakeStardundeeSpwUsbGui::~FakeStardundeeSpwUsbGui()
13 {
14 delete ui;
15 }
16
17 void FakeStardundeeSpwUsbGui::update()
18 {
19 const QList<funcToresolve> stat=FakeStarDundeeSpwUSB_Lib::status();
20 QTableWidgetItem* item;
21 this->ui->symbolsList->clear();
22 this->ui->symbolsList->setHorizontalHeaderLabels(QStringList()<<"Symbol"<<"Status");
23 this->ui->symbolsList->setRowCount(stat.count());
24 for(int i=0;i<stat.count();i++)
25 {
26 item=new QTableWidgetItem(stat[i].symbolName);
27 item->setFlags(item->flags()^Qt::ItemIsEditable);
28 this->ui->symbolsList->setItem(i,0,item);
29 if(*(stat[i].function)==NULL)
30 {
31 item=new QTableWidgetItem("Not found");
32 item->setForeground(Qt::red);
33 item->setFlags(item->flags()^Qt::ItemIsEditable);
34 this->ui->symbolsList->setItem(i,1,item);
35 }
36 else
37 {
38 item=new QTableWidgetItem("Loaded");
39 item->setForeground(Qt::green);
40 item->setFlags(item->flags()^Qt::ItemIsEditable);
41 this->ui->symbolsList->setItem(i,1,item);
42 }
43 }
44 this->ui->symbolsList->resizeColumnsToContents();
45 }
46
47 void FakeStardundeeSpwUsbGui::changeEvent(QEvent *e)
48 {
49 QWidget::changeEvent(e);
50 switch (e->type()) {
51 case QEvent::LanguageChange:
52 ui->retranslateUi(this);
53 break;
54 default:
55 break;
56 }
57 }
@@ -0,0 +1,25
1 #ifndef FAKESTARDUNDEESPWUSBGUI_H
2 #define FAKESTARDUNDEESPWUSBGUI_H
3
4 #include <QWidget>
5
6 namespace Ui {
7 class FakeStardundeeSpwUsbGui;
8 }
9
10 class FakeStardundeeSpwUsbGui : public QWidget
11 {
12 Q_OBJECT
13
14 public:
15 explicit FakeStardundeeSpwUsbGui(QWidget *parent = 0);
16 ~FakeStardundeeSpwUsbGui();
17 void update();
18 protected:
19 void changeEvent(QEvent *e);
20
21 private:
22 Ui::FakeStardundeeSpwUsbGui *ui;
23 };
24
25 #endif // FAKESTARDUNDEESPWUSBGUI_H
@@ -0,0 +1,84
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>FakeStardundeeSpwUsbGui</class>
4 <widget class="QWidget" name="FakeStardundeeSpwUsbGui">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>612</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QGridLayout" name="gridLayout">
17 <item row="1" column="1">
18 <widget class="QPushButton" name="closeQpb">
19 <property name="text">
20 <string>close</string>
21 </property>
22 </widget>
23 </item>
24 <item row="1" column="0">
25 <spacer name="horizontalSpacer">
26 <property name="orientation">
27 <enum>Qt::Horizontal</enum>
28 </property>
29 <property name="sizeHint" stdset="0">
30 <size>
31 <width>40</width>
32 <height>20</height>
33 </size>
34 </property>
35 </spacer>
36 </item>
37 <item row="0" column="0" colspan="2">
38 <widget class="QTableWidget" name="symbolsList">
39 <property name="alternatingRowColors">
40 <bool>true</bool>
41 </property>
42 <property name="sortingEnabled">
43 <bool>true</bool>
44 </property>
45 <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
46 <bool>true</bool>
47 </attribute>
48 <attribute name="verticalHeaderShowSortIndicator" stdset="0">
49 <bool>false</bool>
50 </attribute>
51 <column>
52 <property name="text">
53 <string>Symbol</string>
54 </property>
55 </column>
56 <column>
57 <property name="text">
58 <string>Status</string>
59 </property>
60 </column>
61 </widget>
62 </item>
63 </layout>
64 </widget>
65 <resources/>
66 <connections>
67 <connection>
68 <sender>closeQpb</sender>
69 <signal>clicked()</signal>
70 <receiver>FakeStardundeeSpwUsbGui</receiver>
71 <slot>close()</slot>
72 <hints>
73 <hint type="sourcelabel">
74 <x>560</x>
75 <y>275</y>
76 </hint>
77 <hint type="destinationlabel">
78 <x>305</x>
79 <y>149</y>
80 </hint>
81 </hints>
82 </connection>
83 </connections>
84 </ui>
@@ -88,11 +88,7 int (*resolved_CFGSpaceWire_GetTickEna
88 int (*resolved_CFGSpaceWire_SetTickEnableStatus)(star_device_handle hDevice, U32 dwTickEnableStatus)=NULL;
88 int (*resolved_CFGSpaceWire_SetTickEnableStatus)(star_device_handle hDevice, U32 dwTickEnableStatus)=NULL;
89
89
90
90
91 typedef struct funcToresolve
91
92 {
93 void (** function)();
94 const char* symbolName;
95 }funcToresolve;
96
92
97 QList<funcToresolve> funcTable=QList<funcToresolve>()
93 QList<funcToresolve> funcTable=QList<funcToresolve>()
98 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_Open,"USBSpaceWire_Open"}
94 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_Open,"USBSpaceWire_Open"}
@@ -193,6 +189,22 void FakeStarDundeeSpwUSB_Lib::resolve()
193 }
189 }
194 }
190 }
195
191
192 bool FakeStarDundeeSpwUSB_Lib::fullresolved()
193 {
194 bool success=true;
195 for(int i=0;i<funcTable.count();i++)
196 {
197 if(*(funcTable[i].function)==NULL)
198 success=false;
199 }
200 return success;
201 }
202
203 const QList<funcToresolve> &FakeStarDundeeSpwUSB_Lib::status()
204 {
205 return funcTable;
206 }
207
196
208
197
209
198 char USBSpaceWire_Open(star_device_handle *phDevice, int nDeviceNum)
210 char USBSpaceWire_Open(star_device_handle *phDevice, int nDeviceNum)
@@ -359,7 +359,11 void CFGSpaceWire_RTGetOutputPorts(U32
359 int CFGSpaceWire_GetTickEnableStatus(star_device_handle hDevice, U32 *dwTickEnableStatus);
359 int CFGSpaceWire_GetTickEnableStatus(star_device_handle hDevice, U32 *dwTickEnableStatus);
360 int CFGSpaceWire_SetTickEnableStatus(star_device_handle hDevice, U32 dwTickEnableStatus);
360 int CFGSpaceWire_SetTickEnableStatus(star_device_handle hDevice, U32 dwTickEnableStatus);
361
361
362
362 typedef struct funcToresolve
363 {
364 void (** function)();
365 const char* symbolName;
366 }funcToresolve;
363
367
364
368
365 class FakeStarDundeeSpwUSB_Lib
369 class FakeStarDundeeSpwUSB_Lib
@@ -367,6 +371,8 class FakeStarDundeeSpwUSB_Lib
367 public:
371 public:
368 FakeStarDundeeSpwUSB_Lib();
372 FakeStarDundeeSpwUSB_Lib();
369 static void resolve();
373 static void resolve();
374 static bool fullresolved();
375 static const QList<funcToresolve>& status();
370 };
376 };
371
377
372 #endif // FAKESTARDUNDEESPWUSB_LIB_H
378 #endif // FAKESTARDUNDEESPWUSB_LIB_H
@@ -6,22 +6,22
6 <rect>
6 <rect>
7 <x>0</x>
7 <x>0</x>
8 <y>0</y>
8 <y>0</y>
9 <width>397</width>
9 <width>609</width>
10 <height>506</height>
10 <height>581</height>
11 </rect>
11 </rect>
12 </property>
12 </property>
13 <property name="windowTitle">
13 <property name="windowTitle">
14 <string>Form</string>
14 <string>Form</string>
15 </property>
15 </property>
16 <layout class="QFormLayout" name="formLayout">
16 <layout class="QFormLayout" name="formLayout">
17 <item row="0" column="0">
17 <item row="7" column="0">
18 <widget class="QLabel" name="selectBrickLbl">
18 <widget class="QLabel" name="selectBrickLbl">
19 <property name="text">
19 <property name="text">
20 <string>Select Brick</string>
20 <string>Select Brick</string>
21 </property>
21 </property>
22 </widget>
22 </widget>
23 </item>
23 </item>
24 <item row="0" column="1">
24 <item row="7" column="1">
25 <widget class="QComboBox" name="selectBrickCmbx">
25 <widget class="QComboBox" name="selectBrickCmbx">
26 <property name="toolTip">
26 <property name="toolTip">
27 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the brick you want to use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
27 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the brick you want to use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -36,14 +36,14
36 </item>
36 </item>
37 </widget>
37 </widget>
38 </item>
38 </item>
39 <item row="1" column="0">
39 <item row="8" column="0">
40 <widget class="QLabel" name="selectLinkLbl">
40 <widget class="QLabel" name="selectLinkLbl">
41 <property name="text">
41 <property name="text">
42 <string>Select link number</string>
42 <string>Select link number</string>
43 </property>
43 </property>
44 </widget>
44 </widget>
45 </item>
45 </item>
46 <item row="1" column="1">
46 <item row="8" column="1">
47 <widget class="QComboBox" name="selectLinkCmbx">
47 <widget class="QComboBox" name="selectLinkCmbx">
48 <property name="toolTip">
48 <property name="toolTip">
49 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the link number you want to use.&lt;/p&gt;&lt;p&gt;The link number correspond to the numbers on the brick:&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/imgs/stardundee.tif&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
49 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the link number you want to use.&lt;/p&gt;&lt;p&gt;The link number correspond to the numbers on the brick:&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/imgs/stardundee.tif&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -60,14 +60,14
60 </item>
60 </item>
61 </widget>
61 </widget>
62 </item>
62 </item>
63 <item row="2" column="0">
63 <item row="9" column="0">
64 <widget class="QLabel" name="selectLinkSpeedLbl">
64 <widget class="QLabel" name="selectLinkSpeedLbl">
65 <property name="text">
65 <property name="text">
66 <string>Link Speed</string>
66 <string>Link Speed</string>
67 </property>
67 </property>
68 </widget>
68 </widget>
69 </item>
69 </item>
70 <item row="2" column="1">
70 <item row="9" column="1">
71 <widget class="QComboBox" name="setLinkSpeedCmbx">
71 <widget class="QComboBox" name="setLinkSpeedCmbx">
72 <property name="toolTip">
72 <property name="toolTip">
73 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the Space Wire link speed you want to use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
73 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the Space Wire link speed you want to use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -79,14 +79,14
79 </item>
79 </item>
80 </widget>
80 </widget>
81 </item>
81 </item>
82 <item row="3" column="0">
82 <item row="10" column="0">
83 <widget class="QLabel" name="setDestKeyLbl">
83 <widget class="QLabel" name="setDestKeyLbl">
84 <property name="text">
84 <property name="text">
85 <string>Source address</string>
85 <string>Source address</string>
86 </property>
86 </property>
87 </widget>
87 </widget>
88 </item>
88 </item>
89 <item row="3" column="1">
89 <item row="10" column="1">
90 <widget class="QLineEdit" name="sourceAddressLineEdit">
90 <widget class="QLineEdit" name="sourceAddressLineEdit">
91 <property name="toolTip">
91 <property name="toolTip">
92 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the Space Wire Brick destination Key, the default value is 32 (0x20).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
92 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the Space Wire Brick destination Key, the default value is 32 (0x20).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -102,14 +102,14
102 </property>
102 </property>
103 </widget>
103 </widget>
104 </item>
104 </item>
105 <item row="4" column="0">
105 <item row="11" column="0">
106 <widget class="QLabel" name="RMAPaddressLbl">
106 <widget class="QLabel" name="RMAPaddressLbl">
107 <property name="text">
107 <property name="text">
108 <string>Destination address</string>
108 <string>Destination address</string>
109 </property>
109 </property>
110 </widget>
110 </widget>
111 </item>
111 </item>
112 <item row="4" column="1">
112 <item row="11" column="1">
113 <widget class="QLineEdit" name="destinationAddressLineEdit">
113 <widget class="QLineEdit" name="destinationAddressLineEdit">
114 <property name="toolTip">
114 <property name="toolTip">
115 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP target address, this address will be used as destination address for all the RMAP transfers.&lt;/p&gt;&lt;p&gt;This is you SOC spw address.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
115 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP target address, this address will be used as destination address for all the RMAP transfers.&lt;/p&gt;&lt;p&gt;This is you SOC spw address.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -125,14 +125,14
125 </property>
125 </property>
126 </widget>
126 </widget>
127 </item>
127 </item>
128 <item row="5" column="0">
128 <item row="12" column="0">
129 <widget class="QLabel" name="RMAPKeyLbl">
129 <widget class="QLabel" name="RMAPKeyLbl">
130 <property name="text">
130 <property name="text">
131 <string>Destination key</string>
131 <string>Destination key</string>
132 </property>
132 </property>
133 </widget>
133 </widget>
134 </item>
134 </item>
135 <item row="5" column="1">
135 <item row="12" column="1">
136 <widget class="QLineEdit" name="destinationKeyLineEdit">
136 <widget class="QLineEdit" name="destinationKeyLineEdit">
137 <property name="toolTip">
137 <property name="toolTip">
138 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP target key, this key will be used for all the RMAP transfers.&lt;/p&gt;&lt;p&gt;This is you SOC spw key.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
138 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP target key, this key will be used for all the RMAP transfers.&lt;/p&gt;&lt;p&gt;This is you SOC spw key.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -148,7 +148,7
148 </property>
148 </property>
149 </widget>
149 </widget>
150 </item>
150 </item>
151 <item row="6" column="1">
151 <item row="13" column="1">
152 <widget class="QLineEdit" name="RMAPTimeoutLineEdit">
152 <widget class="QLineEdit" name="RMAPTimeoutLineEdit">
153 <property name="toolTip">
153 <property name="toolTip">
154 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP timeout, when waiting for a RMAP answer the driver will give up after this time if it doesn't get any answer.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
154 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the RMAP timeout, when waiting for a RMAP answer the driver will give up after this time if it doesn't get any answer.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -167,38 +167,38
167 </property>
167 </property>
168 </widget>
168 </widget>
169 </item>
169 </item>
170 <item row="6" column="0">
170 <item row="13" column="0">
171 <widget class="QLabel" name="RMAPTimeoutLbl">
171 <widget class="QLabel" name="RMAPTimeoutLbl">
172 <property name="text">
172 <property name="text">
173 <string>RMAP timeout(ms)</string>
173 <string>RMAP timeout(ms)</string>
174 </property>
174 </property>
175 </widget>
175 </widget>
176 </item>
176 </item>
177 <item row="10" column="1">
177 <item row="17" column="1">
178 <widget class="QPushButton" name="connectQpb">
178 <widget class="QPushButton" name="connectQpb">
179 <property name="text">
179 <property name="text">
180 <string>Connect</string>
180 <string>Connect</string>
181 </property>
181 </property>
182 </widget>
182 </widget>
183 </item>
183 </item>
184 <item row="8" column="1">
184 <item row="15" column="1">
185 <widget class="QRadioButton" name="setInterfaceModeQrb">
185 <widget class="QRadioButton" name="setInterfaceModeQrb">
186 <property name="text">
186 <property name="text">
187 <string>interface mode</string>
187 <string>i&amp;nterface mode</string>
188 </property>
188 </property>
189 <property name="checked">
189 <property name="checked">
190 <bool>true</bool>
190 <bool>true</bool>
191 </property>
191 </property>
192 </widget>
192 </widget>
193 </item>
193 </item>
194 <item row="9" column="1">
194 <item row="16" column="1">
195 <widget class="QRadioButton" name="setRouterModeQrb">
195 <widget class="QRadioButton" name="setRouterModeQrb">
196 <property name="text">
196 <property name="text">
197 <string>router mode</string>
197 <string>router &amp;mode</string>
198 </property>
198 </property>
199 </widget>
199 </widget>
200 </item>
200 </item>
201 <item row="11" column="0" colspan="2">
201 <item row="18" column="0" colspan="2">
202 <layout class="QGridLayout" name="gridLayout">
202 <layout class="QGridLayout" name="gridLayout">
203 <item row="1" column="0">
203 <item row="1" column="0">
204 <widget class="QLabel" name="label_4">
204 <widget class="QLabel" name="label_4">
@@ -277,27 +277,61
277 </item>
277 </item>
278 </layout>
278 </layout>
279 </item>
279 </item>
280 <item row="8" column="0">
280 <item row="15" column="0">
281 <widget class="QCheckBox" name="spwTimecodes">
281 <widget class="QCheckBox" name="spwTimecodes">
282 <property name="text">
282 <property name="text">
283 <string>timecode</string>
283 <string>timecode</string>
284 </property>
284 </property>
285 </widget>
285 </widget>
286 </item>
286 </item>
287 <item row="7" column="0">
287 <item row="14" column="0">
288 <widget class="QLabel" name="label">
288 <widget class="QLabel" name="label">
289 <property name="text">
289 <property name="text">
290 <string>Timecode f (Hz)</string>
290 <string>Timecode f (Hz)</string>
291 </property>
291 </property>
292 </widget>
292 </widget>
293 </item>
293 </item>
294 <item row="7" column="1">
294 <item row="14" column="1">
295 <widget class="QLineEdit" name="timecodeFrequencyLineEdit">
295 <widget class="QLineEdit" name="timecodeFrequencyLineEdit">
296 <property name="text">
296 <property name="text">
297 <string>1</string>
297 <string>1</string>
298 </property>
298 </property>
299 </widget>
299 </widget>
300 </item>
300 </item>
301 <item row="5" column="0">
302 <widget class="QLabel" name="label_2">
303 <property name="text">
304 <string>Driver Status</string>
305 </property>
306 </widget>
307 </item>
308 <item row="5" column="1">
309 <layout class="QHBoxLayout" name="horizontalLayout">
310 <property name="leftMargin">
311 <number>0</number>
312 </property>
313 <property name="topMargin">
314 <number>0</number>
315 </property>
316 <item>
317 <widget class="QLabel" name="driverstatuslbl">
318 <property name="text">
319 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;NotLoaded&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
320 </property>
321 <property name="alignment">
322 <set>Qt::AlignCenter</set>
323 </property>
324 </widget>
325 </item>
326 <item>
327 <widget class="QPushButton" name="driverStatusQpb">
328 <property name="text">
329 <string>Details</string>
330 </property>
331 </widget>
332 </item>
333 </layout>
334 </item>
301 </layout>
335 </layout>
302 </widget>
336 </widget>
303 <resources/>
337 <resources/>
@@ -23,8 +23,6
23
23
24 #include "ui_stardundeeGUI.h"
24 #include "ui_stardundeeGUI.h"
25 #include "fakestardundeespwusb_lib.h"
25 #include "fakestardundeespwusb_lib.h"
26 //#include <spw_usb_api.h>
27 //#include <spw_config_library.h>
28
26
29 StarDundeeGUI::StarDundeeGUI(QWidget *parent) :
27 StarDundeeGUI::StarDundeeGUI(QWidget *parent) :
30 QWidget(parent),ui(new Ui::StarDundeeUI)
28 QWidget(parent),ui(new Ui::StarDundeeUI)
@@ -45,6 +43,11 StarDundeeGUI::StarDundeeGUI(QWidget *pa
45 connect(this->ui->setInterfaceModeQrb, SIGNAL(toggled(bool)), this, SIGNAL(brickModeChanged(bool)));
43 connect(this->ui->setInterfaceModeQrb, SIGNAL(toggled(bool)), this, SIGNAL(brickModeChanged(bool)));
46 connect(this->ui->resetStatsQpb, SIGNAL(clicked()), this, SLOT(resetStatistics()));
44 connect(this->ui->resetStatsQpb, SIGNAL(clicked()), this, SLOT(resetStatistics()));
47 connect(this->ui->spwTimecodes, SIGNAL(toggled(bool)), this, SIGNAL(startSendingTimecode(bool)));
45 connect(this->ui->spwTimecodes, SIGNAL(toggled(bool)), this, SIGNAL(startSendingTimecode(bool)));
46 connect(this->ui->driverStatusQpb,SIGNAL(clicked(bool)),this,SLOT(showDriverStatus()));
47 if(FakeStarDundeeSpwUSB_Lib::fullresolved())
48 this->ui->driverstatuslbl->setText("<html><head/><body><p><span style=\" color:#00ff00;\">Driver loaded</span></p></body></html>");
49 else
50 this->ui->driverstatuslbl->setText("<html><head/><body><p><span style=\" color:#ff0000;\">Driver not loaded(error!)</span></p></body></html>");
48 }
51 }
49
52
50 int StarDundeeGUI::getBrickSelection()
53 int StarDundeeGUI::getBrickSelection()
@@ -97,6 +100,12 bool StarDundeeGUI::isBrickSetAsAnInterf
97 return ui->setInterfaceModeQrb->isChecked();
100 return ui->setInterfaceModeQrb->isChecked();
98 }
101 }
99
102
103 void StarDundeeGUI::showDriverStatus()
104 {
105 this->driverStatus.update();
106 this->driverStatus.show();
107 }
108
100 void StarDundeeGUI::setBrickAsAnInterface( bool interfaceMode )
109 void StarDundeeGUI::setBrickAsAnInterface( bool interfaceMode )
101 {
110 {
102 if (interfaceMode == true)
111 if (interfaceMode == true)
@@ -24,6 +24,8
24
24
25 #include <QWidget>
25 #include <QWidget>
26
26
27 #include "fakestardundeespwusbgui.h"
28
27 namespace Ui {
29 namespace Ui {
28 class StarDundeeUI;
30 class StarDundeeUI;
29 }
31 }
@@ -57,6 +59,7 signals:
57 void brickModeChanged(bool);
59 void brickModeChanged(bool);
58 void startSendingTimecode(bool);
60 void startSendingTimecode(bool);
59 public slots:
61 public slots:
62 void showDriverStatus();
60 void lock(bool lock);
63 void lock(bool lock);
61 void updateAvailableBrickCount(int count);
64 void updateAvailableBrickCount(int count);
62 void selectBrick(int brickIndex);
65 void selectBrick(int brickIndex);
@@ -85,6 +88,7 private:
85 unsigned int nbPacketsReceivedFromSpw;
88 unsigned int nbPacketsReceivedFromSpw;
86 unsigned int nbPacketsTransmittedToSpw;
89 unsigned int nbPacketsTransmittedToSpw;
87 unsigned int nbCCSDSPacketsTransmittedToSpw;
90 unsigned int nbCCSDSPacketsTransmittedToSpw;
91 FakeStardundeeSpwUsbGui driverStatus;
88 };
92 };
89
93
90 #endif // STARDUNDEEGUI_H
94 #endif // STARDUNDEEGUI_H
@@ -1,5 +1,5
1 <RCC>
1 <RCC>
2 <qresource prefix="/imgs">
2 <qresource prefix="/imgs">
3 <file>StarDundee/stardundee.tif</file>
3 <file alias="stardundee.tif">StarDundee/stardundee.tif</file>
4 </qresource>
4 </qresource>
5 </RCC>
5 </RCC>
@@ -80,6 +80,7 void spwplugin::bridgeSelectionChanged(c
80 if(this->bridge!=NULL)
80 if(this->bridge!=NULL)
81 {
81 {
82 this->mainLayout->removeWidget(this->bridge->getGUI());
82 this->mainLayout->removeWidget(this->bridge->getGUI());
83 this->bridge->getGUI()->hide();
83 this->disconnect(this,SLOT(setConnected(bool)));
84 this->disconnect(this,SLOT(setConnected(bool)));
84 delete this->bridge;
85 delete this->bridge;
85 this->bridge= NULL;
86 this->bridge= NULL;
@@ -90,6 +91,7 void spwplugin::bridgeSelectionChanged(c
90 if(this->bridge!=NULL)
91 if(this->bridge!=NULL)
91 {
92 {
92 this->mainLayout->removeWidget(this->bridge->getGUI());
93 this->mainLayout->removeWidget(this->bridge->getGUI());
94 this->bridge->getGUI()->hide();
93 this->disconnect(this,SLOT(setConnected(bool)));
95 this->disconnect(this,SLOT(setConnected(bool)));
94 delete this->bridge;
96 delete this->bridge;
95 }
97 }
@@ -130,6 +132,7 void spwplugin::bridgeSelectionChanged(c
130 if(this->bridge!=NULL)
132 if(this->bridge!=NULL)
131 {
133 {
132 this->mainLayout->removeWidget(this->bridge->getGUI());
134 this->mainLayout->removeWidget(this->bridge->getGUI());
135 this->bridge->getGUI()->hide();
133 this->disconnect(this,SLOT(setConnected(bool)));
136 this->disconnect(this,SLOT(setConnected(bool)));
134 delete this->bridge;
137 delete this->bridge;
135 }
138 }
@@ -12,7 +12,7 QMAKE_CFLAGS += -std=c++11
12
12
13 win32:CONFIG += dll
13 win32:CONFIG += dll
14 win32:CONFIG -= static
14 win32:CONFIG -= static
15 VERSION=0.6.0
15 VERSION=0.6.1
16 TARGET = spwplugin
16 TARGET = spwplugin
17 DEFINES += PLUGIN=spwplugin
17 DEFINES += PLUGIN=spwplugin
18 DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\"
18 DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\"
@@ -46,7 +46,8 HEADERS += \
46 GR-ESB/gr_esb_bridge.h \
46 GR-ESB/gr_esb_bridge.h \
47 GR-ESB/gr_esb_ui.h \
47 GR-ESB/gr_esb_ui.h \
48 SpwTcpPacketServer/incomingpacketparser.h \
48 SpwTcpPacketServer/incomingpacketparser.h \
49 StarDundee/fakestardundeespwusb_lib.h
49 StarDundee/fakestardundeespwusb_lib.h \
50 StarDundee/fakestardundeespwusbgui.h
50
51
51
52
52 SOURCES += \
53 SOURCES += \
@@ -58,12 +59,14 SOURCES += \
58 GR-ESB/gr_esb_bridge.cpp \
59 GR-ESB/gr_esb_bridge.cpp \
59 GR-ESB/gr_esb_ui.cpp \
60 GR-ESB/gr_esb_ui.cpp \
60 SpwTcpPacketServer/incomingpacketparser.cpp \
61 SpwTcpPacketServer/incomingpacketparser.cpp \
61 StarDundee/fakestardundeespwusb_lib.cpp
62 StarDundee/fakestardundeespwusb_lib.cpp \
63 StarDundee/fakestardundeespwusbgui.cpp
62
64
63 FORMS += \
65 FORMS += \
64 StarDundee/stardundeeGUI.ui \
66 StarDundee/stardundeeGUI.ui \
65 SpwTcpPacketServer/spwtcppacketserver.ui \
67 SpwTcpPacketServer/spwtcppacketserver.ui \
66 GR-ESB/gr_esb_ui.ui
68 GR-ESB/gr_esb_ui.ui \
69 StarDundee/fakestardundeespwusbgui.ui
67
70
68 RESOURCES += \
71 RESOURCES += \
69 spwRessources.qrc
72 spwRessources.qrc
General Comments 0
You need to be logged in to leave comments. Login now