##// 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>
@@ -1,653 +1,665
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the SocExplorer Software
3 3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 3 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 22 #include "fakestardundeespwusb_lib.h"
23 23 #include <QDebug>
24 24
25 25
26 26 char (*resolved_USBSpaceWire_Open)(star_device_handle *phDevice, int nDeviceNum)=NULL;
27 27 void (*resolved_USBSpaceWire_Close)(star_device_handle hDevice)=NULL;
28 28 U32 (*resolved_USBSpaceWire_ListDevices)()=NULL;
29 29 char (*resolved_USBSpaceWire_GetSerialNumber)(star_device_handle hDevice, U8 pSerialNumber[11])=NULL;
30 30 void (*resolved_USBSpaceWire_EnableNetworkMode)(star_device_handle hDevice, char enable)=NULL;
31 31 char (*resolved_USBSpaceWire_RegisterReceiveOnAllPorts)(star_device_handle hDevice)=NULL;
32 32 char (*resolved_USBSpaceWire_UnregisterReceiveOnAllPorts)(star_device_handle hDevice)=NULL;
33 33 char (*resolved_USBSpaceWire_ClearEndpoints)(star_device_handle hDevice)=NULL;
34 34 void (*resolved_USBSpaceWire_SetTimeout)(star_device_handle hDevice, double timeout)=NULL;
35 35 char (*resolved_USBSpaceWire_TC_Reset)(star_device_handle hDevice)=NULL;
36 36 char (*resolved_USBSpaceWire_TC_EnableExternalTimecodeSelection)(star_device_handle hDevice,char enable)=NULL;
37 37 U32 (*resolved_USBSpaceWire_TC_GetClockFrequency)(star_device_handle hDevice)=NULL;
38 38 char (*resolved_USBSpaceWire_TC_SetAutoTickInFrequency)(star_device_handle hDevice, U32 frequency)=NULL;
39 39 char (*resolved_USBSpaceWire_TC_EnableAutoTickIn)(star_device_handle hDevice, char enableAutoTickIns, char enableAllPorts)=NULL;
40 40 char (*resolved_USBSpaceWire_TC_PerformTickIn)(star_device_handle hDevice, U8 timein)=NULL;
41 41 U32 (*resolved_USBSpaceWire_GetDriverSendBufferSize)(star_device_handle hDevice)=NULL;
42 42 U32 (*resolved_USBSpaceWire_GetDriverReadBufferSize)(star_device_handle hDevice)=NULL;
43 43 char (*resolved_USBSpaceWire_IsReadThrottling)(star_device_handle hDevice)=NULL;
44 44
45 45 char (*resolved_USBSpaceWire_WaitOnReadPacketAvailable)(star_device_handle hDevice, double timeout)=NULL;
46 46 USB_SPACEWIRE_STATUS (*resolved_USBSpaceWire_SendPacket)(star_device_handle hDevice, void *pBuffer, U32 nBufferSize, char bWait,USB_SPACEWIRE_ID *identifier)=NULL;
47 47 char (*resolved_USBSpaceWire_FreeSend)(star_device_handle hDevice, USB_SPACEWIRE_ID identifier)=NULL;
48 48 USB_SPACEWIRE_STATUS (*resolved_USBSpaceWire_ReadPackets)(star_device_handle hDevice, void *pBuffer, U32 nBufferSize,U32 nPacketNum, char bWait, PUSB_SPACEWIRE_PACKET_PROPERTIES properties,USB_SPACEWIRE_ID *identifier)=NULL;
49 49 char (*resolved_USBSpaceWire_FreeRead)(star_device_handle hDevice, USB_SPACEWIRE_ID identifier)=NULL;
50 50 SPACEWIRE_TRAFFIC_TYPE (*resolved_USBSpaceWire_GetReadTrafficType)(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties, U32 nPacketNum)=NULL;
51 51 USB_SPACEWIRE_EOP_TYPE (*resolved_USBSpaceWire_GetReadEOPStatus)(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties,U32 nPacketNum)=NULL;
52 52
53 53 void (*resolved_CFGSpaceWire_EnableRMAP)(char useRMAP)=NULL;
54 54 void (*resolved_CFGSpaceWire_SetRMAPDestinationKey)(U8 destinationKey)=NULL;
55 55 void (*resolved_CFGSpaceWire_StackClear)(void)=NULL;
56 56 void (*resolved_CFGSpaceWire_AddrStackPush)(U8 dwAddress)=NULL;
57 57 void (*resolved_CFGSpaceWire_RetAddrStackPush)(U8 dwAddress)=NULL;
58 58 int (*resolved_CFGSpaceWire_SetBrickBaseTransmitRate)(star_device_handle hDevice, U32 dwBaseClk, U32 dwBaseDvdr, U32 dwEnableClk)=NULL;
59 59 int (*resolved_CFGSpaceWire_GetLinkStatusControl)(star_device_handle hDevice, U32 dwLinkNum, U32 *dwStatusControl)=NULL;
60 60 void (*resolved_CFGSpaceWire_LSEnableAutoStart)(U32 *dwStatusControl, char bEnabled)=NULL;
61 61 void (*resolved_CFGSpaceWire_LSEnableStart)(U32 *dwStatusControl, char bEnabled)=NULL;
62 62 void (*resolved_CFGSpaceWire_LSEnableDisabled)(U32 *dwStatusControl, char bEnabled)=NULL;
63 63 void (*resolved_CFGSpaceWire_LSEnableTristate)(U32 *dwStatusControl, char bEnabled)=NULL;
64 64 void (*resolved_CFGSpaceWire_LSPortType)(U32 dwStatusControl, U32 *dwPortType)=NULL;
65 65 void (*resolved_CFGSpaceWire_LSSetOperatingSpeed)(U32 *dwStatusControl, U32 dwOperatingSpeed)=NULL;
66 66 void (*resolved_CFGSpaceWire_LSConfigErrorStatus)(U32 dwStatusControl, U32 *dwErrorStatus)=NULL;
67 67 void (*resolved_CFGSpaceWire_LSExternalErrorStatus)(U32 dwStatusControl, U32 *dwErrorStatus)=NULL;
68 68 void (*resolved_CFGSpaceWire_LSErrorStatus)(U32 dwStatusControl, U32 *dwErrorStatus)=NULL;
69 69 void (*resolved_CFGSpaceWire_LSLinkState)(U32 dwStatusControl, U32 *dwLinkStatus)=NULL;
70 70 void (*resolved_CFGSpaceWire_LSIsLinkRunning)(U32 dwStatusControl, char *isLinkRunning)=NULL;
71 71 void (*resolved_CFGSpaceWire_LSIsAutoStart)(U32 dwStatusControl, char *isAutoStart)=NULL;
72 72 void (*resolved_CFGSpaceWire_LSIsStart)(U32 dwStatusControl, char *isStart)=NULL;
73 73 void (*resolved_CFGSpaceWire_LSIsDisabled)(U32 dwStatusControl, char *isDisabled)=NULL;
74 74 void (*resolved_CFGSpaceWire_LSIsTristate)(U32 dwStatusControl, char *isTristate)=NULL;
75 75 void (*resolved_CFGSpaceWire_LSOperatingSpeed)(U32 dwStatusControl, U32 *dwOperatingSpeed)=NULL;
76 76 void (*resolved_CFGSpaceWire_LSOutputPortConnection)(U32 dwStatusControl, U32 *dwOutputPortConnection)=NULL;
77 77 int (*resolved_CFGSpaceWire_SetLinkStatusControl)(star_device_handle hDevice, U32 dwLinkNum, U32 dwStatusControl)=NULL;
78 78 int (*resolved_CFGSpaceWire_SetAsInterface)(star_device_handle hDevice, char bEnabled, char bAddIdentifier)=NULL;
79 79 int (*resolved_CFGSpaceWire_ClearRoutingTableEntry)(star_device_handle hDevice, U32 nLogicalAddress)=NULL;
80 80 void (*resolved_CFGSpaceWire_RTBuildRoutingTableEntry)(U32 *dwRoutingTableEntry,U32 dwOutputPorts, char bDelHead, char bPriority)=NULL;
81 81 int (*resolved_CFGSpaceWire_SetRoutingTableEntry)(star_device_handle hDevice, U32 nLogicalAddress, U32 dwRoutingTableEntry)=NULL;
82 82 int (*resolved_CFGSpaceWire_GetRoutingTableEntry)(star_device_handle hDevice, U32 nLogicalAddress, U32 *dwRoutingTableEntry)=NULL;
83 83 void (*resolved_CFGSpaceWire_RTIsEnabled)(U32 dwRoutingTableEntry, char *bEnabled)=NULL;
84 84 void (*resolved_CFGSpaceWire_RTIsDelHead)(U32 dwRoutingTableEntry, char *bDelHead)=NULL;
85 85 void (*resolved_CFGSpaceWire_RTIsPriority)(U32 dwRoutingTableEntry, char *bPriority)=NULL;
86 86 void (*resolved_CFGSpaceWire_RTGetOutputPorts)(U32 dwRoutingTableEntry, U32 *dwOutputPorts)=NULL;
87 87 int (*resolved_CFGSpaceWire_GetTickEnableStatus)(star_device_handle hDevice, U32 *dwTickEnableStatus)=NULL;
88 88 int (*resolved_CFGSpaceWire_SetTickEnableStatus)(star_device_handle hDevice, U32 dwTickEnableStatus)=NULL;
89 89
90 90
91 typedef struct funcToresolve
92 {
93 void (** function)();
94 const char* symbolName;
95 }funcToresolve;
91
96 92
97 93 QList<funcToresolve> funcTable=QList<funcToresolve>()
98 94 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_Open,"USBSpaceWire_Open"}
99 95 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_Close,"USBSpaceWire_Close"}
100 96 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_ListDevices,"USBSpaceWire_ListDevices"}
101 97 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_GetSerialNumber,"USBSpaceWire_GetSerialNumber"}
102 98 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_EnableNetworkMode,"USBSpaceWire_EnableNetworkMode"}
103 99 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_RegisterReceiveOnAllPorts,"USBSpaceWire_RegisterReceiveOnAllPorts"}
104 100 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_UnregisterReceiveOnAllPorts,"USBSpaceWire_UnregisterReceiveOnAllPorts"}
105 101 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_ClearEndpoints,"USBSpaceWire_ClearEndpoints"}
106 102 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_SetTimeout,"USBSpaceWire_SetTimeout"}
107 103 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_Reset,"USBSpaceWire_TC_Reset"}
108 104 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_EnableExternalTimecodeSelection,"USBSpaceWire_TC_EnableExternalTimecodeSelection"}
109 105 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_GetClockFrequency,"USBSpaceWire_TC_GetClockFrequency"}
110 106 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_SetAutoTickInFrequency,"USBSpaceWire_TC_SetAutoTickInFrequency"}
111 107 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_EnableAutoTickIn,"USBSpaceWire_TC_EnableAutoTickIn"}
112 108 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_TC_PerformTickIn,"USBSpaceWire_TC_PerformTickIn"}
113 109 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_GetDriverSendBufferSize,"USBSpaceWire_GetDriverSendBufferSize"}
114 110 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_GetDriverReadBufferSize,"USBSpaceWire_GetDriverReadBufferSize"}
115 111 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_IsReadThrottling,"USBSpaceWire_IsReadThrottling"}
116 112 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_WaitOnReadPacketAvailable,"USBSpaceWire_WaitOnReadPacketAvailable"}
117 113 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_SendPacket,"USBSpaceWire_SendPacket"}
118 114 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_FreeSend,"USBSpaceWire_FreeSend"}
119 115 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_ReadPackets,"USBSpaceWire_ReadPackets"}
120 116 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_FreeRead,"USBSpaceWire_FreeRead"}
121 117 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_GetReadTrafficType,"USBSpaceWire_GetReadTrafficType"}
122 118 <<funcToresolve{(void (**)())&resolved_USBSpaceWire_GetReadEOPStatus,"USBSpaceWire_GetReadEOPStatus"}
123 119 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_EnableRMAP,"CFGSpaceWire_EnableRMAP"}
124 120 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetRMAPDestinationKey,"CFGSpaceWire_SetRMAPDestinationKey"}
125 121 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_StackClear,"CFGSpaceWire_StackClear"}
126 122 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_AddrStackPush,"CFGSpaceWire_AddrStackPush"}
127 123 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RetAddrStackPush,"CFGSpaceWire_RetAddrStackPush"}
128 124 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetBrickBaseTransmitRate,"CFGSpaceWire_SetBrickBaseTransmitRate"}
129 125 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_GetLinkStatusControl,"CFGSpaceWire_GetLinkStatusControl"}
130 126 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSEnableAutoStart,"CFGSpaceWire_LSEnableAutoStart"}
131 127 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSEnableStart,"CFGSpaceWire_LSEnableStart"}
132 128 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSEnableDisabled,"CFGSpaceWire_LSEnableDisabled"}
133 129 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSEnableTristate,"CFGSpaceWire_LSEnableTristate"}
134 130 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSPortType,"CFGSpaceWire_LSPortType"}
135 131 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSSetOperatingSpeed,"CFGSpaceWire_LSSetOperatingSpeed"}
136 132 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSConfigErrorStatus,"CFGSpaceWire_LSConfigErrorStatus"}
137 133 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSExternalErrorStatus,"CFGSpaceWire_LSExternalErrorStatus"}
138 134 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSErrorStatus,"CFGSpaceWire_LSErrorStatus"}
139 135 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSLinkState,"CFGSpaceWire_LSLinkState"}
140 136 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSIsLinkRunning,"CFGSpaceWire_LSIsLinkRunning"}
141 137 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSIsAutoStart,"CFGSpaceWire_LSIsAutoStart"}
142 138 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSIsStart,"CFGSpaceWire_LSIsStart"}
143 139 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSIsDisabled,"CFGSpaceWire_LSIsDisabled"}
144 140 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSIsTristate,"CFGSpaceWire_LSIsTristate"}
145 141 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSOperatingSpeed,"CFGSpaceWire_LSOperatingSpeed"}
146 142 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_LSOutputPortConnection,"CFGSpaceWire_LSOutputPortConnection"}
147 143 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetLinkStatusControl,"CFGSpaceWire_SetLinkStatusControl"}
148 144 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetAsInterface,"CFGSpaceWire_SetAsInterface"}
149 145 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_ClearRoutingTableEntry,"CFGSpaceWire_ClearRoutingTableEntry"}
150 146 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RTBuildRoutingTableEntry,"CFGSpaceWire_RTBuildRoutingTableEntry"}
151 147 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetRoutingTableEntry,"CFGSpaceWire_SetRoutingTableEntry"}
152 148 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_GetRoutingTableEntry,"CFGSpaceWire_GetRoutingTableEntry"}
153 149 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RTIsEnabled,"CFGSpaceWire_RTIsEnabled"}
154 150 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RTIsDelHead,"CFGSpaceWire_RTIsDelHead"}
155 151 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RTIsPriority,"CFGSpaceWire_RTIsPriority"}
156 152 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_RTGetOutputPorts,"CFGSpaceWire_RTGetOutputPorts"}
157 153 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_GetTickEnableStatus,"CFGSpaceWire_GetTickEnableStatus"}
158 154 <<funcToresolve{(void (**)())&resolved_CFGSpaceWire_SetTickEnableStatus,"CFGSpaceWire_SetTickEnableStatus"};
159 155
160 156
161 157
162 158 FakeStarDundeeSpwUSB_Lib::FakeStarDundeeSpwUSB_Lib()
163 159 {
164 160
165 161 }
166 162
167 163 void FakeStarDundeeSpwUSB_Lib::resolve()
168 164 {
169 165 QLibrary cfgLib;
170 166 QLibrary usbLib;
171 167 usbLib.setFileName("/home/spacewire/usb/spw_usb_driver_v2.68/lib/x86_64/libSpaceWireUSBAPI.so");
172 168 cfgLib.setFileName("/home/spacewire/usb/spw_usb_driver_v2.68/lib/x86_64/libConfigLibraryUSB.so");
173 169 usbLib.load();
174 170 cfgLib.load();
175 171 if(usbLib.isLoaded()&&cfgLib.isLoaded())
176 172 {
177 173 for(int i=0;i<funcTable.count();i++)
178 174 {
179 175 QString symbolName = funcTable[i].symbolName;
180 176 if(!symbolName.contains("USBSpaceWire_"))
181 177 {
182 178 *(funcTable[i].function) = usbLib.resolve(funcTable[i].symbolName);
183 179 if(*(funcTable[i].function)==NULL)
184 180 *(funcTable[i].function) = cfgLib.resolve(funcTable[i].symbolName);
185 181 }
186 182 else
187 183 {
188 184 *(funcTable[i].function) = cfgLib.resolve(funcTable[i].symbolName);
189 185 if(*(funcTable[i].function)==NULL)
190 186 *(funcTable[i].function) = usbLib.resolve(funcTable[i].symbolName);
191 187 }
192 188 }
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 210 char USBSpaceWire_Open(star_device_handle *phDevice, int nDeviceNum)
199 211 {
200 212 if(resolved_USBSpaceWire_Open!=NULL)
201 213 return resolved_USBSpaceWire_Open(phDevice, nDeviceNum);
202 214 return 0;
203 215 }
204 216
205 217
206 218 void USBSpaceWire_Close(star_device_handle hDevice)
207 219 {
208 220 if(resolved_USBSpaceWire_Close!=NULL)
209 221 resolved_USBSpaceWire_Close(hDevice);
210 222 }
211 223
212 224
213 225 U32 USBSpaceWire_ListDevices()
214 226 {
215 227 if(resolved_USBSpaceWire_ListDevices!=NULL)
216 228 return resolved_USBSpaceWire_ListDevices();
217 229 return 0;
218 230 }
219 231
220 232
221 233 char USBSpaceWire_GetSerialNumber(star_device_handle hDevice, U8 pSerialNumber[])
222 234 {
223 235 if(resolved_USBSpaceWire_GetSerialNumber!=NULL)
224 236 return resolved_USBSpaceWire_GetSerialNumber(hDevice,pSerialNumber);
225 237 return 0;
226 238 }
227 239
228 240
229 241 void USBSpaceWire_EnableNetworkMode(star_device_handle hDevice, char enable)
230 242 {
231 243 if(resolved_USBSpaceWire_EnableNetworkMode!=NULL)
232 244 resolved_USBSpaceWire_EnableNetworkMode(hDevice,enable);
233 245 }
234 246
235 247
236 248 char USBSpaceWire_RegisterReceiveOnAllPorts(star_device_handle hDevice)
237 249 {
238 250 if(resolved_USBSpaceWire_RegisterReceiveOnAllPorts!=NULL)
239 251 return resolved_USBSpaceWire_RegisterReceiveOnAllPorts(hDevice);
240 252 return 0;
241 253 }
242 254
243 255
244 256 char USBSpaceWire_UnregisterReceiveOnAllPorts(star_device_handle hDevice)
245 257 {
246 258 if(resolved_USBSpaceWire_UnregisterReceiveOnAllPorts!=NULL)
247 259 return resolved_USBSpaceWire_UnregisterReceiveOnAllPorts(hDevice);
248 260 return 0;
249 261 }
250 262
251 263
252 264 char USBSpaceWire_ClearEndpoints(star_device_handle hDevice)
253 265 {
254 266 if(resolved_USBSpaceWire_ClearEndpoints!=NULL)
255 267 return resolved_USBSpaceWire_ClearEndpoints(hDevice);
256 268 return 0;
257 269 }
258 270
259 271
260 272 void USBSpaceWire_SetTimeout(star_device_handle hDevice, double timeout)
261 273 {
262 274 if(resolved_USBSpaceWire_SetTimeout!=NULL)
263 275 resolved_USBSpaceWire_SetTimeout(hDevice,timeout);
264 276 }
265 277
266 278
267 279 char USBSpaceWire_TC_Reset(star_device_handle hDevice)
268 280 {
269 281 if(resolved_USBSpaceWire_TC_Reset!=NULL)
270 282 return resolved_USBSpaceWire_TC_Reset(hDevice);
271 283 return 0;
272 284 }
273 285
274 286
275 287 char USBSpaceWire_TC_EnableExternalTimecodeSelection(star_device_handle hDevice, char enable)
276 288 {
277 289 if(resolved_USBSpaceWire_TC_EnableExternalTimecodeSelection!=NULL)
278 290 return resolved_USBSpaceWire_TC_EnableExternalTimecodeSelection(hDevice,enable);
279 291 return 0;
280 292 }
281 293
282 294
283 295 U32 USBSpaceWire_TC_GetClockFrequency(star_device_handle hDevice)
284 296 {
285 297 if(resolved_USBSpaceWire_TC_GetClockFrequency!=NULL)
286 298 return resolved_USBSpaceWire_TC_GetClockFrequency(hDevice);
287 299 return 0;
288 300 }
289 301
290 302
291 303 char USBSpaceWire_TC_SetAutoTickInFrequency(star_device_handle hDevice, U32 frequency)
292 304 {
293 305 if(resolved_USBSpaceWire_TC_SetAutoTickInFrequency!=NULL)
294 306 return resolved_USBSpaceWire_TC_SetAutoTickInFrequency(hDevice,frequency);
295 307 return 0;
296 308 }
297 309
298 310
299 311 char USBSpaceWire_TC_EnableAutoTickIn(star_device_handle hDevice, char enableAutoTickIns, char enableAllPorts)
300 312 {
301 313 if(resolved_USBSpaceWire_TC_EnableAutoTickIn!=NULL)
302 314 return resolved_USBSpaceWire_TC_EnableAutoTickIn(hDevice,enableAutoTickIns,enableAllPorts);
303 315 return 0;
304 316 }
305 317
306 318
307 319 char USBSpaceWire_TC_PerformTickIn(star_device_handle hDevice, U8 timein)
308 320 {
309 321 if(resolved_USBSpaceWire_TC_PerformTickIn!=NULL)
310 322 return resolved_USBSpaceWire_TC_PerformTickIn(hDevice,timein);
311 323 return 0;
312 324 }
313 325
314 326
315 327 U32 USBSpaceWire_GetDriverSendBufferSize(star_device_handle hDevice)
316 328 {
317 329 if(resolved_USBSpaceWire_GetDriverSendBufferSize!=NULL)
318 330 return resolved_USBSpaceWire_GetDriverSendBufferSize(hDevice);
319 331 return 0;
320 332 }
321 333
322 334
323 335 U32 USBSpaceWire_GetDriverReadBufferSize(star_device_handle hDevice)
324 336 {
325 337 if(resolved_USBSpaceWire_GetDriverReadBufferSize!=NULL)
326 338 return resolved_USBSpaceWire_GetDriverReadBufferSize(hDevice);
327 339 return 0;
328 340 }
329 341
330 342
331 343 char USBSpaceWire_IsReadThrottling(star_device_handle hDevice)
332 344 {
333 345 if(resolved_USBSpaceWire_IsReadThrottling!=NULL)
334 346 return resolved_USBSpaceWire_IsReadThrottling(hDevice);
335 347 return 0;
336 348 }
337 349
338 350
339 351 char USBSpaceWire_WaitOnReadPacketAvailable(star_device_handle hDevice, double timeout)
340 352 {
341 353 if(resolved_USBSpaceWire_WaitOnReadPacketAvailable!=NULL)
342 354 return resolved_USBSpaceWire_WaitOnReadPacketAvailable(hDevice,timeout);
343 355 return 0;
344 356 }
345 357
346 358
347 359 USB_SPACEWIRE_STATUS USBSpaceWire_SendPacket(star_device_handle hDevice, void *pBuffer, U32 nBufferSize, char bWait, USB_SPACEWIRE_ID *identifier)
348 360 {
349 361 if(resolved_USBSpaceWire_SendPacket!=NULL)
350 362 return resolved_USBSpaceWire_SendPacket(hDevice,pBuffer,nBufferSize,bWait,identifier);
351 363 return TRANSFER_ERROR_USB_ERROR;
352 364 }
353 365
354 366
355 367 char USBSpaceWire_FreeSend(star_device_handle hDevice, USB_SPACEWIRE_ID identifier)
356 368 {
357 369 if(resolved_USBSpaceWire_FreeSend!=NULL)
358 370 return resolved_USBSpaceWire_FreeSend(hDevice,identifier);
359 371 return 0;
360 372 }
361 373
362 374
363 375 USB_SPACEWIRE_STATUS USBSpaceWire_ReadPackets(star_device_handle hDevice, void *pBuffer, U32 nBufferSize, U32 nPacketNum, char bWait, PUSB_SPACEWIRE_PACKET_PROPERTIES properties, USB_SPACEWIRE_ID *identifier)
364 376 {
365 377 if(resolved_USBSpaceWire_ReadPackets!=NULL)
366 378 return resolved_USBSpaceWire_ReadPackets(hDevice,pBuffer,nBufferSize, nPacketNum,bWait, properties,identifier);
367 379 return TRANSFER_ERROR_USB_ERROR;
368 380 }
369 381
370 382
371 383 char USBSpaceWire_FreeRead(star_device_handle hDevice, USB_SPACEWIRE_ID identifier)
372 384 {
373 385 if(resolved_USBSpaceWire_FreeRead!=NULL)
374 386 return resolved_USBSpaceWire_FreeRead(hDevice,identifier);
375 387 return 0;
376 388 }
377 389
378 390
379 391 SPACEWIRE_TRAFFIC_TYPE USBSpaceWire_GetReadTrafficType(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties, U32 nPacketNum)
380 392 {
381 393 if(resolved_USBSpaceWire_GetReadTrafficType!=NULL)
382 394 return resolved_USBSpaceWire_GetReadTrafficType(pProperties,nPacketNum);
383 395 return SPACEWIRE_TRAFFIC_UNKNOWN;
384 396 }
385 397
386 398
387 399 USB_SPACEWIRE_EOP_TYPE USBSpaceWire_GetReadEOPStatus(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties, U32 nPacketNum)
388 400 {
389 401 if(resolved_USBSpaceWire_GetReadEOPStatus!=NULL)
390 402 return resolved_USBSpaceWire_GetReadEOPStatus(pProperties,nPacketNum);
391 403 return SPACEWIRE_USB_NO_EOP;
392 404 }
393 405
394 406
395 407 void CFGSpaceWire_EnableRMAP(char useRMAP)
396 408 {
397 409 if(resolved_CFGSpaceWire_EnableRMAP!=NULL)
398 410 resolved_CFGSpaceWire_EnableRMAP(useRMAP);
399 411 }
400 412
401 413
402 414 void CFGSpaceWire_SetRMAPDestinationKey(U8 destinationKey)
403 415 {
404 416 if(resolved_CFGSpaceWire_SetRMAPDestinationKey!=NULL)
405 417 resolved_CFGSpaceWire_SetRMAPDestinationKey(destinationKey);
406 418 }
407 419
408 420
409 421 void CFGSpaceWire_StackClear()
410 422 {
411 423 if(resolved_CFGSpaceWire_StackClear!=NULL)
412 424 resolved_CFGSpaceWire_StackClear();
413 425 }
414 426
415 427
416 428 void CFGSpaceWire_AddrStackPush(U8 dwAddress)
417 429 {
418 430 if(resolved_CFGSpaceWire_AddrStackPush!=NULL)
419 431 resolved_CFGSpaceWire_AddrStackPush(dwAddress);
420 432 }
421 433
422 434
423 435 void CFGSpaceWire_RetAddrStackPush(U8 dwAddress)
424 436 {
425 437 if(resolved_CFGSpaceWire_RetAddrStackPush!=NULL)
426 438 resolved_CFGSpaceWire_RetAddrStackPush(dwAddress);
427 439 }
428 440
429 441
430 442 int CFGSpaceWire_SetBrickBaseTransmitRate(star_device_handle hDevice, U32 dwBaseClk, U32 dwBaseDvdr, U32 dwEnableClk)
431 443 {
432 444 if(resolved_CFGSpaceWire_SetBrickBaseTransmitRate!=NULL)
433 445 return resolved_CFGSpaceWire_SetBrickBaseTransmitRate(hDevice, dwBaseClk, dwBaseDvdr, dwEnableClk);
434 446 return 0;
435 447 }
436 448
437 449
438 450 int CFGSpaceWire_GetLinkStatusControl(star_device_handle hDevice, U32 dwLinkNum, U32 *dwStatusControl)
439 451 {
440 452 if(resolved_CFGSpaceWire_GetLinkStatusControl!=NULL)
441 453 return resolved_CFGSpaceWire_GetLinkStatusControl(hDevice, dwLinkNum, dwStatusControl);
442 454 return 0;
443 455 }
444 456
445 457
446 458 void CFGSpaceWire_LSEnableAutoStart(U32 *dwStatusControl, char bEnabled)
447 459 {
448 460 if(resolved_CFGSpaceWire_LSEnableAutoStart!=NULL)
449 461 resolved_CFGSpaceWire_LSEnableAutoStart(dwStatusControl, bEnabled);
450 462 }
451 463
452 464
453 465 void CFGSpaceWire_LSEnableStart(U32 *dwStatusControl, char bEnabled)
454 466 {
455 467 if(resolved_CFGSpaceWire_LSEnableStart!=NULL)
456 468 resolved_CFGSpaceWire_LSEnableStart(dwStatusControl, bEnabled);
457 469 }
458 470
459 471
460 472 void CFGSpaceWire_LSEnableDisabled(U32 *dwStatusControl, char bEnabled)
461 473 {
462 474 if(resolved_CFGSpaceWire_LSEnableDisabled!=NULL)
463 475 resolved_CFGSpaceWire_LSEnableDisabled(dwStatusControl, bEnabled);
464 476 }
465 477
466 478
467 479 void CFGSpaceWire_LSEnableTristate(U32 *dwStatusControl, char bEnabled)
468 480 {
469 481 if(resolved_CFGSpaceWire_LSEnableTristate!=NULL)
470 482 resolved_CFGSpaceWire_LSEnableTristate(dwStatusControl, bEnabled);
471 483 }
472 484
473 485
474 486 void CFGSpaceWire_LSPortType(U32 dwStatusControl, U32 *dwPortType)
475 487 {
476 488 if(resolved_CFGSpaceWire_LSPortType!=NULL)
477 489 resolved_CFGSpaceWire_LSPortType(dwStatusControl, dwPortType);
478 490 }
479 491
480 492
481 493 void CFGSpaceWire_LSSetOperatingSpeed(U32 *dwStatusControl, U32 dwOperatingSpeed)
482 494 {
483 495 if(resolved_CFGSpaceWire_LSSetOperatingSpeed!=NULL)
484 496 resolved_CFGSpaceWire_LSSetOperatingSpeed(dwStatusControl, dwOperatingSpeed);
485 497 }
486 498
487 499
488 500 void CFGSpaceWire_LSConfigErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus)
489 501 {
490 502 if(resolved_CFGSpaceWire_LSConfigErrorStatus!=NULL)
491 503 resolved_CFGSpaceWire_LSConfigErrorStatus(dwStatusControl, dwErrorStatus);
492 504 }
493 505
494 506
495 507 void CFGSpaceWire_LSExternalErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus)
496 508 {
497 509 if(resolved_CFGSpaceWire_LSExternalErrorStatus!=NULL)
498 510 resolved_CFGSpaceWire_LSExternalErrorStatus(dwStatusControl, dwErrorStatus);
499 511 }
500 512
501 513
502 514 void CFGSpaceWire_LSErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus)
503 515 {
504 516 if(resolved_CFGSpaceWire_LSErrorStatus!=NULL)
505 517 resolved_CFGSpaceWire_LSErrorStatus(dwStatusControl, dwErrorStatus);
506 518 }
507 519
508 520
509 521 void CFGSpaceWire_LSLinkState(U32 dwStatusControl, U32 *dwLinkStatus)
510 522 {
511 523 if(resolved_CFGSpaceWire_LSLinkState!=NULL)
512 524 resolved_CFGSpaceWire_LSLinkState(dwStatusControl, dwLinkStatus);
513 525 }
514 526
515 527
516 528 void CFGSpaceWire_LSIsLinkRunning(U32 dwStatusControl, char *isLinkRunning)
517 529 {
518 530 if(resolved_CFGSpaceWire_LSIsLinkRunning!=NULL)
519 531 resolved_CFGSpaceWire_LSIsLinkRunning(dwStatusControl, isLinkRunning);
520 532 }
521 533
522 534
523 535 void CFGSpaceWire_LSIsAutoStart(U32 dwStatusControl, char *isAutoStart)
524 536 {
525 537 if(resolved_CFGSpaceWire_LSIsAutoStart!=NULL)
526 538 resolved_CFGSpaceWire_LSIsAutoStart(dwStatusControl, isAutoStart);
527 539 }
528 540
529 541
530 542 void CFGSpaceWire_LSIsStart(U32 dwStatusControl, char *isStart)
531 543 {
532 544 if(resolved_CFGSpaceWire_LSIsStart!=NULL)
533 545 resolved_CFGSpaceWire_LSIsStart(dwStatusControl, isStart);
534 546 }
535 547
536 548
537 549 void CFGSpaceWire_LSIsDisabled(U32 dwStatusControl, char *isDisabled)
538 550 {
539 551 if(resolved_CFGSpaceWire_LSIsDisabled!=NULL)
540 552 resolved_CFGSpaceWire_LSIsDisabled(dwStatusControl, isDisabled);
541 553 }
542 554
543 555
544 556 void CFGSpaceWire_LSIsTristate(U32 dwStatusControl, char *isTristate)
545 557 {
546 558 if(resolved_CFGSpaceWire_LSIsTristate!=NULL)
547 559 resolved_CFGSpaceWire_LSIsTristate(dwStatusControl, isTristate);
548 560 }
549 561
550 562
551 563 void CFGSpaceWire_LSOperatingSpeed(U32 dwStatusControl, U32 *dwOperatingSpeed)
552 564 {
553 565 if(resolved_CFGSpaceWire_LSOperatingSpeed!=NULL)
554 566 resolved_CFGSpaceWire_LSOperatingSpeed(dwStatusControl, dwOperatingSpeed);
555 567 }
556 568
557 569
558 570 void CFGSpaceWire_LSOutputPortConnection(U32 dwStatusControl, U32 *dwOutputPortConnection)
559 571 {
560 572 if(resolved_CFGSpaceWire_LSOutputPortConnection!=NULL)
561 573 resolved_CFGSpaceWire_LSOutputPortConnection(dwStatusControl, dwOutputPortConnection);
562 574 }
563 575
564 576
565 577 int CFGSpaceWire_SetLinkStatusControl(star_device_handle hDevice, U32 dwLinkNum, U32 dwStatusControl)
566 578 {
567 579 if(resolved_CFGSpaceWire_SetLinkStatusControl!=NULL)
568 580 return resolved_CFGSpaceWire_SetLinkStatusControl(hDevice, dwLinkNum, dwStatusControl);
569 581 return 0;
570 582 }
571 583
572 584
573 585 int CFGSpaceWire_SetAsInterface(star_device_handle hDevice, char bEnabled, char bAddIdentifier)
574 586 {
575 587 if(resolved_CFGSpaceWire_SetAsInterface!=NULL)
576 588 return resolved_CFGSpaceWire_SetAsInterface(hDevice, bEnabled, bAddIdentifier);
577 589 return 0;
578 590 }
579 591
580 592
581 593 int CFGSpaceWire_ClearRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress)
582 594 {
583 595 if(resolved_CFGSpaceWire_ClearRoutingTableEntry!=NULL)
584 596 return resolved_CFGSpaceWire_ClearRoutingTableEntry(hDevice,nLogicalAddress);
585 597 return 0;
586 598 }
587 599
588 600
589 601 void CFGSpaceWire_RTBuildRoutingTableEntry(U32 *dwRoutingTableEntry, U32 dwOutputPorts, char bDelHead, char bPriority)
590 602 {
591 603 if(resolved_CFGSpaceWire_RTBuildRoutingTableEntry!=NULL)
592 604 resolved_CFGSpaceWire_RTBuildRoutingTableEntry(dwRoutingTableEntry, dwOutputPorts, bDelHead, bPriority);
593 605 }
594 606
595 607
596 608 int CFGSpaceWire_SetRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress, U32 dwRoutingTableEntry)
597 609 {
598 610 if(resolved_CFGSpaceWire_SetRoutingTableEntry!=NULL)
599 611 return resolved_CFGSpaceWire_SetRoutingTableEntry(hDevice,nLogicalAddress, dwRoutingTableEntry);
600 612 return 0;
601 613 }
602 614
603 615
604 616 int CFGSpaceWire_GetRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress, U32 *dwRoutingTableEntry)
605 617 {
606 618 if(resolved_CFGSpaceWire_GetRoutingTableEntry!=NULL)
607 619 return resolved_CFGSpaceWire_GetRoutingTableEntry(hDevice,nLogicalAddress, dwRoutingTableEntry);
608 620 return 0;
609 621 }
610 622
611 623
612 624 void CFGSpaceWire_RTIsEnabled(U32 dwRoutingTableEntry, char *bEnabled)
613 625 {
614 626 if(resolved_CFGSpaceWire_RTIsEnabled!=NULL)
615 627 resolved_CFGSpaceWire_RTIsEnabled( dwRoutingTableEntry, bEnabled);
616 628 }
617 629
618 630
619 631 void CFGSpaceWire_RTIsDelHead(U32 dwRoutingTableEntry, char *bDelHead)
620 632 {
621 633 if(resolved_CFGSpaceWire_RTIsDelHead!=NULL)
622 634 resolved_CFGSpaceWire_RTIsDelHead( dwRoutingTableEntry, bDelHead);
623 635 }
624 636
625 637
626 638 void CFGSpaceWire_RTIsPriority(U32 dwRoutingTableEntry, char *bPriority)
627 639 {
628 640 if(resolved_CFGSpaceWire_RTIsPriority!=NULL)
629 641 resolved_CFGSpaceWire_RTIsPriority( dwRoutingTableEntry, bPriority);
630 642 }
631 643
632 644
633 645 void CFGSpaceWire_RTGetOutputPorts(U32 dwRoutingTableEntry, U32 *dwOutputPorts)
634 646 {
635 647 if(resolved_CFGSpaceWire_RTGetOutputPorts!=NULL)
636 648 resolved_CFGSpaceWire_RTGetOutputPorts( dwRoutingTableEntry, dwOutputPorts);
637 649 }
638 650
639 651
640 652 int CFGSpaceWire_GetTickEnableStatus(star_device_handle hDevice, U32 *dwTickEnableStatus)
641 653 {
642 654 if(resolved_CFGSpaceWire_GetTickEnableStatus!=NULL)
643 655 return resolved_CFGSpaceWire_GetTickEnableStatus( hDevice, dwTickEnableStatus);
644 656 return 0;
645 657 }
646 658
647 659
648 660 int CFGSpaceWire_SetTickEnableStatus(star_device_handle hDevice, U32 dwTickEnableStatus)
649 661 {
650 662 if(resolved_CFGSpaceWire_SetTickEnableStatus!=NULL)
651 663 return resolved_CFGSpaceWire_SetTickEnableStatus( hDevice, dwTickEnableStatus);
652 664 return 0;
653 665 }
@@ -1,372 +1,378
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the SocExplorer Software
3 3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 3 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 22 #ifndef FAKESTARDUNDEESPWUSB_LIB_H
23 23 #define FAKESTARDUNDEESPWUSB_LIB_H
24 24
25 25 typedef void *star_device_handle;
26 26 typedef void * USB_SPACEWIRE_ID;
27 27 typedef unsigned char U8;
28 28 typedef unsigned int U32;
29 29 //#include <spw_usb_api.h>
30 30 //#include <spw_config_library.h>
31 31 #include <QLibrary>
32 32
33 33
34 34 /* Possible bit values */
35 35 #define BIT0 (0x00000001)
36 36 #define BIT1 (0x00000002)
37 37 #define BIT2 (0x00000004)
38 38 #define BIT3 (0x00000008)
39 39 #define BIT4 (0x00000010)
40 40 #define BIT5 (0x00000020)
41 41 #define BIT6 (0x00000040)
42 42 #define BIT7 (0x00000080)
43 43 #define BIT8 (0x00000100)
44 44 #define BIT9 (0x00000200)
45 45 #define BIT10 (0x00000400)
46 46 #define BIT11 (0x00000800)
47 47 #define BIT12 (0x00001000)
48 48 #define BIT13 (0x00002000)
49 49 #define BIT14 (0x00004000)
50 50 #define BIT15 (0x00008000)
51 51 #define BIT16 (0x00010000)
52 52 #define BIT17 (0x00020000)
53 53 #define BIT18 (0x00040000)
54 54 #define BIT19 (0x00080000)
55 55 #define BIT20 (0x00100000)
56 56 #define BIT21 (0x00200000)
57 57 #define BIT22 (0x00400000)
58 58 #define BIT23 (0x00800000)
59 59 #define BIT24 (0x01000000)
60 60 #define BIT25 (0x02000000)
61 61 #define BIT26 (0x04000000)
62 62 #define BIT27 (0x08000000)
63 63 #define BIT28 (0x10000000)
64 64 #define BIT29 (0x20000000)
65 65 #define BIT30 (0x40000000)
66 66 #define BIT31 (0x80000000)
67 67
68 68 /* SpaceWire Port errors */
69 69 #define CFG_SPACEWIRE_NO_ERRORS (0)
70 70 #define CFG_SPACEWIRE_ERROR_ACTIVE (BIT0)
71 71 #define CFG_SPACEWIRE_PACKET_ADDRESS_ERROR (BIT1)
72 72 #define CFG_SPACEWIRE_PORT_TIMEOUT_ERROR (BIT2)
73 73 #define CFG_SPACEWIRE_DISCONNECT_ERROR (BIT3)
74 74 #define CFG_SPACEWIRE_PARITY_ERROR (BIT4)
75 75 #define CFG_SPACEWIRE_ESCAPE_ERROR (BIT5)
76 76 #define CFG_SPACEWIRE_CREDIT_ERROR (BIT6)
77 77 #define CFG_SPACEWIRE_CHARACTER_SEQUENCE_ERROR (BIT7)
78 78 #define CFG_SPACEWIRE_ERROR_BITS (BIT0 | BIT1 | BIT2 | BIT3 | \
79 79 BIT4 | BIT5 | BIT6 | BIT7)
80 80
81 81 /* Config Port errors */
82 82 #define CFG_CONFIG_NO_ERRORS (0)
83 83 #define CFG_CONFIG_ERROR_ACTIVE (BIT0)
84 84
85 85 /* Config Port errors (non-RMAP) */
86 86 #define CFG_CONFIG_PACKET_ADDRESS_ERROR (BIT1)
87 87 #define CFG_CONFIG_PORT_TIMEOUT_ERROR (BIT2)
88 88 #define CFG_CONFIG_CHECKSUM_ERROR (BIT3)
89 89 #define CFG_CONFIG_TOO_SHORT_ERROR (BIT4)
90 90 #define CFG_CONFIG_TOO_LONG_ERROR (BIT5)
91 91 #define CFG_CONFIG_PACKET_EEP_ERROR (BIT6)
92 92 #define CFG_CONFIG_PROTOCOL_BYTE_ERROR (BIT7)
93 93 #define CFG_CONFIG_INVALID_REGISTER_ERROR (BIT8)
94 94 #define CFG_CONFIG_ERROR_BITS (BIT0 | BIT1 | BIT2 | BIT3 | \
95 95 BIT4 | BIT5 | BIT6 | BIT7 | \
96 96 BIT8)
97 97
98 98 /* Config Port errors (RMAP) */
99 99 #define CFG_CONFIG_RMAP_PORT_TIMEOUT_ERROR (BIT1)
100 100 #define CFG_CONFIG_RMAP_INVALID_HEADER_CRC (BIT2)
101 101 #define CFG_CONFIG_RMAP_INVALID_DATA_CRC (BIT3)
102 102 #define CFG_CONFIG_RMAP_INVALID_DESTINATION_KEY (BIT4)
103 103 #define CFG_CONFIG_RMAP_COMMAND_NOT_IMPLEMENTED (BIT5)
104 104 #define CFG_CONFIG_RMAP_INVALID_DATA_LENGTH (BIT6)
105 105 #define CFG_CONFIG_RMAP_INVALID_RMW_DATA_LENGTH (BIT7)
106 106 #define CFG_CONFIG_RMAP_INVALID_DESTINATION_ADDRESS (BIT8)
107 107 #define CFG_CONFIG_RMAP_EARLY_EOP (BIT9)
108 108 #define CFG_CONFIG_RMAP_LATE_EOP (BIT10)
109 109 #define CFG_CONFIG_RMAP_EARLY_EEP (BIT11)
110 110 #define CFG_CONFIG_RMAP_LATE_EEP (BIT12)
111 111 #define CFG_CONFIG_RMAP_VERIFY_BUFFER_OVERRUN_ERROR (BIT13)
112 112 #define CFG_CONFIG_RMAP_INVALID_REGISTER_ADDRESS (BIT14)
113 113 #define CFG_CONFIG_RMAP_UNSUPPORTED_PROTOCOL_ERROR (BIT15)
114 114 #define CFG_CONFIG_RMAP_SOURCE_LOGICAL_ADDRESS_ERROR (BIT16)
115 115 #define CFG_CONFIG_RMAP_SOURCE_PATH_ADDRESS_ERROR (BIT17)
116 116 #define CFG_CONFIG_RMAP_CARGO_TOO_LARGE (BIT18)
117 117 #define CFG_CONFIG_RMAP_UNUSED_COMMAND_OR_PACKET_TYPE (BIT19)
118 118 #define CFG_CONFIG_RMAP_ERROR_BITS (BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | \
119 119 BIT5 | BIT6 | BIT7 | BIT8 | BIT9 | \
120 120 BIT10 | BIT11 | BIT12 | BIT13 | \
121 121 BIT14 | BIT15 | BIT16 | BIT17 | \
122 122 BIT18 | BIT19)
123 123
124 124 /* External Port errors */
125 125 #define CFG_EXTERNAL_NO_ERRORS (0)
126 126 #define CFG_EXTERNAL_ERROR_ACTIVE (BIT0)
127 127 #define CFG_EXTERNAL_PACKET_ADDRESS_ERROR (BIT1)
128 128 #define CFG_EXTERNAL_PORT_TIMEOUT_ERROR (BIT2)
129 129 #define CFG_EXTERNAL_INPUT_BUFFER_EMPTY_ERROR (BIT3)
130 130 #define CFG_EXTERNAL_INPUT_BUFFER_FULL_ERROR (BIT4)
131 131 #define CFG_EXTERNAL_OUTPUT_BUFFER_EMPTY_ERROR (BIT5)
132 132 #define CFG_EXTERNAL_OUTPUT_BUFFER_FULL_ERROR (BIT6)
133 133 #define CFG_EXTERNAL_ERROR_BITS (BIT0 | BIT1 | BIT2 | BIT3 | \
134 134 BIT4 | BIT5 | BIT6)
135 135
136 136 /* SpaceWire Port interface state */
137 137 #define CFG_SPACEWIRE_ERROR_RESET (0)
138 138 #define CFG_SPACEWIRE_ERROR_WAIT (BIT0)
139 139 #define CFG_SPACEWIRE_READY (BIT1)
140 140 #define CFG_SPACEWIRE_STARTED (BIT1 | BIT0)
141 141 #define CFG_SPACEWIRE_CONNECTING (BIT2)
142 142 #define CFG_SPACEWIRE_RUN (BIT2 | BIT0)
143 143
144 144 /* Port type */
145 145 #define CFG_CONFIGURATION_PORT (0)
146 146 #define CFG_SPACEWIRE_SERIAL_PORT (BIT0)
147 147 #define CFG_SPACEWIRE_EXTERNAL_PORT (BIT1)
148 148
149 149 /* SpaceWire Port control bits */
150 150 #define CFG_SPACEWIRE_INTERFACE_STATE_START (8)
151 151 #define CFG_SPACEWIRE_INTERFACE_STATE (BIT8 | BIT9 | BIT10)
152 152 #define CFG_SPACEWIRE_RUNNING (BIT11)
153 153 #define CFG_SPACEWIRE_AUTOSTART (BIT12)
154 154 #define CFG_SPACEWIRE_START (BIT13)
155 155 #define CFG_SPACEWIRE_DISABLE (BIT14)
156 156 #define CFG_SPACEWIRE_TRISTATE (BIT15)
157 157 #define CFG_SPACEWIRE_RATE (BIT16 | BIT17 | BIT18 | \
158 158 BIT19 | BIT20 | BIT21 | BIT22)
159 159 #define CFG_SPACEWIRE_RATE_START (16)
160 160
161 161 /* Bits in the GAR Table */
162 162 #define CFG_GAR_OUTPUT_PORTS_START (1)
163 163 #define CFG_GAR_OUTPUT_PORTS (BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | \
164 164 BIT6 | BIT7 | BIT8 | BIT9 | BIT10 | BIT11 | BIT12 | BIT13 | BIT14 | \
165 165 BIT15 | BIT16 | BIT17 | BIT18 | BIT19 | BIT20 | BIT21 | BIT22 | \
166 166 BIT23 | BIT24 | BIT25 | BIT26 | BIT27 | BIT28)
167 167 #define CFG_GAR_DEL_HEAD (BIT29)
168 168 #define CFG_GAR_PRIORITY (BIT30)
169 169 #define CFG_GAR_INVALID_ADDR (BIT31)
170 170
171 171 /* Bits in the router control register */
172 172 #define CFG_RC_TIMEOUT_ENABLE_START (0)
173 173 #define CFG_RC_TIMEOUT_ENABLE (BIT0)
174 174 #define CFG_RC_TIMEOUT_VALUE_START (1)
175 175 #define CFG_RC_TIMEOUT_VALUE (BIT1 | BIT2 | BIT3)
176 176 #define CFG_RC_DISABLE_ON_SILENCE (BIT4)
177 177 #define CFG_RC_DISABLE_ON_SILENCE_START (4)
178 178 #define CFG_RC_START_ON_REQUEST (BIT5)
179 179 #define CFG_RC_START_ON_REQUEST_START (5)
180 180 #define CFG_RC_SELF_ADDRESSING (BIT6)
181 181 #define CFG_RC_SELF_ADDRESSING_START (6)
182 182 #define CFG_RC_INTERFACE (BIT7)
183 183 #define CFG_RC_INTERFACE_START (7)
184 184 #define CFG_RC_INTERFACE_IDENT (BIT8)
185 185 #define CFG_RC_INTERFACE_IDENT_START (8)
186 186
187 187 /* The bits shared by all ports */
188 188 #define CFG_PORT_CONNECTION (BIT24 | BIT25 | BIT26 | BIT27 | BIT28)
189 189 #define CFG_PORT_CONNECTION_START (24)
190 190 #define CFG_PORT_TYPE (BIT29 | BIT30 | BIT31)
191 191 #define CFG_PORT_TYPE_START (29)
192 192
193 193 /* Network discovery register values */
194 194 #define CFG_NETD_TYPE (BIT0 | BIT1 | BIT2 | BIT3)
195 195 #define CFG_NETD_TYPE_START (0)
196 196 #define CFG_NETD_RETURN_PORT (BIT4 | BIT5 | BIT6 | BIT7)
197 197 #define CFG_NETD_RETURN_PORT_START (4)
198 198 #define CFG_NETD_RUNNING_PORTS (BIT8 | BIT9 | BIT10 | BIT11 | BIT12 | \
199 199 BIT13 | BIT14 | BIT15 | BIT16 | BIT17 | BIT18 | BIT19 | BIT20 | \
200 200 BIT21 | BIT22 | BIT23 | BIT24 | BIT25 | BIT26 | BIT27 | BIT28 | \
201 201 BIT29 | BIT30 | BIT31)
202 202 #define CFG_NETD_RUNNING_PORTS_START (8)
203 203
204 204 /* Values in the ID register */
205 205 #define CFG_ID_VERSION (BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | \
206 206 BIT5 | BIT6 | BIT7)
207 207 #define CFG_ID_VERSION_START (0)
208 208 #define CFG_ID_CHIP (BIT8 | BIT9 | BIT10 | BIT11 | BIT12 | \
209 209 BIT13 | BIT14 | BIT15)
210 210 #define CFG_ID_CHIP_START (8)
211 211 #define CFG_ID_MANUFACTURER (BIT16 | BIT17 | BIT18 | BIT19 | \
212 212 BIT20 | BIT21 | BIT22 | BIT23)
213 213 #define CFG_ID_MANUFACTURER_START (16)
214 214
215 215 /* Values in the Time-Code register */
216 216 #define CFG_TC_VALUE (BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | \
217 217 BIT5)
218 218 #define CFG_TC_VALUE_START (0)
219 219 #define CFG_TC_FLAGS (BIT6 | BIT7)
220 220 #define CFG_TC_FLAGS_START (6)
221 221
222 222 /* Values for the Router Base Clock Select */
223 223 #define CFG_RTR_CLK_100_MBITS (0)
224 224 #define CFG_RTR_CLK_200_MBITS (BIT0)
225 225
226 226 /* Values for the Brick Base Clock */
227 227 #define CFG_BRK_CLK_100_MHZ (0)
228 228 #define CFG_BRK_CLK_120_MHZ (BIT0)
229 229 #define CFG_BRK_CLK_140_MHZ (BIT1)
230 230 #define CFG_BRK_CLK_160_MHZ (BIT0 | BIT1)
231 231 #define CFG_BRK_CLK_180_MHZ (BIT2)
232 232 #define CFG_BRK_CLK_200_MHZ (BIT2 | BIT0)
233 233
234 234 /* Values for the Brick Base Divider */
235 235 #define CFG_BRK_DVDR_1 (0)
236 236 #define CFG_BRK_DVDR_2 (BIT0)
237 237 #define CFG_BRK_DVDR_4 (BIT1)
238 238
239 239 typedef enum
240 240 {
241 241 TRANSFER_NOT_STARTED = 0,
242 242 TRANSFER_STARTED = 1,
243 243 TRANSFER_SUCCESS = 2,
244 244 TRANSFER_ERROR_DISCONNECT = 3,
245 245 TRANSFER_ERROR_PARITY = 4,
246 246 TRANSFER_ERROR_UNKNOWN = 5,
247 247 TRANSFER_ERROR_TIMEOUT = 6,
248 248 TRANSFER_ERROR_LINK_NOT_STARTED = 7,
249 249 TRANSFER_ERROR_USER_BUFFER_LOCK_FAILED = 8,
250 250 TRANSFER_ERROR_LINK_ALREADY_IN_USE = 9,
251 251 TRANSFER_ERROR_RECEIVE_BUFFER_FULL = 0xa,
252 252 TRANSFER_ERROR_OUT_OF_MEMORY = 0xb,
253 253 TRANSFER_ERROR_NOT_FOUND = 0xc,
254 254 TRANSFER_ERROR_USB_ERROR = 0xd,
255 255 TRANSFER_ERROR_NOT_REGISTERED_TO_RECEIVE = 0xe
256 256 } USB_SPACEWIRE_STATUS, *PUSB_SPACEWIRE_STATUS;
257 257
258 258 #define SPACEWIRE_USB_EOP_CHAR ((U8)0x80)
259 259 #define SPACEWIRE_USB_EEP_CHAR ((U8)0x40)
260 260
261 261 typedef enum
262 262 {
263 263 SPACEWIRE_USB_NO_EOP = 0,
264 264 SPACEWIRE_USB_EOP = SPACEWIRE_USB_EOP_CHAR,
265 265 SPACEWIRE_USB_EEP = SPACEWIRE_USB_EEP_CHAR
266 266 } USB_SPACEWIRE_EOP_TYPE, *PUSB_SPACEWIRE_EOP_TYPE;
267 267
268 268 typedef enum
269 269 {
270 270 SPACEWIRE_TRAFFIC_UNKNOWN = -1,
271 271 SPACEWIRE_TRAFFIC_PACKET = 0,
272 272 SPACEWIRE_TRAFFIC_TIMECODE = 1,
273 273 SPACEWIRE_TRAFFIC_CONTROL = 2
274 274 } SPACEWIRE_TRAFFIC_TYPE, *PSPACEWIRE_TRAFFIC_TYPE;
275 275
276 276 typedef struct
277 277 {
278 278 unsigned long len;
279 279 USB_SPACEWIRE_EOP_TYPE eop;
280 280 SPACEWIRE_TRAFFIC_TYPE type;
281 281 } USB_SPACEWIRE_PACKET_PROPERTIES, *PUSB_SPACEWIRE_PACKET_PROPERTIES;
282 282
283 283
284 284
285 285 typedef enum
286 286 {
287 287 CFG_TRANSFER_SUCCESS = 0x00,
288 288 CFG_TRANSMIT_PACKET_FAILURE = 0x01,
289 289 CFG_REPLY_PACKET_FAILURE = 0x02,
290 290 CFG_REPLY_PACKET_TOO_BIG = 0x03,
291 291 CFG_REPLY_PACKET_TOO_SMALL = 0x04,
292 292 CFG_REPLY_PACKET_NAK = 0x05,
293 293 CFG_REPLY_PACKET_CHECKSUM_ERROR = 0x06
294 294 } CFG_SPACEWIRE_STATUS;
295 295
296 296
297 297
298 298 char USBSpaceWire_Open(star_device_handle *phDevice, int nDeviceNum);
299 299 void USBSpaceWire_Close(star_device_handle hDevice);
300 300 U32 USBSpaceWire_ListDevices();
301 301 char USBSpaceWire_GetSerialNumber(star_device_handle hDevice, U8 pSerialNumber[11]);
302 302 void USBSpaceWire_EnableNetworkMode(star_device_handle hDevice, char enable);
303 303 char USBSpaceWire_RegisterReceiveOnAllPorts(star_device_handle hDevice);
304 304 char USBSpaceWire_UnregisterReceiveOnAllPorts(star_device_handle hDevice);
305 305 char USBSpaceWire_ClearEndpoints(star_device_handle hDevice);
306 306 void USBSpaceWire_SetTimeout(star_device_handle hDevice, double timeout);
307 307 char USBSpaceWire_TC_Reset(star_device_handle hDevice);
308 308 char USBSpaceWire_TC_EnableExternalTimecodeSelection(star_device_handle hDevice,char enable);
309 309 U32 USBSpaceWire_TC_GetClockFrequency(star_device_handle hDevice);
310 310 char USBSpaceWire_TC_SetAutoTickInFrequency(star_device_handle hDevice, U32 frequency);
311 311 char USBSpaceWire_TC_EnableAutoTickIn(star_device_handle hDevice, char enableAutoTickIns, char enableAllPorts);
312 312 char USBSpaceWire_TC_PerformTickIn(star_device_handle hDevice, U8 timein);
313 313 U32 USBSpaceWire_GetDriverSendBufferSize(star_device_handle hDevice);
314 314 U32 USBSpaceWire_GetDriverReadBufferSize(star_device_handle hDevice);
315 315 char USBSpaceWire_IsReadThrottling(star_device_handle hDevice);
316 316
317 317 char USBSpaceWire_WaitOnReadPacketAvailable(star_device_handle hDevice, double timeout);
318 318 USB_SPACEWIRE_STATUS USBSpaceWire_SendPacket(star_device_handle hDevice, void *pBuffer, U32 nBufferSize, char bWait,USB_SPACEWIRE_ID *identifier);
319 319 char USBSpaceWire_FreeSend(star_device_handle hDevice, USB_SPACEWIRE_ID identifier);
320 320 USB_SPACEWIRE_STATUS USBSpaceWire_ReadPackets(star_device_handle hDevice, void *pBuffer, U32 nBufferSize,U32 nPacketNum, char bWait, PUSB_SPACEWIRE_PACKET_PROPERTIES properties,USB_SPACEWIRE_ID *identifier);
321 321 char USBSpaceWire_FreeRead(star_device_handle hDevice, USB_SPACEWIRE_ID identifier);
322 322 SPACEWIRE_TRAFFIC_TYPE USBSpaceWire_GetReadTrafficType(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties, U32 nPacketNum);
323 323 USB_SPACEWIRE_EOP_TYPE USBSpaceWire_GetReadEOPStatus(PUSB_SPACEWIRE_PACKET_PROPERTIES pProperties,U32 nPacketNum);
324 324
325 325 void CFGSpaceWire_EnableRMAP(char useRMAP);
326 326 void CFGSpaceWire_SetRMAPDestinationKey(U8 destinationKey);
327 327 void CFGSpaceWire_StackClear(void);
328 328 void CFGSpaceWire_AddrStackPush(U8 dwAddress);
329 329 void CFGSpaceWire_RetAddrStackPush(U8 dwAddress);
330 330 int CFGSpaceWire_SetBrickBaseTransmitRate(star_device_handle hDevice, U32 dwBaseClk, U32 dwBaseDvdr, U32 dwEnableClk);
331 331 int CFGSpaceWire_GetLinkStatusControl(star_device_handle hDevice, U32 dwLinkNum, U32 *dwStatusControl);
332 332 void CFGSpaceWire_LSEnableAutoStart(U32 *dwStatusControl, char bEnabled);
333 333 void CFGSpaceWire_LSEnableStart(U32 *dwStatusControl, char bEnabled);
334 334 void CFGSpaceWire_LSEnableDisabled(U32 *dwStatusControl, char bEnabled);
335 335 void CFGSpaceWire_LSEnableTristate(U32 *dwStatusControl, char bEnabled);
336 336 void CFGSpaceWire_LSPortType(U32 dwStatusControl, U32 *dwPortType);
337 337 void CFGSpaceWire_LSSetOperatingSpeed(U32 *dwStatusControl, U32 dwOperatingSpeed);
338 338 void CFGSpaceWire_LSConfigErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus);
339 339 void CFGSpaceWire_LSExternalErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus);
340 340 void CFGSpaceWire_LSErrorStatus(U32 dwStatusControl, U32 *dwErrorStatus);
341 341 void CFGSpaceWire_LSLinkState(U32 dwStatusControl, U32 *dwLinkStatus);
342 342 void CFGSpaceWire_LSIsLinkRunning(U32 dwStatusControl, char *isLinkRunning);
343 343 void CFGSpaceWire_LSIsAutoStart(U32 dwStatusControl, char *isAutoStart);
344 344 void CFGSpaceWire_LSIsStart(U32 dwStatusControl, char *isStart);
345 345 void CFGSpaceWire_LSIsDisabled(U32 dwStatusControl, char *isDisabled);
346 346 void CFGSpaceWire_LSIsTristate(U32 dwStatusControl, char *isTristate);
347 347 void CFGSpaceWire_LSOperatingSpeed(U32 dwStatusControl, U32 *dwOperatingSpeed);
348 348 void CFGSpaceWire_LSOutputPortConnection(U32 dwStatusControl, U32 *dwOutputPortConnection);
349 349 int CFGSpaceWire_SetLinkStatusControl(star_device_handle hDevice, U32 dwLinkNum, U32 dwStatusControl);
350 350 int CFGSpaceWire_SetAsInterface(star_device_handle hDevice, char bEnabled, char bAddIdentifier);
351 351 int CFGSpaceWire_ClearRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress);
352 352 void CFGSpaceWire_RTBuildRoutingTableEntry(U32 *dwRoutingTableEntry,U32 dwOutputPorts, char bDelHead, char bPriority);
353 353 int CFGSpaceWire_SetRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress, U32 dwRoutingTableEntry);
354 354 int CFGSpaceWire_GetRoutingTableEntry(star_device_handle hDevice, U32 nLogicalAddress, U32 *dwRoutingTableEntry);
355 355 void CFGSpaceWire_RTIsEnabled(U32 dwRoutingTableEntry, char *bEnabled);
356 356 void CFGSpaceWire_RTIsDelHead(U32 dwRoutingTableEntry, char *bDelHead);
357 357 void CFGSpaceWire_RTIsPriority(U32 dwRoutingTableEntry, char *bPriority);
358 358 void CFGSpaceWire_RTGetOutputPorts(U32 dwRoutingTableEntry, U32 *dwOutputPorts);
359 359 int CFGSpaceWire_GetTickEnableStatus(star_device_handle hDevice, U32 *dwTickEnableStatus);
360 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 369 class FakeStarDundeeSpwUSB_Lib
366 370 {
367 371 public:
368 372 FakeStarDundeeSpwUSB_Lib();
369 373 static void resolve();
374 static bool fullresolved();
375 static const QList<funcToresolve>& status();
370 376 };
371 377
372 378 #endif // FAKESTARDUNDEESPWUSB_LIB_H
@@ -1,305 +1,339
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <ui version="4.0">
3 3 <class>StarDundeeUI</class>
4 4 <widget class="QWidget" name="StarDundeeUI">
5 5 <property name="geometry">
6 6 <rect>
7 7 <x>0</x>
8 8 <y>0</y>
9 <width>397</width>
10 <height>506</height>
9 <width>609</width>
10 <height>581</height>
11 11 </rect>
12 12 </property>
13 13 <property name="windowTitle">
14 14 <string>Form</string>
15 15 </property>
16 16 <layout class="QFormLayout" name="formLayout">
17 <item row="0" column="0">
17 <item row="7" column="0">
18 18 <widget class="QLabel" name="selectBrickLbl">
19 19 <property name="text">
20 20 <string>Select Brick</string>
21 21 </property>
22 22 </widget>
23 23 </item>
24 <item row="0" column="1">
24 <item row="7" column="1">
25 25 <widget class="QComboBox" name="selectBrickCmbx">
26 26 <property name="toolTip">
27 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>
28 28 </property>
29 29 <property name="whatsThis">
30 30 <string/>
31 31 </property>
32 32 <item>
33 33 <property name="text">
34 34 <string>None</string>
35 35 </property>
36 36 </item>
37 37 </widget>
38 38 </item>
39 <item row="1" column="0">
39 <item row="8" column="0">
40 40 <widget class="QLabel" name="selectLinkLbl">
41 41 <property name="text">
42 42 <string>Select link number</string>
43 43 </property>
44 44 </widget>
45 45 </item>
46 <item row="1" column="1">
46 <item row="8" column="1">
47 47 <widget class="QComboBox" name="selectLinkCmbx">
48 48 <property name="toolTip">
49 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>
50 50 </property>
51 51 <item>
52 52 <property name="text">
53 53 <string>1</string>
54 54 </property>
55 55 </item>
56 56 <item>
57 57 <property name="text">
58 58 <string>2</string>
59 59 </property>
60 60 </item>
61 61 </widget>
62 62 </item>
63 <item row="2" column="0">
63 <item row="9" column="0">
64 64 <widget class="QLabel" name="selectLinkSpeedLbl">
65 65 <property name="text">
66 66 <string>Link Speed</string>
67 67 </property>
68 68 </widget>
69 69 </item>
70 <item row="2" column="1">
70 <item row="9" column="1">
71 71 <widget class="QComboBox" name="setLinkSpeedCmbx">
72 72 <property name="toolTip">
73 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>
74 74 </property>
75 75 <item>
76 76 <property name="text">
77 77 <string>10MHz</string>
78 78 </property>
79 79 </item>
80 80 </widget>
81 81 </item>
82 <item row="3" column="0">
82 <item row="10" column="0">
83 83 <widget class="QLabel" name="setDestKeyLbl">
84 84 <property name="text">
85 85 <string>Source address</string>
86 86 </property>
87 87 </widget>
88 88 </item>
89 <item row="3" column="1">
89 <item row="10" column="1">
90 90 <widget class="QLineEdit" name="sourceAddressLineEdit">
91 91 <property name="toolTip">
92 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>
93 93 </property>
94 94 <property name="inputMask">
95 95 <string comment="ddD"/>
96 96 </property>
97 97 <property name="text">
98 98 <string>32</string>
99 99 </property>
100 100 <property name="maxLength">
101 101 <number>3</number>
102 102 </property>
103 103 </widget>
104 104 </item>
105 <item row="4" column="0">
105 <item row="11" column="0">
106 106 <widget class="QLabel" name="RMAPaddressLbl">
107 107 <property name="text">
108 108 <string>Destination address</string>
109 109 </property>
110 110 </widget>
111 111 </item>
112 <item row="4" column="1">
112 <item row="11" column="1">
113 113 <widget class="QLineEdit" name="destinationAddressLineEdit">
114 114 <property name="toolTip">
115 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>
116 116 </property>
117 117 <property name="inputMask">
118 118 <string comment="ddD"/>
119 119 </property>
120 120 <property name="text">
121 121 <string>254</string>
122 122 </property>
123 123 <property name="maxLength">
124 124 <number>3</number>
125 125 </property>
126 126 </widget>
127 127 </item>
128 <item row="5" column="0">
128 <item row="12" column="0">
129 129 <widget class="QLabel" name="RMAPKeyLbl">
130 130 <property name="text">
131 131 <string>Destination key</string>
132 132 </property>
133 133 </widget>
134 134 </item>
135 <item row="5" column="1">
135 <item row="12" column="1">
136 136 <widget class="QLineEdit" name="destinationKeyLineEdit">
137 137 <property name="toolTip">
138 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>
139 139 </property>
140 140 <property name="inputMask">
141 141 <string comment="ddD"/>
142 142 </property>
143 143 <property name="text">
144 144 <string comment="ddD">2</string>
145 145 </property>
146 146 <property name="maxLength">
147 147 <number>3</number>
148 148 </property>
149 149 </widget>
150 150 </item>
151 <item row="6" column="1">
151 <item row="13" column="1">
152 152 <widget class="QLineEdit" name="RMAPTimeoutLineEdit">
153 153 <property name="toolTip">
154 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>
155 155 </property>
156 156 <property name="inputMethodHints">
157 157 <set>Qt::ImhDigitsOnly</set>
158 158 </property>
159 159 <property name="inputMask">
160 160 <string comment="DDdd;"/>
161 161 </property>
162 162 <property name="text">
163 163 <string>500</string>
164 164 </property>
165 165 <property name="maxLength">
166 166 <number>5</number>
167 167 </property>
168 168 </widget>
169 169 </item>
170 <item row="6" column="0">
170 <item row="13" column="0">
171 171 <widget class="QLabel" name="RMAPTimeoutLbl">
172 172 <property name="text">
173 173 <string>RMAP timeout(ms)</string>
174 174 </property>
175 175 </widget>
176 176 </item>
177 <item row="10" column="1">
177 <item row="17" column="1">
178 178 <widget class="QPushButton" name="connectQpb">
179 179 <property name="text">
180 180 <string>Connect</string>
181 181 </property>
182 182 </widget>
183 183 </item>
184 <item row="8" column="1">
184 <item row="15" column="1">
185 185 <widget class="QRadioButton" name="setInterfaceModeQrb">
186 186 <property name="text">
187 <string>interface mode</string>
187 <string>i&amp;nterface mode</string>
188 188 </property>
189 189 <property name="checked">
190 190 <bool>true</bool>
191 191 </property>
192 192 </widget>
193 193 </item>
194 <item row="9" column="1">
194 <item row="16" column="1">
195 195 <widget class="QRadioButton" name="setRouterModeQrb">
196 196 <property name="text">
197 <string>router mode</string>
197 <string>router &amp;mode</string>
198 198 </property>
199 199 </widget>
200 200 </item>
201 <item row="11" column="0" colspan="2">
201 <item row="18" column="0" colspan="2">
202 202 <layout class="QGridLayout" name="gridLayout">
203 203 <item row="1" column="0">
204 204 <widget class="QLabel" name="label_4">
205 205 <property name="text">
206 206 <string>Packets</string>
207 207 </property>
208 208 </widget>
209 209 </item>
210 210 <item row="1" column="1">
211 211 <widget class="QLabel" name="starDundeeReceivedPackets">
212 212 <property name="text">
213 213 <string>-</string>
214 214 </property>
215 215 </widget>
216 216 </item>
217 217 <item row="0" column="1">
218 218 <widget class="QLabel" name="label_3">
219 219 <property name="font">
220 220 <font>
221 221 <weight>75</weight>
222 222 <bold>true</bold>
223 223 </font>
224 224 </property>
225 225 <property name="text">
226 226 <string>Received</string>
227 227 </property>
228 228 </widget>
229 229 </item>
230 230 <item row="2" column="1">
231 231 <widget class="QLabel" name="starDundeeReceivedBytes">
232 232 <property name="text">
233 233 <string>-</string>
234 234 </property>
235 235 </widget>
236 236 </item>
237 237 <item row="2" column="0">
238 238 <widget class="QLabel" name="label_5">
239 239 <property name="text">
240 240 <string>Bytes</string>
241 241 </property>
242 242 </widget>
243 243 </item>
244 244 <item row="0" column="2">
245 245 <widget class="QLabel" name="label_7">
246 246 <property name="font">
247 247 <font>
248 248 <weight>75</weight>
249 249 <bold>true</bold>
250 250 </font>
251 251 </property>
252 252 <property name="text">
253 253 <string>Transmitted</string>
254 254 </property>
255 255 </widget>
256 256 </item>
257 257 <item row="1" column="2">
258 258 <widget class="QLabel" name="starDundeeTransmittedPackets">
259 259 <property name="text">
260 260 <string>-</string>
261 261 </property>
262 262 </widget>
263 263 </item>
264 264 <item row="2" column="2">
265 265 <widget class="QLabel" name="starDundeeTransmittedBytes">
266 266 <property name="text">
267 267 <string>-</string>
268 268 </property>
269 269 </widget>
270 270 </item>
271 271 <item row="0" column="0">
272 272 <widget class="QPushButton" name="resetStatsQpb">
273 273 <property name="text">
274 274 <string>Reset stats</string>
275 275 </property>
276 276 </widget>
277 277 </item>
278 278 </layout>
279 279 </item>
280 <item row="8" column="0">
280 <item row="15" column="0">
281 281 <widget class="QCheckBox" name="spwTimecodes">
282 282 <property name="text">
283 283 <string>timecode</string>
284 284 </property>
285 285 </widget>
286 286 </item>
287 <item row="7" column="0">
287 <item row="14" column="0">
288 288 <widget class="QLabel" name="label">
289 289 <property name="text">
290 290 <string>Timecode f (Hz)</string>
291 291 </property>
292 292 </widget>
293 293 </item>
294 <item row="7" column="1">
294 <item row="14" column="1">
295 295 <widget class="QLineEdit" name="timecodeFrequencyLineEdit">
296 296 <property name="text">
297 297 <string>1</string>
298 298 </property>
299 299 </widget>
300 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 335 </layout>
302 336 </widget>
303 337 <resources/>
304 338 <connections/>
305 339 </ui>
@@ -1,301 +1,310
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the SocExplorer Software
3 3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 3 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 22 #include "stardundeegui.h"
23 23
24 24 #include "ui_stardundeeGUI.h"
25 25 #include "fakestardundeespwusb_lib.h"
26 //#include <spw_usb_api.h>
27 //#include <spw_config_library.h>
28 26
29 27 StarDundeeGUI::StarDundeeGUI(QWidget *parent) :
30 28 QWidget(parent),ui(new Ui::StarDundeeUI)
31 29 {
32 30 resetBytesPacketsStatistics();
33 31
34 32 this->ui->setupUi(this);
35 33 connect(this->ui->selectBrickCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(brickSelectionChanged(int)));
36 34 connect(this->ui->selectLinkCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(linkNumberSelectionChanged(int)));
37 35 connect(this->ui->setLinkSpeedCmbx,SIGNAL(currentIndexChanged(QString)),this,SIGNAL(linkSpeedSelectionChanged(QString)));
38 36 // connect(this->ui->sourceAddressLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(destinationKeyChanged(QString)));
39 37 connect(this->ui->sourceAddressLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(sourceLogicalAddressChanged(QString)));
40 38 connect(this->ui->destinationAddressLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapAddressChanged(QString)));
41 39 connect(this->ui->destinationKeyLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapKeyChanged(QString)));
42 40 connect(this->ui->RMAPTimeoutLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapTimeoutChanged(QString)));
43 41 connect(this->ui->timecodeFrequencyLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(timecodeFrequencyChange(QString)));
44 42 connect(this->ui->connectQpb,SIGNAL(clicked()),this,SIGNAL(connectClicked()));
45 43 connect(this->ui->setInterfaceModeQrb, SIGNAL(toggled(bool)), this, SIGNAL(brickModeChanged(bool)));
46 44 connect(this->ui->resetStatsQpb, SIGNAL(clicked()), this, SLOT(resetStatistics()));
47 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 53 int StarDundeeGUI::getBrickSelection()
51 54 {
52 55 return ui->selectBrickCmbx->currentIndex();
53 56 }
54 57
55 58 int StarDundeeGUI::getLinkNumberSelection()
56 59 {
57 60 return ui->selectLinkCmbx->currentIndex();
58 61 }
59 62
60 63 QString StarDundeeGUI::getLinkSpeedSelection()
61 64 {
62 65 return ui->setLinkSpeedCmbx->currentText();
63 66 }
64 67
65 68 QString StarDundeeGUI::getSourceAddress()
66 69 {
67 70 return ui->sourceAddressLineEdit->text();
68 71 }
69 72
70 73 QString StarDundeeGUI::getDestinationAddress()
71 74 {
72 75 return ui->destinationAddressLineEdit->text();
73 76 }
74 77
75 78 QString StarDundeeGUI::getDestinationKey()
76 79 {
77 80 return ui->destinationKeyLineEdit->text();
78 81 }
79 82
80 83 QString StarDundeeGUI::getRmapTimeout()
81 84 {
82 85 return ui->RMAPTimeoutLineEdit->text();
83 86 }
84 87
85 88 QString StarDundeeGUI::getTimecodeFrequency()
86 89 {
87 90 return ui->timecodeFrequencyLineEdit->text();
88 91 }
89 92
90 93 bool StarDundeeGUI::getStartSendingTimecodes()
91 94 {
92 95 return ui->spwTimecodes->isChecked();
93 96 }
94 97
95 98 bool StarDundeeGUI::isBrickSetAsAnInterface()
96 99 {
97 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 109 void StarDundeeGUI::setBrickAsAnInterface( bool interfaceMode )
101 110 {
102 111 if (interfaceMode == true)
103 112 {
104 113 this->ui->setInterfaceModeQrb->setChecked( true );
105 114 }
106 115 else
107 116 {
108 117 this->ui->setRouterModeQrb->setChecked( true );
109 118 }
110 119 }
111 120
112 121 void StarDundeeGUI::setBrickAsARouter( bool interfaceMode )
113 122 {
114 123 if (interfaceMode==true)
115 124 {
116 125 this->ui->setRouterModeQrb->setChecked( true );
117 126 }
118 127 else
119 128 {
120 129 this->ui->setInterfaceModeQrb->setChecked( true );
121 130 }
122 131
123 132 }
124 133
125 134 void StarDundeeGUI::lock(bool lock)
126 135 {
127 136 this->ui->selectBrickCmbx->setDisabled(lock);
128 137 this->ui->selectLinkCmbx->setDisabled(lock);
129 138 this->ui->setLinkSpeedCmbx->setDisabled(lock);
130 139 this->ui->sourceAddressLineEdit->setDisabled(lock);
131 140 this->ui->destinationAddressLineEdit->setDisabled(lock);
132 141 this->ui->destinationKeyLineEdit->setDisabled(lock);
133 142 this->ui->RMAPTimeoutLineEdit->setDisabled(lock);
134 143 this->ui->setInterfaceModeQrb->setDisabled(lock);
135 144 this->ui->setRouterModeQrb->setDisabled(lock);
136 145 if(lock)
137 146 this->ui->connectQpb->setText("Disconnect");
138 147 else
139 148 this->ui->connectQpb->setText("Connect");
140 149 }
141 150
142 151 void StarDundeeGUI::updateAvailableBrickCount(int count)
143 152 {
144 153 this->ui->selectBrickCmbx->clear();
145 154 this->ui->selectBrickCmbx->addItem("none");
146 155 for(int i =0;i<32;i++)
147 156 {
148 157 if((count&1)==1)
149 158 {
150 159 star_device_handle hDevice;
151 160 char serial[11]="";
152 161 if (USBSpaceWire_Open(&hDevice, 0))
153 162 {
154 163 USBSpaceWire_GetSerialNumber(hDevice,(U8*) serial);
155 164 USBSpaceWire_Close(hDevice);
156 165 }
157 166 this->ui->selectBrickCmbx->addItem("STAR-Dundee USB brick "+QString::number(i)+" sn:" + serial);
158 167 }
159 168 count>>=1;
160 169 }
161 170 }
162 171
163 172 void StarDundeeGUI::setRmapTimeout(const QString &timeout)
164 173 {
165 174 this->ui->RMAPTimeoutLineEdit->setText(timeout);
166 175 }
167 176
168 177 void StarDundeeGUI::selectBrick(int brickIndex)
169 178 {
170 179 if(brickIndex>=0&& brickIndex<this->ui->selectBrickCmbx->count())
171 180 {
172 181 this->ui->selectBrickCmbx->setCurrentIndex(brickIndex);
173 182 }
174 183 }
175 184
176 185 void StarDundeeGUI::selectLinkNumber(int linkNumber)
177 186 {
178 187 if(linkNumber==1 || linkNumber==2)
179 188 {
180 189 this->ui->selectLinkCmbx->setCurrentIndex(linkNumber-1);
181 190 }
182 191 }
183 192
184 193 void StarDundeeGUI::selectLinkSpeed(int linkSpeed)
185 194 {
186 195 #define MHz *(1000*1000)
187 196 if(linkSpeed==10 MHz)
188 197 {
189 198 this->ui->selectLinkCmbx->setCurrentIndex(0);
190 199 }
191 200 }
192 201
193 202 void StarDundeeGUI::setSourceAddress(const QString &address)
194 203 {
195 204 bool ok;
196 205 address.toInt(&ok,10);
197 206 if(ok)
198 207 {
199 208 this->ui->sourceAddressLineEdit->setText(address);
200 209 }
201 210 }
202 211
203 212 void StarDundeeGUI::setDestinationAddress(const QString &address)
204 213 {
205 214 bool ok;
206 215 address.toInt(&ok,10);
207 216 if(ok)
208 217 {
209 218 this->ui->destinationAddressLineEdit->setText(address);
210 219 }
211 220 }
212 221
213 222 void StarDundeeGUI::setDestinationKey(const QString &key)
214 223 {
215 224 bool ok;
216 225 key.toInt(&ok,10);
217 226 if(ok)
218 227 {
219 228 this->ui->destinationKeyLineEdit->setText(key);
220 229 }
221 230 }
222 231
223 232 void StarDundeeGUI::setTimecodeFrequency( double frequency )
224 233 {
225 234 this->ui->timecodeFrequencyLineEdit->setText( QString::number( frequency, 'g', 3 ) );
226 235 }
227 236
228 237 void StarDundeeGUI::setStartSendingTimecodes( bool onOff )
229 238 {
230 239 if (this->ui->spwTimecodes->isChecked())
231 240 {
232 241 if (onOff==false) this->ui->spwTimecodes->setChecked(false);
233 242 }
234 243 else
235 244 {
236 245 if (onOff==true) this->ui->spwTimecodes->setChecked(true);
237 246 }
238 247 }
239 248
240 249 int StarDundeeGUI::getAvailableBrickCount( void )
241 250 {
242 251 int list = USBSpaceWire_ListDevices();
243 252 emit updateAvailableBrickCount(list);
244 253 QCoreApplication::processEvents();
245 254 return list;
246 255 }
247 256
248 257 void StarDundeeGUI::resetBytesPacketsStatistics( void )
249 258 {
250 259 nbBytesReceivedFromSpw = 0;
251 260 nbBytesTransmittedToSpw = 0;
252 261 nbPacketsReceivedFromSpw = 0;
253 262 nbPacketsTransmittedToSpw = 0;
254 263 nbCCSDSPacketsTransmittedToSpw = 0;
255 264 }
256 265
257 266 void StarDundeeGUI::resetStatistics( void )
258 267 {
259 268 nbBytesReceivedFromSpw = 0;
260 269 nbBytesTransmittedToSpw = 0;
261 270 nbPacketsReceivedFromSpw = 0;
262 271 nbPacketsTransmittedToSpw = 0;
263 272
264 273 this->ui->starDundeeReceivedBytes->setText( QString::number(nbBytesReceivedFromSpw) );
265 274 this->ui->starDundeeReceivedPackets->setText( QString::number(nbPacketsReceivedFromSpw) );
266 275 this->ui->starDundeeTransmittedBytes->setText( QString::number(nbBytesTransmittedToSpw) );
267 276 this->ui->starDundeeTransmittedPackets->setText( QString::number(nbPacketsTransmittedToSpw) );
268 277 }
269 278
270 279 void StarDundeeGUI::updateNbReceivedBytesFromSpw( unsigned int nbBytes)
271 280 {
272 281 nbBytesReceivedFromSpw = nbBytesReceivedFromSpw + nbBytes;
273 282 nbPacketsReceivedFromSpw = nbPacketsReceivedFromSpw + 1;
274 283
275 284 this->ui->starDundeeReceivedBytes->setText( QString::number(nbBytesReceivedFromSpw) );
276 285 this->ui->starDundeeReceivedPackets->setText( QString::number(nbPacketsReceivedFromSpw) );
277 286 }
278 287
279 288 void StarDundeeGUI::updateNbTransmittedBytesToSpw( unsigned int nbBytes)
280 289 {
281 290 nbBytesTransmittedToSpw = nbBytesTransmittedToSpw + nbBytes;
282 291 nbPacketsTransmittedToSpw = nbPacketsTransmittedToSpw + 1;
283 292
284 293 this->ui->starDundeeTransmittedBytes->setText( QString::number(nbBytesTransmittedToSpw) );
285 294 this->ui->starDundeeTransmittedPackets->setText( QString::number(nbPacketsTransmittedToSpw) );
286 295 }
287 296
288 297 void StarDundeeGUI::updateCCSDSPacketTransmittedToSpw( void )
289 298 {
290 299 nbCCSDSPacketsTransmittedToSpw = nbCCSDSPacketsTransmittedToSpw + 1;
291 300 }
292 301
293 302 unsigned int StarDundeeGUI::getNbCCSDSPacketsTransmittedToSpw(void)
294 303 {
295 304 return this->nbCCSDSPacketsTransmittedToSpw;
296 305 }
297 306
298 307 unsigned int StarDundeeGUI::getNbPacketsTransmittedToSpw()
299 308 {
300 309 return this->nbPacketsTransmittedToSpw;
301 310 }
@@ -1,90 +1,94
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the SocExplorer Software
3 3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 3 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 22 #ifndef STARDUNDEEGUI_H
23 23 #define STARDUNDEEGUI_H
24 24
25 25 #include <QWidget>
26 26
27 #include "fakestardundeespwusbgui.h"
28
27 29 namespace Ui {
28 30 class StarDundeeUI;
29 31 }
30 32
31 33 class StarDundeeGUI : public QWidget
32 34 {
33 35 Q_OBJECT
34 36 public:
35 37 explicit StarDundeeGUI(QWidget *parent = 0);
36 38 int getBrickSelection();
37 39 int getLinkNumberSelection();
38 40 QString getLinkSpeedSelection();
39 41 QString getSourceAddress();
40 42 QString getDestinationAddress();
41 43 QString getDestinationKey();
42 44 QString getRmapTimeout();
43 45 QString getTimecodeFrequency();
44 46 bool getStartSendingTimecodes();
45 47 bool isBrickSetAsAnInterface();
46 48 signals:
47 49 void brickSelectionChanged(int brickIndex);
48 50 void linkNumberSelectionChanged(int linkIndex);
49 51 void linkSpeedSelectionChanged(const QString & linkSpeed);
50 52 void destinationKeyChanged(const QString & destKey);
51 53 void sourceLogicalAddressChanged( QString );
52 54 void rmapAddressChanged(const QString & address);
53 55 void rmapKeyChanged(const QString & key);
54 56 void rmapTimeoutChanged(const QString & timeout);
55 57 void timecodeFrequencyChange(const QString & timeout);
56 58 void connectClicked();
57 59 void brickModeChanged(bool);
58 60 void startSendingTimecode(bool);
59 61 public slots:
62 void showDriverStatus();
60 63 void lock(bool lock);
61 64 void updateAvailableBrickCount(int count);
62 65 void selectBrick(int brickIndex);
63 66 void selectLinkNumber(int linkIndex);
64 67 void selectLinkSpeed(int linkSpeed);
65 68 void setDestinationKey(const QString & destKey);
66 69 void setSourceAddress(const QString & address);
67 70 void setDestinationAddress(const QString & address);
68 71 void setTimecodeFrequency(double frequency);
69 72 void setStartSendingTimecodes( bool onOff );
70 73 void setRmapTimeout(const QString & timeout);
71 74 int getAvailableBrickCount( void );
72 75 void setBrickAsAnInterface(bool interfaceMode);
73 76 void setBrickAsARouter( bool interfaceMode );
74 77 void resetBytesPacketsStatistics( void );
75 78 void resetStatistics( void );
76 79 void updateNbReceivedBytesFromSpw( unsigned int nbBytes);
77 80 void updateNbTransmittedBytesToSpw( unsigned int nbBytes);
78 81 void updateCCSDSPacketTransmittedToSpw( void );
79 82 unsigned int getNbPacketsTransmittedToSpw( void );
80 83 unsigned int getNbCCSDSPacketsTransmittedToSpw( void );
81 84 private:
82 85 Ui::StarDundeeUI *ui;
83 86 unsigned int nbBytesReceivedFromSpw;
84 87 unsigned int nbBytesTransmittedToSpw;
85 88 unsigned int nbPacketsReceivedFromSpw;
86 89 unsigned int nbPacketsTransmittedToSpw;
87 90 unsigned int nbCCSDSPacketsTransmittedToSpw;
91 FakeStardundeeSpwUsbGui driverStatus;
88 92 };
89 93
90 94 #endif // STARDUNDEEGUI_H
@@ -1,5 +1,5
1 1 <RCC>
2 2 <qresource prefix="/imgs">
3 <file>StarDundee/stardundee.tif</file>
3 <file alias="stardundee.tif">StarDundee/stardundee.tif</file>
4 4 </qresource>
5 5 </RCC>
@@ -1,183 +1,186
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the SocExplorer Software
3 3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 3 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 22
23 23 #include "spwplugin.h"
24 24 #include "stardundeespw_usb.h"
25 25 #include "gr_esb_bridge.h"
26 26 #include <socexplorerproxy.h>
27 27 #include "fakestardundeespwusb_lib.h"
28 28
29 29
30 30 spwplugin::spwplugin(QWidget *parent):socexplorerplugin(parent,false)
31 31 {
32 32 Q_UNUSED(parent)
33 33 FakeStarDundeeSpwUSB_Lib::resolve();
34 34 this->bridge = NULL;
35 35 this->scanDone = false;
36 36 // this->pyObject = new spwPyWrapper(this);
37 37 this->tcpServer = new SpwTcpPacketServer(this);
38 38 this->mainGroupBox = new QGroupBox("SpaceWire Plugin Configuration",this);
39 39 this->bridgeSelector = new QComboBox(this);
40 40 this->mainTabWidgt = new QTabWidget(this);
41 41 this->mainTabWidgt->addTab(this->mainGroupBox,"Bridge Configuration");
42 42 this->mainTabWidgt->addTab(this->tcpServer,"TCP Server");
43 43 this->mainLayout = new QGridLayout(this->mainGroupBox);
44 44 this->mainLayout->addWidget(new QLabel("Select SpaceWire bridge",this),0,0,1,1,Qt::AlignCenter);
45 45 this->mainLayout->addWidget(this->bridgeSelector,0,1,1,1);
46 46 this->setWidget(this->mainTabWidgt);
47 47 this->bridgeSelector->addItem("none");
48 48 this->bridgeSelector->addItem("STAR-Dundee Spw USB Brick");
49 49 this->bridgeSelector->addItem("GR-ESB");
50 50 connect(this->bridgeSelector,SIGNAL(currentIndexChanged(QString)),this,SLOT(bridgeSelectionChanged(QString)));
51 51 connect(this,SIGNAL(selectBridge(QString)),this,SLOT(selectBridge(QString)));
52 52 connect(this,SIGNAL(TCPServerConnect()),this->tcpServer,SLOT(connectServer()));
53 53 connect(this,SIGNAL(TCPServerDisconnect()),this->tcpServer,SLOT(disconnectServer()));
54 54 connect(this,SIGNAL(TCPServerSetPort(qint32)),this->tcpServer,SLOT(setServerPort(qint32)));
55 55 connect(this,SIGNAL(TCPServerSetIP(QString)),this->tcpServer,SLOT(setServerSetIP(QString)));
56 56 }
57 57
58 58
59 59 spwplugin::~spwplugin()
60 60 {
61 61
62 62 }
63 63
64 64
65 65
66 66 unsigned int spwplugin::Read(unsigned int *Value,unsigned int count,unsigned int address)
67 67 {
68 68 if(Connected)
69 69 {
70 70 return bridge->Read(Value,count,address);
71 71 }
72 72 return 0;
73 73 }
74 74
75 75 void spwplugin::bridgeSelectionChanged(const QString &text)
76 76 {
77 77 printf("test");
78 78 if(text=="none")
79 79 {
80 80 if(this->bridge!=NULL)
81 81 {
82 82 this->mainLayout->removeWidget(this->bridge->getGUI());
83 this->bridge->getGUI()->hide();
83 84 this->disconnect(this,SLOT(setConnected(bool)));
84 85 delete this->bridge;
85 86 this->bridge= NULL;
86 87 }
87 88 }
88 89 if(text=="STAR-Dundee Spw USB Brick")
89 90 {
90 91 if(this->bridge!=NULL)
91 92 {
92 93 this->mainLayout->removeWidget(this->bridge->getGUI());
94 this->bridge->getGUI()->hide();
93 95 this->disconnect(this,SLOT(setConnected(bool)));
94 96 delete this->bridge;
95 97 }
96 98 this->bridge = new stardundeeSPW_USB(this);
97 99 this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2);
98 100 connect(this->bridge,SIGNAL(setConnected(bool)),this,SLOT(setConnected(bool)));
99 101 connect(this,SIGNAL(StarDundeeSelectBrick(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectBrick(int)));
100 102 connect(this,SIGNAL(StarDundeeSelectLinkNumber(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkNumber(int)));
101 103 connect(this,SIGNAL(StarDundeeSelectLinkSpeed(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkSpeed(int)));
102 104 connect(this,SIGNAL(StarDundeeSetSourceAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetSourceAddress(QString)));
103 105 connect(this,SIGNAL(StarDundeeSetDestinationAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationAddress(QString)));
104 106 connect(this,SIGNAL(StarDundeeSetDestinationKey(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationKey(QString)));
105 107 connect(this,SIGNAL(StarDundeeSetRmapTimeout(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetRmapTimeout(QString)));
106 108 connect(this,SIGNAL(connectBridge()),((stardundeeSPW_USB*)bridge),SLOT(connectBridge()));
107 109 connect(this,SIGNAL(disconnectBridge()),((stardundeeSPW_USB*)bridge),SLOT(disconnectBridge()));
108 110 connect(this,SIGNAL(StarDundeeGetAvailableBrickCount()),
109 111 ((stardundeeSPW_USB*)bridge),SIGNAL(GetAvailableBrickCount()));
110 112 connect(this,SIGNAL(StarDundeeGetNbPacketsTransmittedToSpw()),
111 113 ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbPacketsTransmittedToSpw()));
112 114 connect(this,SIGNAL(StarDundeeGetNbCCSDSPacketsTransmittedToSpw()),
113 115 ((stardundeeSPW_USB*)bridge),SIGNAL(GetNbCCSDSPacketsTransmittedToSpw()));
114 116 connect(this,SIGNAL(StarDundeeGetLinkNumber()),((stardundeeSPW_USB*)bridge),SIGNAL(GetLinkNumber()));
115 117 connect(this,SIGNAL(StarDundeeSetBrickAsAninterface(bool)),
116 118 ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsAnInterface(bool)));
117 119 connect(this,SIGNAL(StarDundeeSetBrickAsARouter(bool)),
118 120 ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsARouter(bool)));
119 121 connect(this,SIGNAL(StarDundeeStartTimecodes(bool)),
120 122 ((stardundeeSPW_USB*)bridge),SIGNAL(StartSendingTimecodes(bool)));
121 123 connect(this,SIGNAL(StarDundeeSetTimecodeFrequency(double)),
122 124 ((stardundeeSPW_USB*)bridge),SIGNAL(SetTimecodeFrequency(double)));
123 125 connect(this,SIGNAL(StarDundeeSendOneTimecode(unsigned char)),
124 126 ((stardundeeSPW_USB*)bridge),SIGNAL(SendOneTimecode(unsigned char)));
125 127 connect(this->bridge,SIGNAL(pushPacketOverTCP(char*,int)),this->tcpServer,SLOT(pushPacket(char*,int)));
126 128 connect(this->tcpServer, SIGNAL(sendSPWPacket(char*,int)), ((stardundeeSPW_USB*)bridge), SLOT(sendPacketComingFromTCPServer(char*,int)));
127 129 }
128 130 if(text=="GR-ESB")
129 131 {
130 132 if(this->bridge!=NULL)
131 133 {
132 134 this->mainLayout->removeWidget(this->bridge->getGUI());
135 this->bridge->getGUI()->hide();
133 136 this->disconnect(this,SLOT(setConnected(bool)));
134 137 delete this->bridge;
135 138 }
136 139 this->bridge = new GR_ESB_bridge(this);
137 140 this->mainLayout->addWidget(this->bridge->getGUI(),1,0,1,2);
138 141 connect(this->bridge,SIGNAL(setConnected(bool)),this,SLOT(setConnected(bool)));
139 142 }
140 143 }
141 144
142 145
143 146 void spwplugin::selectBridge(const QString &text)
144 147 {
145 148
146 149 if(text=="none")
147 150 {
148 151 this->bridgeSelector->setCurrentIndex(0);
149 152 }
150 153 if(text=="STAR-Dundee Spw USB Brick")
151 154 {
152 155 this->bridgeSelector->setCurrentIndex(1);
153 156 }
154 157 }
155 158
156 159 void spwplugin::setConnected(bool connected)
157 160 {
158 161 this->bridgeSelector->setDisabled(connected);
159 162 this->Connected = connected;
160 163 emit activateSig(connected);
161 164 if(!this->scanDone)
162 165 {
163 166 socexplorerproxy::loadChildSysDriver(this,"AMBA_PLUGIN");
164 167 this->scanDone=true;
165 168 }
166 169 }
167 170
168 171 unsigned int spwplugin::Write(unsigned int *Value,unsigned int count, unsigned int address)
169 172 {
170 173 if(Connected)
171 174 {
172 175 return bridge->Write(Value,count,address);
173 176 }
174 177 return 0;
175 178 }
176 179
177 180
178 181
179 182
180 183
181 184
182 185
183 186
@@ -1,93 +1,96
1 1 #
2 2 # Project created by QtCreator 2011-09-20T08:15:30
3 3 #
4 4 #-------------------------------------------------
5 5
6 6 CONFIG += socexplorerplugin
7 7 QT += network webkit
8 8 greaterThan(QT_MAJOR_VERSION, 4): QT += webkitwidgets
9 9
10 10 QMAKE_CXXFLAGS += -std=c++11
11 11 QMAKE_CFLAGS += -std=c++11
12 12
13 13 win32:CONFIG += dll
14 14 win32:CONFIG -= static
15 VERSION=0.6.0
15 VERSION=0.6.1
16 16 TARGET = spwplugin
17 17 DEFINES += PLUGIN=spwplugin
18 18 DEFINES += PLUGINHEADER="\"\\\"spwplugin.h"\\\"\"
19 19 DEFINES += driver_Name="\"\\\"SpwPlugin"\\\"\"
20 20 DEFINES += driver_Author="\"\\\"Alexis Jeandet alexis.jeandet@member.fsf.org; Paul Leroy paul.leroy@lpp.polytechnique.fr"\\\"\"
21 21 DEFINES += driver_Description="\"\\\"This plugin allows you to use spacewire's RMAP protocol with Stardundee USB brick v1"\\\"\"
22 22 DEFINES += driver_can_be_root=1
23 23 DEFINES += driver_can_be_child=0
24 24 DEFINES += driver_VID=0
25 25 DEFINES += driver_PID=0
26 26
27 27 STARTDUNDEEPATH=/home/spacewire/usb/spw_usb_driver_v2.68/
28 28
29 29 LIBS += $$STARTDUNDEEPATH/lib/x86_64/libSpaceWireUSBAPI.so \
30 30 $$STARTDUNDEEPATH/lib/x86_64/libConfigLibraryUSB.so
31 31
32 32 INCLUDEPATH += \
33 33 $${PWD} \
34 34 $$STARTDUNDEEPATH/inc \
35 35 StarDundee \
36 36 SpwTcpPacketServer \
37 37 GR-ESB
38 38
39 39 HEADERS += \
40 40 spwplugin.h \
41 41 StarDundee/stardundeespw_usb.h \
42 42 abstractspwbridge.h \
43 43 spw.h \
44 44 StarDundee/stardundeegui.h \
45 45 SpwTcpPacketServer/spwtcppacketserver.h \
46 46 GR-ESB/gr_esb_bridge.h \
47 47 GR-ESB/gr_esb_ui.h \
48 48 SpwTcpPacketServer/incomingpacketparser.h \
49 StarDundee/fakestardundeespwusb_lib.h
49 StarDundee/fakestardundeespwusb_lib.h \
50 StarDundee/fakestardundeespwusbgui.h
50 51
51 52
52 53 SOURCES += \
53 54 spwplugin.cpp \
54 55 StarDundee/stardundeespw_usb.cpp \
55 56 abstractspwbridge.cpp \
56 57 StarDundee/stardundeegui.cpp \
57 58 SpwTcpPacketServer/spwtcppacketserver.cpp \
58 59 GR-ESB/gr_esb_bridge.cpp \
59 60 GR-ESB/gr_esb_ui.cpp \
60 61 SpwTcpPacketServer/incomingpacketparser.cpp \
61 StarDundee/fakestardundeespwusb_lib.cpp
62 StarDundee/fakestardundeespwusb_lib.cpp \
63 StarDundee/fakestardundeespwusbgui.cpp
62 64
63 65 FORMS += \
64 66 StarDundee/stardundeeGUI.ui \
65 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 71 RESOURCES += \
69 72 spwRessources.qrc
70 73
71 74
72 75
73 76
74 77
75 78
76 79
77 80
78 81
79 82
80 83
81 84
82 85
83 86
84 87
85 88
86 89
87 90
88 91
89 92
90 93
91 94
92 95
93 96
General Comments 0
You need to be logged in to leave comments. Login now