fixes for network buffer factor setting
This commit is contained in:
parent
614708c9c3
commit
95389cbf7a
4 changed files with 101 additions and 47 deletions
|
@ -283,17 +283,21 @@ void CChannel::SetNetwOutBlSiFact ( const int iNewBlockSizeFactor )
|
|||
|
||||
void CChannel::OnSendProtMessage ( CVector<uint8_t> vecMessage )
|
||||
{
|
||||
// only send messages if we are connected, otherwise delete complete queue
|
||||
if ( IsConnected () )
|
||||
{
|
||||
|
||||
// must be disabled to be able to receive network buffer size factor changes
|
||||
// FIXME check, if this condition must be checked somewhere else!
|
||||
|
||||
// // only send messages if we are connected, otherwise delete complete queue
|
||||
// if ( IsConnected() )
|
||||
// {
|
||||
// emit message to actually send the data
|
||||
emit MessReadyForSending ( vecMessage );
|
||||
}
|
||||
else
|
||||
{
|
||||
// delete send message queue
|
||||
Protocol.DeleteSendMessQueue();
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // delete send message queue
|
||||
// Protocol.DeleteSendMessQueue();
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -409,6 +413,7 @@ for ( int i = 0; i < iCurNetwInBlSiFact * MIN_BLOCK_SIZE_SAMPLES; i++ ) {
|
|||
// only use protocol data if channel is connected
|
||||
|
||||
// must be disabled to be able to receive network buffer size factor changes
|
||||
// FIXME check, if this condition must be checked somewhere else!
|
||||
// if ( IsConnected() )
|
||||
|
||||
{
|
||||
|
|
|
@ -235,24 +235,28 @@ void CLlconClientDlg::OnSliderSndBufInChange(int value)
|
|||
{
|
||||
pClient->GetSndInterface()->SetInNumBuf(value);
|
||||
TextSndBufIn->setText("In: " + QString().setNum(value));
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnSliderSndBufOutChange(int value)
|
||||
{
|
||||
pClient->GetSndInterface()->SetOutNumBuf(value);
|
||||
TextSndBufOut->setText("Out: " + QString().setNum(value));
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnSliderNetBuf(int value)
|
||||
{
|
||||
pClient->SetSockBufSize ( value );
|
||||
TextNetBuf->setText("Size: " + QString().setNum(value));
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnSliderNetBufSiFact(int value)
|
||||
{
|
||||
pClient->SetNetwBufSizeFact ( value );
|
||||
TextNetBufSiFact->setText("Fact.: " + QString().setNum(value));
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnTimerSigMet ()
|
||||
|
@ -288,7 +292,7 @@ void CLlconClientDlg::OnTimerSigMet ()
|
|||
ProgressBarInputLevelR->setProgress ( (int) ceil ( dCurSigLevelR ) );
|
||||
}
|
||||
|
||||
void CLlconClientDlg::OnTimerStatus ()
|
||||
void CLlconClientDlg::UpdateDisplay()
|
||||
{
|
||||
/* show connection status in status bar */
|
||||
if ( pClient->IsConnected () && pClient->IsRunning () )
|
||||
|
@ -303,6 +307,10 @@ void CLlconClientDlg::OnTimerStatus ()
|
|||
/* response time */
|
||||
TextLabelStdDevTimer->setText(QString().
|
||||
setNum(pClient->GetTimingStdDev(), 'f', 2) + " ms");
|
||||
|
||||
// current network buffer size
|
||||
TextLabelActNetwBufSize->setText(QString().
|
||||
setNum(double(pClient->GetNetwBufSizeFact() * MIN_BLOCK_DURATION_MS), 'f', 2) + " ms");
|
||||
}
|
||||
|
||||
void CLlconClientDlg::customEvent(QCustomEvent* Event)
|
||||
|
|
|
@ -76,15 +76,17 @@ protected:
|
|||
bool bConnected;
|
||||
QTimer TimerSigMet;
|
||||
QTimer TimerStatus;
|
||||
|
||||
virtual void customEvent ( QCustomEvent* Event );
|
||||
virtual void closeEvent ( QCloseEvent * Event );
|
||||
void UpdateDisplay();
|
||||
|
||||
QMenuBar* pMenu;
|
||||
|
||||
public slots:
|
||||
void OnConnectDisconBut();
|
||||
void OnTimerSigMet();
|
||||
void OnTimerStatus ();
|
||||
void OnTimerStatus() { UpdateDisplay(); }
|
||||
void OnSliderSndBufInChange ( int value );
|
||||
void OnSliderSndBufOutChange ( int value );
|
||||
void OnSliderNetBuf ( int value );
|
||||
|
|
|
@ -1095,7 +1095,7 @@
|
|||
<name>title</name>
|
||||
<string>Measurement Results</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<hbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
|
@ -1108,9 +1108,9 @@
|
|||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout16</cstring>
|
||||
<cstring>Layout17</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<vbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
|
@ -1130,6 +1130,34 @@
|
|||
<string>StdDev:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>TextLabelActNetwBufSizeLabel</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Netw. Buf. Size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout18</cstring>
|
||||
</property>
|
||||
<vbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
|
@ -1141,12 +1169,23 @@
|
|||
<string>val</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>TextLabelActNetwBufSize</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>val</string>
|
||||
</property>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CMultiColorLED</class>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue