Changeset 8275 in ntrip for trunk/BNC/src/upload


Ignore:
Timestamp:
Feb 7, 2018, 2:26:39 PM (6 years ago)
Author:
stuerze
Message:

some preparation to allow Ntrip version 2 stream upload in future

Location:
trunk/BNC/src/upload
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/upload/bncephuploadcaster.cpp

    r7889 r8275  
    3535  while (it.hasNext()) {
    3636    QStringList hlp = it.next().split(",");
    37     if (hlp.size() > 3) {
     37    if (hlp.size() > 5) {
    3838      ++iRow;
    3939      int  outPort = hlp[1].toInt();
    4040      bncUploadCaster* newCaster = new bncUploadCaster(hlp[2], hlp[0], outPort,
    41                                                        hlp[3], iRow, sampl);
     41                                                       hlp[3], hlp[4],
     42                                                       hlp[5], iRow, sampl);
    4243
    4344      connect(newCaster, SIGNAL(newBytes(QByteArray,double)),
  • trunk/BNC/src/upload/bncrtnetdecoder.cpp

    r4176 r8275  
    3535 * Created:    28-Mar-2011
    3636 *
    37  * Changes:   
     37 * Changes:
    3838 *
    3939 * -----------------------------------------------------------------------*/
     
    4646
    4747// Constructor
    48 //////////////////////////////////////////////////////////////////////// 
     48////////////////////////////////////////////////////////////////////////
    4949bncRtnetDecoder::bncRtnetDecoder() {
    5050  bncSettings settings;
     
    5959      ++iRow;
    6060      int  outPort = hlp[1].toInt();
    61       bool CoM     = (hlp[5].toInt() == Qt::Checked);
     61      bool CoM     = (hlp[7].toInt() == Qt::Checked);
    6262      int PID = 0;
    63       if (hlp.size() > 8) {
    64         PID = hlp[8].toInt();
     63      if (hlp.size() > 10) {
     64        PID = hlp[10].toInt();
    6565      }
    6666      int SID = 0;
    67       if (hlp.size() > 9) {
    68         SID = hlp[9].toInt();
     67      if (hlp.size() > 11) {
     68        SID = hlp[11].toInt();
    6969      }
    7070      int IOD = 0;
    71       if (hlp.size() > 10) {
    72         IOD = hlp[10].toInt();
     71      if (hlp.size() > 12) {
     72        IOD = hlp[12].toInt();
    7373      }
    7474      bncRtnetUploadCaster* newCaster = new bncRtnetUploadCaster(
    75                                                        hlp[2], hlp[0], outPort,
    76                                                        hlp[3], hlp[4], CoM,
    77                                                        hlp[6], hlp[7],
     75                                                       hlp[2], hlp[0], outPort,
     76                                                       hlp[3], hlp[4],
     77                                                       hlp[5], hlp[6], CoM,
     78                                                       hlp[8], hlp[9],
    7879                                                       PID, SID, IOD, iRow);
    7980      newCaster->start();
     
    8485
    8586// Destructor
    86 //////////////////////////////////////////////////////////////////////// 
     87////////////////////////////////////////////////////////////////////////
    8788bncRtnetDecoder::~bncRtnetDecoder() {
    8889  for (int ic = 0; ic < _casters.size(); ic++) {
     
    9293
    9394// Decode Method
    94 //////////////////////////////////////////////////////////////////////// 
     95////////////////////////////////////////////////////////////////////////
    9596t_irc bncRtnetDecoder::Decode(char* buffer, int bufLen, vector<string>& errmsg) {
    9697  errmsg.clear();
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r8204 r8275  
    2828////////////////////////////////////////////////////////////////////////////
    2929bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
    30     const QString& outHost, int outPort, const QString& password,
     30    const QString& outHost, int outPort,
     31    const QString& ntripVersion,
     32    const QString& userName, const QString& password,
    3133    const QString& crdTrafo, bool CoM, const QString& sp3FileName,
    3234    const QString& rnxFileName, int PID, int SID, int IOD, int iRow) :
    33     bncUploadCaster(mountpoint, outHost, outPort, password, iRow, 0) {
     35    bncUploadCaster(mountpoint, outHost, outPort, ntripVersion, userName, password, iRow, 0) {
    3436
    3537  if (!outHost.isEmpty()) {
  • trunk/BNC/src/upload/bncrtnetuploadcaster.h

    r8145 r8275  
    2020  bncRtnetUploadCaster(const QString& mountpoint,
    2121                  const QString& outHost, int outPort,
    22                   const QString& password,
     22                  const QString& ntripVersion,
     23                  const QString& userName,const QString& password,
    2324                  const QString& crdTrafo, bool  CoM,
    2425                  const QString& sp3FileName,
  • trunk/BNC/src/upload/bncuploadcaster.cpp

    r8204 r8275  
    2727bncUploadCaster::bncUploadCaster(const QString& mountpoint,
    2828                                 const QString& outHost, int outPort,
    29                                  const QString& password, int iRow,
     29                                 const QString& ntripVersion,
     30                                 const QString& userName, const QString& password,
     31                                 int iRow,
    3032                                 int rate) {
    3133  _mountpoint    = mountpoint;
    3234  _outHost       = outHost;
    3335  _outPort       = outPort;
     36  _ntripVersion  = ntripVersion;
     37  _userName      = userName;
    3438  _password      = password;
    3539  _outSocket     = 0;
  • trunk/BNC/src/upload/bncuploadcaster.h

    r8252 r8275  
    1111 public:
    1212  bncUploadCaster(const QString& mountpoint,
    13                   const QString& outHost, int outPort,
    14                   const QString& password, int iRow, int rate);
     13      const QString& outHost, int outPort,
     14      const QString& ntripVersion,
     15      const QString& userName, const QString& password,
     16      int iRow, int rate);
    1517  virtual void deleteSafely();
    1618  void setOutBuffer(const QByteArray& outBuffer) {
     
    2123 protected:
    2224  virtual    ~bncUploadCaster();
    23   QMutex     _mutex; 
     25  QMutex     _mutex;
    2426  QByteArray _outBuffer;
    2527
     
    3537  QString     _outHost;
    3638  int         _outPort;
     39  QString     _userName;
    3740  QString     _password;
     41  QString     _ntripVersion;
     42  bool        _secure;
    3843  QTcpSocket* _outSocket;
    3944  int         _sOpenTrial;
Note: See TracChangeset for help on using the changeset viewer.