Changeset 5648 in ntrip
- Timestamp:
- Feb 23, 2014, 6:08:38 PM (11 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccaster.cpp
r5647 r5648 301 301 this, SLOT(slotNewObs(QByteArray, QList<t_obs>))); 302 302 303 connect(getThread, SIGNAL(newRawData(QByteArray, QByteArray)), 304 this, SLOT(slotNewRawData(QByteArray, QByteArray))); 305 303 306 #ifdef RTROVER_INTERFACE 304 307 if (_bncRtrover) { … … 598 601 } 599 602 600 // // Output into the Miscellaneous socket // Georg 601 // // ------------------------------------ 602 // if (_miscSockets && _miscMount != "ALL") { 603 // QMutableListIterator<QTcpSocket*> is(*_miscSockets); 604 // while (is.hasNext()) { 605 // QTcpSocket* sock = is.next(); 606 // if (sock->state() == QAbstractSocket::ConnectedState) { 607 // if (myMiscWrite(sock, data, nBytes) != nBytes) { 608 // delete sock; 609 // is.remove(); 610 // } 611 // } 612 // else if (sock->state() != QAbstractSocket::ConnectingState) { 613 // delete sock; 614 // is.remove(); 615 // } 603 // Output into the Miscellaneous socket // Georg 604 //////////////////////////////////////////////////////////////////////////// 605 void bncCaster::slotNewRawData(QByteArray staID, QByteArray data) { 606 if (_miscSockets && (_miscMount == "ALL" || _miscMount == staID)) { 607 QMutableListIterator<QTcpSocket*> is(*_miscSockets); 608 while (is.hasNext()) { 609 QTcpSocket* sock = is.next(); 610 if (sock->state() == QAbstractSocket::ConnectedState) { 611 sock->write(data); 612 // if (myMiscWrite(sock, data, nBytes) != nBytes) { 613 // delete sock; 614 // is.remove(); 616 615 // } 617 // } 618 616 } 617 else if (sock->state() != QAbstractSocket::ConnectingState) { 618 delete sock; 619 is.remove(); 620 } 621 } 622 } 623 } 619 624 620 625 // New Connection // Georg … … 625 630 .arg(_miscSockets->size()).toAscii(), true) ); 626 631 } 627 628 // Write buffer // Georg629 ////////////////////////////////////////////////////////////////////////////630 int bncCaster::myMiscWrite(QTcpSocket* sock, const char* buf, int bufLen) {631 sock->write(buf, bufLen);632 for (int ii = 1; ii <= 10; ii++) {633 if (sock->waitForBytesWritten(10)) { // wait 10 ms634 return bufLen;635 }636 }637 return -1;638 }639 -
trunk/BNC/src/bnccaster.h
r5647 r5648 49 49 public slots: 50 50 void slotNewObs(QByteArray staID, QList<t_obs> obsList); 51 void slotNewRawData(QByteArray staID, QByteArray data); 51 52 void slotNewNMEAstr(QByteArray str); 52 53 void slotNewMiscConnection(); … … 67 68 void dumpEpochs(long minTime, long maxTime); 68 69 static int myWrite(QTcpSocket* sock, const char* buf, int bufLen); 69 static int myMiscWrite(QTcpSocket* sock, const char* buf, int bufLen);70 70 void reopenOutFile(); 71 71 -
trunk/BNC/src/bncgetthread.cpp
r5647 r5648 461 461 else { 462 462 emit newBytes(_staID, nBytes); 463 emit newRawData(_staID, data); 463 464 } 464 465 -
trunk/BNC/src/bncgetthread.h
r5647 r5648 77 77 signals: 78 78 void newBytes(QByteArray staID, double nbyte); 79 void newRawData(QByteArray staID, QByteArray data); 79 80 void newLatency(QByteArray staID, double clate); 80 81 void newObs(QByteArray staID, QList<t_obs> obsList);
Note:
See TracChangeset
for help on using the changeset viewer.