@@ -7,7 +7,7 | |||
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 | 9 | <width>397</width> |
|
10 |
<height> |
|
|
10 | <height>506</height> | |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
|
13 | 13 | <property name="windowTitle"> |
@@ -87,7 +87,7 | |||
|
87 | 87 | </widget> |
|
88 | 88 | </item> |
|
89 | 89 | <item row="3" column="1"> |
|
90 |
<widget class="QLineEdit" name=" |
|
|
90 | <widget class="QLineEdit" name="sourceAddressLineEdit"> | |
|
91 | 91 | <property name="toolTip"> |
|
92 | 92 | <string><html><head/><body><p>Set the Space Wire Brick destination Key, the default value is 32 (0x20).</p></body></html></string> |
|
93 | 93 | </property> |
@@ -110,7 +110,7 | |||
|
110 | 110 | </widget> |
|
111 | 111 | </item> |
|
112 | 112 | <item row="4" column="1"> |
|
113 |
<widget class="QLineEdit" name=" |
|
|
113 | <widget class="QLineEdit" name="destinationAddressLineEdit"> | |
|
114 | 114 | <property name="toolTip"> |
|
115 | 115 | <string><html><head/><body><p>Set the RMAP target address, this address will be used as destination address for all the RMAP transfers.</p><p>This is you SOC spw address.</p></body></html></string> |
|
116 | 116 | </property> |
@@ -133,7 +133,7 | |||
|
133 | 133 | </widget> |
|
134 | 134 | </item> |
|
135 | 135 | <item row="5" column="1"> |
|
136 |
<widget class="QLineEdit" name=" |
|
|
136 | <widget class="QLineEdit" name="destinationKeyLineEdit"> | |
|
137 | 137 | <property name="toolTip"> |
|
138 | 138 | <string><html><head/><body><p>Set the RMAP target key, this key will be used for all the RMAP transfers.</p><p>This is you SOC spw key.</p></body></html></string> |
|
139 | 139 | </property> |
@@ -174,14 +174,14 | |||
|
174 | 174 | </property> |
|
175 | 175 | </widget> |
|
176 | 176 | </item> |
|
177 |
<item row=" |
|
|
177 | <item row="10" 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=" |
|
|
184 | <item row="8" column="1"> | |
|
185 | 185 | <widget class="QRadioButton" name="setInterfaceModeQrb"> |
|
186 | 186 | <property name="text"> |
|
187 | 187 | <string>interface mode</string> |
@@ -191,14 +191,14 | |||
|
191 | 191 | </property> |
|
192 | 192 | </widget> |
|
193 | 193 | </item> |
|
194 |
<item row=" |
|
|
194 | <item row="9" column="1"> | |
|
195 | 195 | <widget class="QRadioButton" name="setRouterModeQrb"> |
|
196 | 196 | <property name="text"> |
|
197 | 197 | <string>router mode</string> |
|
198 | 198 | </property> |
|
199 | 199 | </widget> |
|
200 | 200 | </item> |
|
201 |
<item row="1 |
|
|
201 | <item row="11" 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"> |
@@ -277,6 +277,27 | |||
|
277 | 277 | </item> |
|
278 | 278 | </layout> |
|
279 | 279 | </item> |
|
280 | <item row="8" column="0"> | |
|
281 | <widget class="QCheckBox" name="spwTimecodes"> | |
|
282 | <property name="text"> | |
|
283 | <string>timecode</string> | |
|
284 | </property> | |
|
285 | </widget> | |
|
286 | </item> | |
|
287 | <item row="7" column="0"> | |
|
288 | <widget class="QLabel" name="label"> | |
|
289 | <property name="text"> | |
|
290 | <string>Timecode f (Hz)</string> | |
|
291 | </property> | |
|
292 | </widget> | |
|
293 | </item> | |
|
294 | <item row="7" column="1"> | |
|
295 | <widget class="QLineEdit" name="timecodeFrequencyLineEdit"> | |
|
296 | <property name="text"> | |
|
297 | <string>1</string> | |
|
298 | </property> | |
|
299 | </widget> | |
|
300 | </item> | |
|
280 | 301 | </layout> |
|
281 | 302 | </widget> |
|
282 | 303 | <resources/> |
@@ -34,13 +34,15 StarDundeeGUI::StarDundeeGUI(QWidget *pa | |||
|
34 | 34 | connect(this->ui->selectBrickCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(brickSelectionChanged(int))); |
|
35 | 35 | connect(this->ui->selectLinkCmbx,SIGNAL(currentIndexChanged(int)),this,SIGNAL(linkNumberSelectionChanged(int))); |
|
36 | 36 | connect(this->ui->setLinkSpeedCmbx,SIGNAL(currentIndexChanged(QString)),this,SIGNAL(linkSpeedSelectionChanged(QString))); |
|
37 |
connect(this->ui-> |
|
|
38 |
connect(this->ui-> |
|
|
39 |
connect(this->ui-> |
|
|
37 | connect(this->ui->sourceAddressLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(destinationKeyChanged(QString))); | |
|
38 | connect(this->ui->destinationAddressLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapAddressChanged(QString))); | |
|
39 | connect(this->ui->destinationKeyLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapKeyChanged(QString))); | |
|
40 | 40 | connect(this->ui->RMAPTimeoutLineEdit,SIGNAL(textChanged(QString)),this,SIGNAL(rmapTimeoutChanged(QString))); |
|
41 | connect(this->ui->timecodeFrequencyLineEdit, SIGNAL(textChanged(QString)), this, SIGNAL(timecodeFrequencyChange(QString))); | |
|
41 | 42 | connect(this->ui->connectQpb,SIGNAL(clicked()),this,SIGNAL(connectClicked())); |
|
42 | 43 | connect(this->ui->setInterfaceModeQrb, SIGNAL(toggled(bool)), this, SIGNAL(brickModeChanged(bool))); |
|
43 | 44 | connect(this->ui->resetStatsQpb, SIGNAL(clicked()), this, SLOT(resetStatistics())); |
|
45 | connect(this->ui->spwTimecodes, SIGNAL(toggled(bool)), this, SIGNAL(startSendingTimecode(bool))); | |
|
44 | 46 | } |
|
45 | 47 | |
|
46 | 48 | int StarDundeeGUI::getBrickSelection() |
@@ -58,19 +60,19 QString StarDundeeGUI::getLinkSpeedSelec | |||
|
58 | 60 | return ui->setLinkSpeedCmbx->currentText(); |
|
59 | 61 | } |
|
60 | 62 | |
|
61 |
QString StarDundeeGUI::get |
|
|
63 | QString StarDundeeGUI::getSourceAddress() | |
|
62 | 64 | { |
|
63 |
return ui-> |
|
|
65 | return ui->sourceAddressLineEdit->text(); | |
|
64 | 66 | } |
|
65 | 67 | |
|
66 |
QString StarDundeeGUI::get |
|
|
68 | QString StarDundeeGUI::getDestinationAddress() | |
|
67 | 69 | { |
|
68 |
return ui-> |
|
|
70 | return ui->destinationAddressLineEdit->text(); | |
|
69 | 71 | } |
|
70 | 72 | |
|
71 |
QString StarDundeeGUI::get |
|
|
73 | QString StarDundeeGUI::getDestinationKey() | |
|
72 | 74 | { |
|
73 |
return ui-> |
|
|
75 | return ui->destinationKeyLineEdit->text(); | |
|
74 | 76 | } |
|
75 | 77 | |
|
76 | 78 | QString StarDundeeGUI::getRmapTimeout() |
@@ -78,6 +80,16 QString StarDundeeGUI::getRmapTimeout() | |||
|
78 | 80 | return ui->RMAPTimeoutLineEdit->text(); |
|
79 | 81 | } |
|
80 | 82 | |
|
83 | QString StarDundeeGUI::getTimecodeFrequency() | |
|
84 | { | |
|
85 | return ui->timecodeFrequencyLineEdit->text(); | |
|
86 | } | |
|
87 | ||
|
88 | bool StarDundeeGUI::getStartSendingTimecodes() | |
|
89 | { | |
|
90 | return ui->spwTimecodes->isChecked(); | |
|
91 | } | |
|
92 | ||
|
81 | 93 | bool StarDundeeGUI::isBrickSetAsAnInterface() |
|
82 | 94 | { |
|
83 | 95 | return ui->setInterfaceModeQrb->isChecked(); |
@@ -113,9 +125,9 void StarDundeeGUI::lock(bool lock) | |||
|
113 | 125 | this->ui->selectBrickCmbx->setDisabled(lock); |
|
114 | 126 | this->ui->selectLinkCmbx->setDisabled(lock); |
|
115 | 127 | this->ui->setLinkSpeedCmbx->setDisabled(lock); |
|
116 |
this->ui-> |
|
|
117 |
this->ui-> |
|
|
118 |
this->ui-> |
|
|
128 | this->ui->sourceAddressLineEdit->setDisabled(lock); | |
|
129 | this->ui->destinationAddressLineEdit->setDisabled(lock); | |
|
130 | this->ui->destinationKeyLineEdit->setDisabled(lock); | |
|
119 | 131 | this->ui->RMAPTimeoutLineEdit->setDisabled(lock); |
|
120 | 132 | this->ui->setInterfaceModeQrb->setDisabled(lock); |
|
121 | 133 | this->ui->setRouterModeQrb->setDisabled(lock); |
@@ -176,33 +188,55 void StarDundeeGUI::selectLinkSpeed(int | |||
|
176 | 188 | } |
|
177 | 189 | } |
|
178 | 190 | |
|
179 |
void StarDundeeGUI::set |
|
|
191 | void StarDundeeGUI::setSourceAddress(const QString &address) | |
|
180 | 192 | { |
|
181 | 193 | bool ok; |
|
182 |
|
|
|
194 | address.toInt(&ok,10); | |
|
183 | 195 | if(ok) |
|
184 | 196 | { |
|
185 |
this->ui-> |
|
|
197 | this->ui->sourceAddressLineEdit->setText(address); | |
|
198 | } | |
|
199 | } | |
|
200 | ||
|
201 | void StarDundeeGUI::setDestinationAddress(const QString &address) | |
|
202 | { | |
|
203 | bool ok; | |
|
204 | address.toInt(&ok,10); | |
|
205 | if(ok) | |
|
206 | { | |
|
207 | this->ui->destinationAddressLineEdit->setText(address); | |
|
186 | 208 | } |
|
187 | 209 | } |
|
188 | 210 | |
|
189 |
void StarDundeeGUI::set |
|
|
211 | void StarDundeeGUI::setDestinationKey(const QString &key) | |
|
190 | 212 | { |
|
191 | 213 | bool ok; |
|
192 |
|
|
|
214 | key.toInt(&ok,10); | |
|
193 | 215 | if(ok) |
|
194 | 216 | { |
|
195 |
this->ui-> |
|
|
217 | this->ui->destinationKeyLineEdit->setText(key); | |
|
196 | 218 | } |
|
197 | 219 | } |
|
198 | 220 | |
|
199 |
void StarDundeeGUI::set |
|
|
221 | void StarDundeeGUI::setTimecodeFrequency(const QString &frequency) | |
|
200 | 222 | { |
|
201 | 223 | bool ok; |
|
202 | int tmp=key.toInt(&ok,10); | |
|
224 | frequency.toDouble(&ok); | |
|
203 | 225 | if(ok) |
|
204 | 226 | { |
|
205 |
this->ui-> |
|
|
227 | this->ui->timecodeFrequencyLineEdit->setText(frequency); | |
|
228 | } | |
|
229 | } | |
|
230 | ||
|
231 | void StarDundeeGUI::setStartSendingTimecodes( bool onOff ) | |
|
232 | { | |
|
233 | if (this->ui->spwTimecodes->isChecked()) | |
|
234 | { | |
|
235 | if (onOff==false) this->ui->spwTimecodes->setChecked(false); | |
|
236 | } | |
|
237 | else | |
|
238 | { | |
|
239 | if (onOff==true) this->ui->spwTimecodes->setChecked(true); | |
|
206 | 240 | } |
|
207 | 241 | } |
|
208 | 242 |
@@ -36,10 +36,12 public: | |||
|
36 | 36 | int getBrickSelection(); |
|
37 | 37 | int getLinkNumberSelection(); |
|
38 | 38 | QString getLinkSpeedSelection(); |
|
39 | QString getSourceAddress(); | |
|
40 | QString getDestinationAddress(); | |
|
39 | 41 | QString getDestinationKey(); |
|
40 | QString getRmapAddress(); | |
|
41 | QString getRmapKey(); | |
|
42 | 42 | QString getRmapTimeout(); |
|
43 | QString getTimecodeFrequency(); | |
|
44 | bool getStartSendingTimecodes(); | |
|
43 | 45 | bool isBrickSetAsAnInterface(); |
|
44 | 46 | signals: |
|
45 | 47 | void brickSelectionChanged(int brickIndex); |
@@ -49,8 +51,10 signals: | |||
|
49 | 51 | void rmapAddressChanged(const QString & address); |
|
50 | 52 | void rmapKeyChanged(const QString & key); |
|
51 | 53 | void rmapTimeoutChanged(const QString & timeout); |
|
54 | void timecodeFrequencyChange(const QString & timeout); | |
|
52 | 55 | void connectClicked(); |
|
53 | 56 | void brickModeChanged(bool); |
|
57 | void startSendingTimecode(bool); | |
|
54 | 58 | public slots: |
|
55 | 59 | void lock(bool lock); |
|
56 | 60 | void updateAvailableBrickCount(int count); |
@@ -58,8 +62,10 public slots: | |||
|
58 | 62 | void selectLinkNumber(int linkIndex); |
|
59 | 63 | void selectLinkSpeed(int linkSpeed); |
|
60 | 64 | void setDestinationKey(const QString & destKey); |
|
61 |
void set |
|
|
62 |
void set |
|
|
65 | void setSourceAddress(const QString & address); | |
|
66 | void setDestinationAddress(const QString & address); | |
|
67 | void setTimecodeFrequency(const QString &frequency); | |
|
68 | void setStartSendingTimecodes( bool onOff ); | |
|
63 | 69 | void setRmapTimeout(const QString & timeout); |
|
64 | 70 | int getAvailableBrickCount( void ); |
|
65 | 71 | void setBrickAsAnInterface(bool interfaceMode); |
@@ -67,6 +67,8 bool stardundeeSPW_USB::connectBridge() | |||
|
67 | 67 | { |
|
68 | 68 | if(this->manager->connectBridge()) |
|
69 | 69 | { |
|
70 | this->timecodeFrequencyChanged( ((StarDundeeGUI*)this->p_GUI)->getTimecodeFrequency()); | |
|
71 | this->startSendingTimecodes( ((StarDundeeGUI*)this->p_GUI)->getStartSendingTimecodes()); | |
|
70 | 72 | ((StarDundeeGUI*)this->p_GUI)->lock(true); |
|
71 | 73 | emit setConnected(true); |
|
72 | 74 | return true; |
@@ -281,7 +283,7 void stardundeeSPW_USB::sourceLogicalAdd | |||
|
281 | 283 | SocExplorerEngine::message(plugin,QString("Changing Destination Key: %1").arg(manager->sourceLogicalAddress),1); |
|
282 | 284 | } |
|
283 | 285 | |
|
284 |
void stardundeeSPW_USB:: |
|
|
286 | void stardundeeSPW_USB::destinationAddressChanged(const QString &rmapaddress) | |
|
285 | 287 | { |
|
286 | 288 | this->manager->destinationLogicalAddress = rmapaddress.toInt(); |
|
287 | 289 | SocExplorerEngine::message(plugin,QString("Changing RMAP address: %1").arg(manager->destinationLogicalAddress),1); |
@@ -298,6 +300,18 void stardundeeSPW_USB::brickModeChanged | |||
|
298 | 300 | this->manager->interfaceMode = interfaceMode; |
|
299 | 301 | } |
|
300 | 302 | |
|
303 | void stardundeeSPW_USB::timecodeFrequencyChanged(const QString &frequency) | |
|
304 | { | |
|
305 | this->manager->timecodeFrequency = frequency.toDouble(); | |
|
306 | this->manager->setTimecodeFrequency( this->manager->timecodeFrequency); | |
|
307 | SocExplorerEngine::message(plugin,QString("Changing timecode frequency: %1").arg(manager->timecodeFrequency),1); | |
|
308 | } | |
|
309 | ||
|
310 | void stardundeeSPW_USB::startSendingTimecodes(bool onOff ) | |
|
311 | { | |
|
312 | this->manager->sendTimecodePeriodically( onOff ); | |
|
313 | } | |
|
314 | ||
|
301 | 315 | void stardundeeSPW_USB::rmapTimeoutChanged(const QString &timeout) |
|
302 | 316 | { |
|
303 | 317 | int tim=timeout.toInt(); |
@@ -320,32 +334,36 void stardundeeSPW_USB::makeGUI(socexplo | |||
|
320 | 334 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(linkNumberSelectionChanged(int)),this,SLOT(linkNumberSelectionChanged(int))); |
|
321 | 335 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(linkSpeedSelectionChanged(QString)),this,SLOT(linkSpeedSelectionChanged(QString))); |
|
322 | 336 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(sourceLogicalAddressChanged(QString)),this,SLOT(sourceLogicalAddressChanged(QString))); |
|
323 |
connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(rmapAddressChanged(QString)),this,SLOT( |
|
|
337 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(rmapAddressChanged(QString)),this,SLOT(destinationAddressChanged(QString))); | |
|
324 | 338 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(destinationKeyChanged(QString)),this,SLOT(destinationKeyChanged(QString))); |
|
325 | 339 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(rmapTimeoutChanged(QString)),this,SLOT(rmapTimeoutChanged(QString))); |
|
326 | 340 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(brickModeChanged(bool)), this, SLOT(brickModeChanged(bool))); |
|
341 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(timecodeFrequencyChange(QString)), this, SLOT(timecodeFrequencyChanged(QString))); | |
|
342 | connect(((StarDundeeGUI*)this->p_GUI),SIGNAL(startSendingTimecode(bool)), this, SLOT(startSendingTimecodes(bool))); | |
|
327 | 343 | |
|
328 | this->brickSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getBrickSelection()); | |
|
329 | this->linkNumberSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getLinkNumberSelection()); | |
|
330 | this->linkSpeedSelectionChanged(((StarDundeeGUI*)this->p_GUI)->getLinkSpeedSelection()); | |
|
331 |
this->sourceLogicalAddressChanged(((StarDundeeGUI*)this->p_GUI)->get |
|
|
332 |
this-> |
|
|
333 |
this->destinationKeyChanged(((StarDundeeGUI*)this->p_GUI)->get |
|
|
334 | this->rmapTimeoutChanged(((StarDundeeGUI*)this->p_GUI)->getRmapTimeout()); | |
|
335 | this->brickModeChanged(((StarDundeeGUI*)this->p_GUI)->isBrickSetAsAnInterface()); | |
|
344 | this->brickSelectionChanged( ((StarDundeeGUI*)this->p_GUI)->getBrickSelection()); | |
|
345 | this->linkNumberSelectionChanged( ((StarDundeeGUI*)this->p_GUI)->getLinkNumberSelection()); | |
|
346 | this->linkSpeedSelectionChanged( ((StarDundeeGUI*)this->p_GUI)->getLinkSpeedSelection()); | |
|
347 | this->sourceLogicalAddressChanged(((StarDundeeGUI*)this->p_GUI)->getSourceAddress()); | |
|
348 | this->destinationAddressChanged( ((StarDundeeGUI*)this->p_GUI)->getDestinationAddress()); | |
|
349 | this->destinationKeyChanged( ((StarDundeeGUI*)this->p_GUI)->getDestinationKey()); | |
|
350 | this->rmapTimeoutChanged( ((StarDundeeGUI*)this->p_GUI)->getRmapTimeout()); | |
|
351 | this->brickModeChanged( ((StarDundeeGUI*)this->p_GUI)->isBrickSetAsAnInterface()); | |
|
336 | 352 | |
|
337 | connect(this,SIGNAL(SelectBrick(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectBrick(int))); | |
|
338 | connect(this,SIGNAL(SelectLinkNumber(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectLinkNumber(int))); | |
|
339 | connect(this,SIGNAL(SelectLinkSpeed(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectLinkSpeed(int))); | |
|
340 | connect(this,SIGNAL(SetDestinationKey(QString)), ((StarDundeeGUI*)this->p_GUI),SLOT(setDestinationKey(QString))); | |
|
341 |
connect(this,SIGNAL(Set |
|
|
342 |
connect(this,SIGNAL(Set |
|
|
343 | connect(this,SIGNAL(SetRmapTimeout(QString)), ((StarDundeeGUI*)this->p_GUI),SLOT(setRmapTimeout(QString))); | |
|
344 | connect(this,SIGNAL(GetAvailableBrickCount()), ((StarDundeeGUI*)this->p_GUI),SLOT(getAvailableBrickCount())); | |
|
345 | connect(this,SIGNAL(SetBrickAsAnInterface(bool)), ((StarDundeeGUI*)this->p_GUI),SLOT(setBrickAsAnInterface(bool))); | |
|
346 | connect(this,SIGNAL(SetBrickAsARouter(bool)), ((StarDundeeGUI*)this->p_GUI),SLOT(setBrickAsARouter(bool))); | |
|
347 | connect(this,SIGNAL(BytesReceivedFromSpw(uint)), ((StarDundeeGUI*)this->p_GUI),SLOT(updateNbReceivedBytesFromSpw(uint))); | |
|
348 | connect(this,SIGNAL(BytesTransmittedToSpw(uint)),((StarDundeeGUI*)this->p_GUI),SLOT(updateNbTransmittedBytesToSpw(uint))); | |
|
353 | connect(this,SIGNAL(SelectBrick(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectBrick(int))); | |
|
354 | connect(this,SIGNAL(SelectLinkNumber(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectLinkNumber(int))); | |
|
355 | connect(this,SIGNAL(SelectLinkSpeed(int)), ((StarDundeeGUI*)this->p_GUI),SLOT(selectLinkSpeed(int))); | |
|
356 | connect(this,SIGNAL(SetDestinationKey(QString)), ((StarDundeeGUI*)this->p_GUI),SLOT(setDestinationKey(QString))); | |
|
357 | connect(this,SIGNAL(SetDestinationAddress(QString)),((StarDundeeGUI*)this->p_GUI),SLOT(setDestinationAddress(QString))); | |
|
358 | connect(this,SIGNAL(SetSourceAddress(QString)), ((StarDundeeGUI*)this->p_GUI),SLOT(setSourceAddress(QString))); | |
|
359 | connect(this,SIGNAL(SetRmapTimeout(QString)), ((StarDundeeGUI*)this->p_GUI),SLOT(setRmapTimeout(QString))); | |
|
360 | connect(this,SIGNAL(GetAvailableBrickCount()), ((StarDundeeGUI*)this->p_GUI),SLOT(getAvailableBrickCount())); | |
|
361 | connect(this,SIGNAL(SetBrickAsAnInterface(bool)), ((StarDundeeGUI*)this->p_GUI),SLOT(setBrickAsAnInterface(bool))); | |
|
362 | connect(this,SIGNAL(SetBrickAsARouter(bool)), ((StarDundeeGUI*)this->p_GUI),SLOT(setBrickAsARouter(bool))); | |
|
363 | connect(this,SIGNAL(BytesReceivedFromSpw(uint)), ((StarDundeeGUI*)this->p_GUI),SLOT(updateNbReceivedBytesFromSpw(uint))); | |
|
364 | connect(this,SIGNAL(BytesTransmittedToSpw(uint)), ((StarDundeeGUI*)this->p_GUI),SLOT(updateNbTransmittedBytesToSpw(uint))); | |
|
365 | connect(this,SIGNAL(SetTimecodeFrequency(double)), ((StarDundeeGUI*)this->p_GUI),SLOT(setTimecodeFrequency(QString))); | |
|
366 | connect(this,SIGNAL(StartSendingTimecodes(bool)), ((StarDundeeGUI*)this->p_GUI),SLOT(setStartSendingTimecodes(bool))); | |
|
349 | 367 | } |
|
350 | 368 | |
|
351 | 369 | void stardundeeSPW_USB::sendPacketComingFromTCPServer(char *packet, int size) |
@@ -997,24 +1015,41 void stardundeeSPW_USB_Manager::pushRmap | |||
|
997 | 1015 | RMAP_AnswersMtx->unlock(); |
|
998 | 1016 | } |
|
999 | 1017 | |
|
1000 | ||
|
1001 | ||
|
1002 | ||
|
1018 | void stardundeeSPW_USB_Manager::sendTimecodePeriodically( bool onOff ) | |
|
1019 | { | |
|
1020 | if (onOff == true) | |
|
1021 | { | |
|
1022 | if (!USBSpaceWire_TC_EnableAutoTickIn(hDevice, 1, 1)) | |
|
1023 | SocExplorerEngine::message(this->plugin,"Could not enable auto tick-in"); | |
|
1024 | } | |
|
1025 | else | |
|
1026 | { | |
|
1027 | if (!USBSpaceWire_TC_EnableAutoTickIn(hDevice, 0, 0)) | |
|
1028 | SocExplorerEngine::message(this->plugin,"Could not disable auto tick-in"); | |
|
1029 | } | |
|
1030 | } | |
|
1003 | 1031 | |
|
1004 | ||
|
1032 | void stardundeeSPW_USB_Manager::setTimecodeFrequency(double requestedFrequency) | |
|
1033 | { | |
|
1034 | U32 rtr_clk_freq; | |
|
1035 | U32 freqCount; | |
|
1036 | double freqCountInDouble; | |
|
1037 | double currentFrequency; | |
|
1005 | 1038 | |
|
1039 | rtr_clk_freq = USBSpaceWire_TC_GetClockFrequency(hDevice); | |
|
1040 | freqCountInDouble = ((double) rtr_clk_freq) / requestedFrequency; | |
|
1041 | freqCount = (unsigned int) freqCountInDouble; | |
|
1006 | 1042 | |
|
1043 | currentFrequency = ((double) rtr_clk_freq) / ((double) freqCount); | |
|
1044 | ||
|
1045 | //************************************************** | |
|
1046 | // auto _ tick _ freq = rtr _ clk _ freq / freqCount | |
|
1047 | if (!USBSpaceWire_TC_SetAutoTickInFrequency(hDevice, freqCount) ) | |
|
1048 | SocExplorerEngine::message(this->plugin,"Could not set the tick-in frequency"); | |
|
1049 | else | |
|
1050 | SocExplorerEngine::message(this->plugin,"tick frequency set to " + QString::number(currentFrequency) +" Hz"); | |
|
1051 | } | |
|
1007 | 1052 | |
|
1008 | 1053 | |
|
1009 | 1054 | |
|
1010 | 1055 | |
|
1011 | ||
|
1012 | ||
|
1013 | ||
|
1014 | ||
|
1015 | ||
|
1016 | ||
|
1017 | ||
|
1018 | ||
|
1019 | ||
|
1020 |
@@ -53,6 +53,7 public: | |||
|
53 | 53 | unsigned char setRoutingTableEntry(int tableEntry, U32 dwOutputPorts, char bDelHead); |
|
54 | 54 | unsigned int getRoutingTableEntry(int tableEntry); |
|
55 | 55 | void initializeTimecodeGeneration(); |
|
56 | void setTimecodeFrequency(double requestedFrequency); | |
|
56 | 57 | unsigned int getLinkStatus(unsigned char link); |
|
57 | 58 | bool disconnectBridge(); |
|
58 | 59 | int getRMAPtransactionID(); |
@@ -65,6 +66,9 signals: | |||
|
65 | 66 | void bytesReceivedFromSpw( unsigned int ); |
|
66 | 67 | void bytesTransmittedToSpw( unsigned int); |
|
67 | 68 | |
|
69 | public slots: | |
|
70 | void sendTimecodePeriodically( bool onOff ); | |
|
71 | ||
|
68 | 72 | private: |
|
69 | 73 | QMutex* handleMutex,*RMAP_AnswersMtx,*RMAP_pending_transaction_IDsMtx; |
|
70 | 74 | QSemaphore* RMAP_AnswersSem; |
@@ -94,6 +98,7 public: | |||
|
94 | 98 | int destinationLogicalAddress; |
|
95 | 99 | int destinationKey; |
|
96 | 100 | int RMAPtimeout; |
|
101 | double timecodeFrequency; | |
|
97 | 102 | bool interfaceMode; // 1 => interface mode, 0 => router mode |
|
98 | 103 | }; |
|
99 | 104 | |
@@ -111,14 +116,16 signals: | |||
|
111 | 116 | void SelectLinkNumber(int linkIndex); |
|
112 | 117 | void SelectLinkSpeed(int linkSpeed); |
|
113 | 118 | void SetDestinationKey(const QString & destKey); |
|
114 |
void Set |
|
|
115 |
void Set |
|
|
119 | void SetSourceAddress(const QString & address); | |
|
120 | void SetDestinationAddress(const QString & address); | |
|
116 | 121 | void SetRmapTimeout(const QString & timeout); |
|
122 | void SetTimecodeFrequency( double ); | |
|
117 | 123 | void SetBrickAsAnInterface( bool ); |
|
118 | 124 | void SetBrickAsARouter( bool ); |
|
119 | 125 | int GetAvailableBrickCount( void ); |
|
120 | 126 | void BytesReceivedFromSpw( unsigned int ); |
|
121 | 127 | void BytesTransmittedToSpw( unsigned int ); |
|
128 | void StartSendingTimecodes( bool ); | |
|
122 | 129 | |
|
123 | 130 | public slots: |
|
124 | 131 | void toggleBridgeConnection(); |
@@ -131,11 +138,13 public slots: | |||
|
131 | 138 | void linkNumberSelectionChanged(int linkIndex); |
|
132 | 139 | void linkSpeedSelectionChanged(const QString & linkSpeed); |
|
133 | 140 | void sourceLogicalAddressChanged(const QString & destKey); |
|
134 |
void |
|
|
141 | void destinationAddressChanged(const QString & rmapaddress); | |
|
135 | 142 | void brickModeChanged( bool interfaceMode ); |
|
136 | 143 | void destinationKeyChanged(const QString & key); |
|
137 | 144 | void rmapTimeoutChanged(const QString & timeout); |
|
138 | 145 | void sendPacketComingFromTCPServer(char *packet, int size); |
|
146 | void timecodeFrequencyChanged(const QString &frequency); | |
|
147 | void startSendingTimecodes( bool onOff ); | |
|
139 | 148 | private: |
|
140 | 149 | void makeGUI(socexplorerplugin *parent); |
|
141 | 150 | stardundeeSPW_USB_Manager* manager; |
@@ -98,9 +98,9 void spwplugin::bridgeSelectionChanged(c | |||
|
98 | 98 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSelectBrick(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectBrick(int))); |
|
99 | 99 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSelectLinkNumber(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkNumber(int))); |
|
100 | 100 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSelectLinkSpeed(int)),((stardundeeSPW_USB*)bridge),SIGNAL(SelectLinkSpeed(int))); |
|
101 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetSourceAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetSourceAddress(QString))); | |
|
102 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetDestinationAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationAddress(QString))); | |
|
101 | 103 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetDestinationKey(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetDestinationKey(QString))); |
|
102 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetRmapAddress(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetRmapAddress(QString))); | |
|
103 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetRmapKey(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetRmapKey(QString))); | |
|
104 | 104 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetRmapTimeout(QString)),((stardundeeSPW_USB*)bridge),SIGNAL(SetRmapTimeout(QString))); |
|
105 | 105 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(connectBridge()),((stardundeeSPW_USB*)bridge),SLOT(connectBridge())); |
|
106 | 106 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(disconnectBridge()),((stardundeeSPW_USB*)bridge),SLOT(disconnectBridge())); |
@@ -109,6 +109,10 void spwplugin::bridgeSelectionChanged(c | |||
|
109 | 109 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsAnInterface(bool))); |
|
110 | 110 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetBrickAsARouter(bool)), |
|
111 | 111 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetBrickAsARouter(bool))); |
|
112 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeStartTimecodes(bool)), | |
|
113 | ((stardundeeSPW_USB*)bridge),SIGNAL(StartSendingTimecodes(bool))); | |
|
114 | connect(((spwPyWrapper*)this->pyObject),SIGNAL(StarDundeeSetTimecodeFrequency(double)), | |
|
115 | ((stardundeeSPW_USB*)bridge),SIGNAL(SetTimecodeFrequency(double))); | |
|
112 | 116 | connect(this->bridge,SIGNAL(pushPacketOverTCP(char*,int)),this->tcpServer,SLOT(pushPacket(char*,int))); |
|
113 | 117 | connect(this->tcpServer, SIGNAL(sendSPWPacket(char*,int)), ((stardundeeSPW_USB*)bridge), SLOT(sendPacketComingFromTCPServer(char*,int))); |
|
114 | 118 | } |
@@ -14,13 +14,15 signals: | |||
|
14 | 14 | void StarDundeeSelectBrick(int brickIndex); |
|
15 | 15 | void StarDundeeSelectLinkNumber(int linkIndex); |
|
16 | 16 | void StarDundeeSelectLinkSpeed(int linkSpeed); |
|
17 |
void StarDundeeSet |
|
|
18 |
void StarDundeeSet |
|
|
19 |
void StarDundeeSet |
|
|
17 | void StarDundeeSetSourceAddress(const QString & destKey); | |
|
18 | void StarDundeeSetDestinationAddress(const QString & address); | |
|
19 | void StarDundeeSetDestinationKey(const QString & key); | |
|
20 | 20 | void StarDundeeSetRmapTimeout(const QString & timeout); |
|
21 | 21 | int StarDundeeGetAvailableBrickCount(); |
|
22 | 22 | void StarDundeeSetBrickAsAninterface( bool ); |
|
23 | 23 | void StarDundeeSetBrickAsARouter( bool ); |
|
24 | void StarDundeeSetTimecodeFrequency( double ); | |
|
25 | void StarDundeeStartTimecodes( bool ); | |
|
24 | 26 | |
|
25 | 27 | void TCPServerConnect(); |
|
26 | 28 | void TCPServerDisconnect(); |
General Comments 0
You need to be logged in to leave comments.
Login now