diff --git a/spwplugin/spwplugin.pro b/spwplugin/spwplugin.pro
--- a/spwplugin/spwplugin.pro
+++ b/spwplugin/spwplugin.pro
@@ -36,13 +36,18 @@ HEADERS += \
spwplugin.h \
stardundeespw_usb.h \
abstractspwbridge.h \
- spw.h
+ spw.h \
+ stardundeegui.h
SOURCES += \
spwplugin.cpp \
stardundeespw_usb.cpp \
- abstractspwbridge.cpp
+ abstractspwbridge.cpp \
+ stardundeegui.cpp
+
+FORMS += \
+ stardundeeGUI.ui
diff --git a/spwplugin/stardundeeGUI.ui b/spwplugin/stardundeeGUI.ui
new file mode 100644
--- /dev/null
+++ b/spwplugin/stardundeeGUI.ui
@@ -0,0 +1,104 @@
+
+
+ StarDundeeUI
+
+
+
+ 0
+ 0
+ 614
+ 152
+
+
+
+ Form
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+ -
+
+
+ Select Brick
+
+
+
+ -
+
+
-
+
+ None
+
+
+
+
+ -
+
+
+ Select link number
+
+
+
+ -
+
+
-
+
+ 1
+
+
+ -
+
+ 2
+
+
+
+
+ -
+
+
+ Link Speed
+
+
+
+ -
+
+
-
+
+ 10MHz
+
+
+
+
+ -
+
+
+ Destination key
+
+
+
+ -
+
+
+
+
+
+ 32
+
+
+ 3
+
+
+
+ -
+
+
+ Connect
+
+
+
+
+
+
+
+
diff --git a/spwplugin/stardundeegui.cpp b/spwplugin/stardundeegui.cpp
new file mode 100644
--- /dev/null
+++ b/spwplugin/stardundeegui.cpp
@@ -0,0 +1,9 @@
+#include "stardundeegui.h"
+
+#include "ui_stardundeeGUI.h"
+
+StarDundeeGUI::StarDundeeGUI(QWidget *parent) :
+ QWidget(parent),ui(new Ui::StarDundeeUI)
+{
+ this->ui->setupUi(this);
+}
diff --git a/spwplugin/stardundeegui.h b/spwplugin/stardundeegui.h
new file mode 100644
--- /dev/null
+++ b/spwplugin/stardundeegui.h
@@ -0,0 +1,24 @@
+#ifndef STARDUNDEEGUI_H
+#define STARDUNDEEGUI_H
+
+#include
+
+namespace Ui {
+ class StarDundeeUI;
+}
+
+class StarDundeeGUI : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit StarDundeeGUI(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+private:
+ Ui::StarDundeeUI *ui;
+};
+
+#endif // STARDUNDEEGUI_H
diff --git a/spwplugin/stardundeespw_usb.cpp b/spwplugin/stardundeespw_usb.cpp
--- a/spwplugin/stardundeespw_usb.cpp
+++ b/spwplugin/stardundeespw_usb.cpp
@@ -29,7 +29,7 @@ stardundeeSPW_USB::stardundeeSPW_USB(soc
{
Q_UNUSED(parent)
this->manager = new stardundeeSPW_USB_Manager(parent,this);
- makeGUI(socexplorerplugin *parent);
+ makeGUI(parent);
this->manager->start();
}
@@ -190,14 +190,16 @@ unsigned int stardundeeSPW_USB::Read(uns
return read;
}
+void stardundeeSPW_USB::updateAvailableBrickCount(int count)
+{
+
+}
+
void stardundeeSPW_USB::makeGUI(socexplorerplugin *parent)
{
- this->p_GUI = new QWidget(parent);
+ this->p_GUI = new StarDundeeGUI(plugin);
this->mainLayout = new QGridLayout(this->p_GUI);
- this->p_GUI->setLayout(mainLayout);
- this->connectBridgeButton = new QPushButton("Connect");
- this->mainLayout->addWidget(this->connectBridgeButton,1,0,1,1);
- connect(this->connectBridgeButton,SIGNAL(clicked()),this,SLOT(toggleBridgeConnection()));
+// connect(this->connectBridgeButton,SIGNAL(clicked()),this,SLOT(toggleBridgeConnection()));
}
stardundeeSPW_USB_Manager::stardundeeSPW_USB_Manager(socexplorerplugin *plugin, QObject *parent)
@@ -300,10 +302,9 @@ void stardundeeSPW_USB_Manager::run()
else
{
sleep(1);
- SocExplorerEngine::message(this->plugin,"Bridge not connected");
+ this->brickList = USBSpaceWire_ListDevices();
}
usleep(1000);
- // sleep(2);
}
SocExplorerEngine::message(this->plugin,"Exiting Startdundee USB pooling thread");
}
diff --git a/spwplugin/stardundeespw_usb.h b/spwplugin/stardundeespw_usb.h
--- a/spwplugin/stardundeespw_usb.h
+++ b/spwplugin/stardundeespw_usb.h
@@ -32,6 +32,9 @@
#include
#include
#include
+#include
+#include
+#include "stardundeegui.h"
class RMAP_Answer
{
@@ -70,6 +73,7 @@ private:
QList RMAP_Answers;
QList RMAP_pending_transaction_IDs;
int linkNumber;
+ int brickList;
};
class stardundeeSPW_USB : public abstractSpwBridge
@@ -88,12 +92,13 @@ public slots:
int pushRMAPPacket(char* packet,int size);
unsigned int Write(unsigned int *Value,unsigned int count, unsigned int address=0);
unsigned int Read(unsigned int *Value,unsigned int count, unsigned int address=0);
-
+ void updateAvailableBrickCount(int count);
private:
void makeGUI(socexplorerplugin *parent);
stardundeeSPW_USB_Manager* manager;
QGridLayout* mainLayout;
QPushButton* connectBridgeButton;
+ QComboBox* selectBrickQcmbx;
};
#endif // STARDUNDEESPW_USB_H