diff --git a/client/streamconfigdialog.cpp b/client/streamconfigdialog.cpp index af35fea..1dee6f9 100644 --- a/client/streamconfigdialog.cpp +++ b/client/streamconfigdialog.cpp @@ -1240,6 +1240,13 @@ void StreamConfigDialog::on_pbOk_clicked() "varying fields at transmit time may not be same as configured\n"; } + if (!mPort.trackStreamStats() + && mpStream->hasProtocol(OstProto::Protocol::kSignFieldNumber)) + { + log += "Stream contains special signature, but per stream statistics " + "will not be available till it is enabled on the port.\n"; + } + mpStream->preflightCheck(log); if (log.length()) diff --git a/common/streambase.cpp b/common/streambase.cpp index 56d6d4a..28a9442 100644 --- a/common/streambase.cpp +++ b/common/streambase.cpp @@ -140,6 +140,15 @@ void StreamBase::setFrameProtocol(ProtocolList protocolList) } #endif +bool StreamBase::hasProtocol(quint32 protocolNumber) +{ + foreach(const AbstractProtocol *proto, *currentFrameProtocols) + if (proto->protocolNumber() == protocolNumber) + return true; + + return false; +} + ProtocolListIterator* StreamBase::createProtocolListIterator() const { return new ProtocolListIterator(*currentFrameProtocols); diff --git a/common/streambase.h b/common/streambase.h index ca6e6be..907fc8d 100644 --- a/common/streambase.h +++ b/common/streambase.h @@ -40,6 +40,7 @@ public: void protoDataCopyFrom(const OstProto::Stream &stream); void protoDataCopyInto(OstProto::Stream &stream) const; + bool hasProtocol(quint32 protocolNumber); ProtocolListIterator* createProtocolListIterator() const; //! \todo (LOW) should we have a copy constructor??