summaryrefslogtreecommitdiffstats
path: root/clients
diff options
context:
space:
mode:
Diffstat (limited to 'clients')
-rw-r--r--clients/tde/src/app/views/instrumentview.cpp15
-rw-r--r--clients/tde/src/part/fpgaprogram/Makefile.am8
-rw-r--r--clients/tde/src/part/fpgaprogram/layout.ui19
-rw-r--r--clients/tde/src/part/fpgaprogram/part.cpp37
-rw-r--r--clients/tde/src/part/fpgaprogram/part.h2
-rw-r--r--clients/tde/src/part/fpgaview/part.cpp27
6 files changed, 42 insertions, 66 deletions
diff --git a/clients/tde/src/app/views/instrumentview.cpp b/clients/tde/src/app/views/instrumentview.cpp
index 24d0632..191444d 100644
--- a/clients/tde/src/app/views/instrumentview.cpp
+++ b/clients/tde/src/app/views/instrumentview.cpp
@@ -49,14 +49,21 @@ void InstrumentView::init() {
}
void InstrumentView::resizeEvent(TQResizeEvent *) {
- TQWidget *childPartWidget = m_instrumentPart->widget();
- if (childPartWidget) {
- setFixedSize(childPartWidget->sizeHint());
+ if (m_instrumentPart) {
+ TQWidget *childPartWidget = m_instrumentPart->widget();
+ if (childPartWidget) {
+ setFixedSize(childPartWidget->sizeHint());
+ }
}
}
TQPtrList<KAction> InstrumentView::menuActionList() {
- return m_instrumentPart->menuActionList();
+ if (m_instrumentPart) {
+ return m_instrumentPart->menuActionList();
+ }
+ else {
+ return TQPtrList<KAction>();
+ }
}
void InstrumentView::setStatusMessage(const TQString& message) {
diff --git a/clients/tde/src/part/fpgaprogram/Makefile.am b/clients/tde/src/part/fpgaprogram/Makefile.am
index 63fdf0f..e333ce1 100644
--- a/clients/tde/src/part/fpgaprogram/Makefile.am
+++ b/clients/tde/src/part/fpgaprogram/Makefile.am
@@ -3,7 +3,7 @@ KDE_CXXFLAGS = $(USE_EXCEPTIONS)
METASOURCES = AUTO
# Part
-kde_module_LTLIBRARIES = libremotelab_fpgaviewer.la
-libremotelab_fpgaviewer_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket -ltqtrla
-libremotelab_fpgaviewer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_TDECORE) $(LIB_TDEUI) -lkio -ltdefx
-libremotelab_fpgaviewer_la_SOURCES = part.cpp layout.ui
+kde_module_LTLIBRARIES = libremotelab_fpgaprogrammer.la
+libremotelab_fpgaprogrammer_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket -ltqtrla
+libremotelab_fpgaprogrammer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_TDECORE) $(LIB_TDEUI) -lkio -ltdefx
+libremotelab_fpgaprogrammer_la_SOURCES = part.cpp layout.ui
diff --git a/clients/tde/src/part/fpgaprogram/layout.ui b/clients/tde/src/part/fpgaprogram/layout.ui
index 985acfe..3f528bb 100644
--- a/clients/tde/src/part/fpgaprogram/layout.ui
+++ b/clients/tde/src/part/fpgaprogram/layout.ui
@@ -21,7 +21,7 @@
<cstring>groupFPGAProgram</cstring>
</property>
<property name="title">
- <string>FPGA Viewer</string>
+ <string>Setup</string>
</property>
<grid>
<property name="name">
@@ -51,7 +51,7 @@
<cstring>programRunButton</cstring>
</property>
<property name="text">
- <cstring>Download Program</cstring>
+ <cstring>Upload File</cstring>
</property>
</widget>
<widget class="TQProgressBar" row="2" column="0" colspan="3">
@@ -69,6 +69,21 @@
</widget>
</grid>
</widget>
+ <widget class="TQGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupProgrammingLog</cstring>
+ </property>
+ <property name="title">
+ <string>Log</string>
+ </property>
+ <grid>
+ <widget class="KTextEdit" row="0" column="0" colspan="0">
+ <property name="name">
+ <cstring>programmingLogBox</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
</grid>
</widget>
<includes>
diff --git a/clients/tde/src/part/fpgaprogram/part.cpp b/clients/tde/src/part/fpgaprogram/part.cpp
index bf7e46a..b51c39a 100644
--- a/clients/tde/src/part/fpgaprogram/part.cpp
+++ b/clients/tde/src/part/fpgaprogram/part.cpp
@@ -137,7 +137,7 @@ void FPGAProgramPart::connectionClosed() {
}
void FPGAProgramPart::postInit() {
- connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateDisplay()));
+ connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(mainEventLoop()));
}
bool FPGAProgramPart::openURL(const KURL &url) {
@@ -237,44 +237,21 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl
connToServerState = 3;
connToServerConnecting = false;
connect(m_socket, SIGNAL(readyRead()), m_socket, SLOT(processPendingData()));
- connect(m_socket, SIGNAL(newDataReceived()), this, SLOT(updateDisplay()));
+ connect(m_socket, SIGNAL(newDataReceived()), this, SLOT(mainEventLoop()));
m_tickerState = 0;
m_commHandlerState = 0;
m_commHandlerMode = 0;
m_updateTimer->start(FPGA_COMM_TIMEOUT_MS, FALSE);
processLockouts();
- updateDisplay();
- return;
- }
- else if (response == "ERRNOCONN") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>Unable to establish connection with backend server<p>Please verify that you are currently connected to a workspace</qt>"), i18n("Connection Failed"));
- close();
- return;
- }
- else if (response == "ERRNOTAVL") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>The backend server is not available at this time<p>Please try a different workspace, or try again later</qt>"), i18n("Connection Failed"));
- close();
- return;
- }
- else if (response == "ERRNOSERV") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>The active laboratory workspace does not support the requested service</qt>"), i18n("Service Unavailable"));
- close();
+ mainEventLoop();
return;
}
else {
+ TQStringList errorStrings = textForServerError(response);
connToServerState = -1;
connToServerConnecting = false;
disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>Unable to establish connection with remote server</qt>"), i18n("Connection Failed"));
+ KMessageBox::error(0, errorStrings[0], errorStrings[1]);
close();
return;
}
@@ -318,11 +295,11 @@ void FPGAProgramPart::programRunButtonClicked() {
while (m_socket->bytesAvailable() > 0) { \
m_socket->readBlock(data, 64); \
} \
- setStatusMessage(i18n("Debug interface timeout, still waiting for data. Please verify that the FPGA is properly configured.")); \
+ setStatusMessage(i18n("Server ping timeout. Please verify the status of your network connection.")); \
m_updateTimer->start(FPGA_COMM_TIMEOUT_MS, FALSE); \
return;
-void FPGAProgramPart::updateDisplay() {
+void FPGAProgramPart::mainEventLoop() {
m_updateTimer->stop();
TQDataStream ds(m_socket);
diff --git a/clients/tde/src/part/fpgaprogram/part.h b/clients/tde/src/part/fpgaprogram/part.h
index a663b11..f254cbc 100644
--- a/clients/tde/src/part/fpgaprogram/part.h
+++ b/clients/tde/src/part/fpgaprogram/part.h
@@ -67,7 +67,7 @@ namespace RemoteLab
private slots:
void postInit();
void resizeToHint();
- void updateDisplay();
+ void mainEventLoop();
void processLockouts();
void connectionClosed();
void disconnectFromServer();
diff --git a/clients/tde/src/part/fpgaview/part.cpp b/clients/tde/src/part/fpgaview/part.cpp
index 87ac05a..755f25c 100644
--- a/clients/tde/src/part/fpgaview/part.cpp
+++ b/clients/tde/src/part/fpgaview/part.cpp
@@ -1076,35 +1076,12 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl
updateDisplay();
return;
}
- else if (response == "ERRNOCONN") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>Unable to establish connection with backend server<p>Please verify that you are currently connected to a workspace</qt>"), i18n("Connection Failed"));
- close();
- return;
- }
- else if (response == "ERRNOTAVL") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>The backend server is not available at this time<p>Please try a different workspace, or try again later</qt>"), i18n("Connection Failed"));
- close();
- return;
- }
- else if (response == "ERRNOSERV") {
- connToServerState = -1;
- connToServerConnecting = false;
- disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>The active laboratory workspace does not support the requested service</qt>"), i18n("Service Unavailable"));
- close();
- return;
- }
else {
+ TQStringList errorStrings = textForServerError(response);
connToServerState = -1;
connToServerConnecting = false;
disconnectFromServer();
- KMessageBox::error(0, i18n("<qt>Unable to establish connection with remote server</qt>"), i18n("Connection Failed"));
+ KMessageBox::error(0, errorStrings[0], errorStrings[1]);
close();
return;
}