sign: Inform user when stream stats is not enabled
If Sign protocol is configured without enabling stream statistics on port, inform user that stream statistics will not be available till it is enabled on port
This commit is contained in:
parent
ac1356ed53
commit
a838d09fbd
@ -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())
|
||||
|
@ -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);
|
||||
|
@ -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??
|
||||
|
Loading…
Reference in New Issue
Block a user