Index: /trunk/BNC/bnc.pro
===================================================================
--- /trunk/BNC/bnc.pro	(revision 1751)
+++ /trunk/BNC/bnc.pro	(revision 1752)
@@ -32,5 +32,5 @@
           bncnetqueryrtp.h bncsettings.h latencychecker.h             \
           bncipport.h bncnetqueryv0.h bncnetqueryudp.h                \ 
-          bncserialport.h                                             \ 
+          bncserialport.h bncnetquerys.h                              \ 
           RTCM/GPSDecoder.h RTCM/RTCM2.h RTCM/RTCM2Decoder.h          \
           RTCM/RTCM2_2021.h RTCM/rtcm_utils.h                         \
@@ -53,5 +53,5 @@
           bncnetqueryrtp.cpp bncsettings.cpp latencychecker.cpp       \
           bncipport.cpp bncnetqueryv0.cpp bncnetqueryudp.cpp          \
-          bncserialport.cpp                                           \
+          bncserialport.cpp bncnetquerys.cpp                          \
           RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp                        \
           RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp                     \
Index: /trunk/BNC/bncnetquerys.cpp
===================================================================
--- /trunk/BNC/bncnetquerys.cpp	(revision 1752)
+++ /trunk/BNC/bncnetquerys.cpp	(revision 1752)
@@ -0,0 +1,202 @@
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Client
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bncnetquerys
+ *
+ * Purpose:    Serial Communication Requests, no NTRIP
+ *
+ * Author:     G. Weber
+ *
+ * Created:    8-Mar-2009
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include "bncnetquerys.h"
+
+using namespace std;
+
+#define BNCVERSION "1.7"
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+bncNetQueryS::bncNetQueryS() {
+
+  _serialPort = 0;
+
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bncNetQueryS::~bncNetQueryS() {
+  delete _serialPort;
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryS::stop() {
+#ifndef sparc
+  if (_serialPort) {
+  }
+#endif
+  _status = finished;
+} 
+
+// 
+/////////////////////////////////////////////////////////////////////////////
+void bncNetQueryS::waitForRequestResult(const QUrl&, QByteArray&) {
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryS::waitForReadyRead(QByteArray& outData) {
+  if (_serialPort) {
+    while (true) {
+      int nb = _serialPort->bytesAvailable();
+      if (nb > 0) {
+        outData = _serialPort->read(nb);
+        return;
+      }
+    }
+  }
+}
+
+// Connect to Serial Port
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryS::startRequest(const QUrl& url, const QByteArray& gga) {
+
+  QByteArray dummy_gga = gga;
+
+  _url = url;
+  if (_url.scheme().isEmpty()) {
+    _url.setScheme("http");
+  }
+  if (_url.path().isEmpty()) {
+    _url.setPath("/");
+  }
+
+  QString hlp;
+  QStringList hlpL;
+  hlp = _url.host().toAscii().replace("-"," ");
+  hlpL = hlp.split(" ");
+
+  // Serial Port
+  // -----------
+  QString _portString;
+  if (hlpL.size() == 6) {
+    _portString = hlpL[hlpL.size()-6].replace("com","COM");
+  } else {
+    _portString = "/" + hlpL[hlpL.size()-7] + "/" + hlpL[hlpL.size()-6].replace("ttys","ttyS");
+  }
+  _serialPort = new QextSerialPort(_portString);
+
+  // Baud Rate
+  // ---------
+  hlp = hlpL[hlpL.size()-1];
+  if      (hlp == "110") {
+    _serialPort->setBaudRate(BAUD110);
+  }
+  else if (hlp == "300") {
+    _serialPort->setBaudRate(BAUD300);
+  }
+  else if (hlp == "600") {
+    _serialPort->setBaudRate(BAUD600);
+  }
+  else if (hlp == "1200") {
+    _serialPort->setBaudRate(BAUD1200);
+  }
+  else if (hlp == "2400") {
+    _serialPort->setBaudRate(BAUD2400);
+  }
+  else if (hlp == "4800") {
+  printf("4800\n");
+    _serialPort->setBaudRate(BAUD4800);
+  }
+  else if (hlp == "9600") {
+    _serialPort->setBaudRate(BAUD9600);
+  }
+  else if (hlp == "19200") {
+    _serialPort->setBaudRate(BAUD19200);
+  }
+  else if (hlp == "38400") {
+    _serialPort->setBaudRate(BAUD38400);
+  }
+  else if (hlp == "57600") {
+    _serialPort->setBaudRate(BAUD57600);
+  }
+  else if (hlp == "115200") {
+    _serialPort->setBaudRate(BAUD115200);
+  }
+
+  // Parity
+  // ------
+  hlp = hlpL[hlpL.size()-4].toUpper();
+  if      (hlp == "NONE") {
+  printf("NONE\n");
+    _serialPort->setParity(PAR_NONE);
+  }
+  else if (hlp == "ODD") {
+    _serialPort->setParity(PAR_ODD);
+  }
+  else if (hlp == "EVEN") {
+    _serialPort->setParity(PAR_EVEN);
+  }
+  else if (hlp == "SPACE") {
+    _serialPort->setParity(PAR_SPACE);
+  }
+
+  // Data Bits
+  // ---------
+  hlp = hlpL[hlpL.size()-5];
+  if      (hlp == "5") {
+    _serialPort->setDataBits(DATA_5);
+  }
+  else if (hlp == "6") {
+    _serialPort->setDataBits(DATA_6);
+  }
+  else if (hlp == "7") {
+    _serialPort->setDataBits(DATA_7);
+  }
+  else if (hlp == "8") {
+  printf("8\n");
+    _serialPort->setDataBits(DATA_8);
+  }
+
+  // Stop Bits
+  // ---------
+  hlp = hlpL[hlpL.size()-3];
+  if      (hlp == "1") {
+  printf("1\n");
+    _serialPort->setStopBits(STOP_1);
+  }
+  else if (hlp == "2") {
+    _serialPort->setStopBits(STOP_2);
+  }
+
+  // Flow Control
+  // ------------
+  hlp = hlpL[hlpL.size()-2].toUpper();
+  if (hlp == "XONXOFF") {
+  printf("XONXOFF\n");
+    _serialPort->setFlowControl(FLOW_XONXOFF);
+  }
+  else if (hlp == "HARDWARE") {
+    _serialPort->setFlowControl(FLOW_HARDWARE);
+  }
+  else {
+    _serialPort->setFlowControl(FLOW_OFF);
+  }
+
+  _status = running;
+  _serialPort->open(QIODevice::ReadWrite|QIODevice::Unbuffered);
+  if (!_serialPort->isOpen()) {
+    delete _serialPort;
+    _serialPort = 0;
+    _status = error;
+    emit(newMessage(("Cannot open serial port\n"), true));
+    return;
+  }
+}
+
Index: /trunk/BNC/bncnetquerys.h
===================================================================
--- /trunk/BNC/bncnetquerys.h	(revision 1752)
+++ /trunk/BNC/bncnetquerys.h	(revision 1752)
@@ -0,0 +1,21 @@
+#ifndef BNCSNETQUERYS_H
+#define BNCSNETQUERYS_H
+
+#include "bncnetquery.h"
+#include "serial/qextserialport.h"
+
+class bncNetQueryS : public bncNetQuery {
+ public:
+  bncNetQueryS();
+  virtual ~bncNetQueryS();
+
+  virtual void stop();
+  virtual void waitForRequestResult(const QUrl& url, QByteArray& outData);
+  virtual void startRequest(const QUrl& url, const QByteArray& gga);
+  virtual void waitForReadyRead(QByteArray& outData);
+
+ private:
+  QextSerialPort* _serialPort;
+};
+
+#endif
