added channel name to server GUI
This commit is contained in:
parent
e7551ca1a4
commit
b8bad82676
6 changed files with 71 additions and 58 deletions
|
@ -362,6 +362,7 @@ void CChannelSet::GetBlockAllConC ( CVector<int>& vecChanID,
|
||||||
}
|
}
|
||||||
|
|
||||||
void CChannelSet::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
void CChannelSet::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
||||||
|
CVector<std::string>& vecsName,
|
||||||
CVector<int>& veciJitBufSize,
|
CVector<int>& veciJitBufSize,
|
||||||
CVector<int>& veciNetwOutBlSiFact,
|
CVector<int>& veciNetwOutBlSiFact,
|
||||||
CVector<int>& veciNetwInBlSiFact )
|
CVector<int>& veciNetwInBlSiFact )
|
||||||
|
@ -370,6 +371,7 @@ void CChannelSet::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
||||||
|
|
||||||
// init return values
|
// init return values
|
||||||
vecHostAddresses.Init ( MAX_NUM_CHANNELS );
|
vecHostAddresses.Init ( MAX_NUM_CHANNELS );
|
||||||
|
vecsName.Init ( MAX_NUM_CHANNELS );
|
||||||
veciJitBufSize.Init ( MAX_NUM_CHANNELS );
|
veciJitBufSize.Init ( MAX_NUM_CHANNELS );
|
||||||
veciNetwOutBlSiFact.Init ( MAX_NUM_CHANNELS );
|
veciNetwOutBlSiFact.Init ( MAX_NUM_CHANNELS );
|
||||||
veciNetwInBlSiFact.Init ( MAX_NUM_CHANNELS );
|
veciNetwInBlSiFact.Init ( MAX_NUM_CHANNELS );
|
||||||
|
@ -381,6 +383,7 @@ void CChannelSet::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
||||||
{
|
{
|
||||||
// get requested data
|
// get requested data
|
||||||
vecHostAddresses[i] = InetAddr;
|
vecHostAddresses[i] = InetAddr;
|
||||||
|
vecsName[i] = vecChannels[i].GetName();
|
||||||
veciJitBufSize[i] = vecChannels[i].GetSockBufSize();
|
veciJitBufSize[i] = vecChannels[i].GetSockBufSize();
|
||||||
veciNetwOutBlSiFact[i] = vecChannels[i].GetNetwBufSizeFactOut();
|
veciNetwOutBlSiFact[i] = vecChannels[i].GetNetwBufSizeFactOut();
|
||||||
veciNetwInBlSiFact[i] = vecChannels[i].GetNetwBufSizeFactIn();
|
veciNetwInBlSiFact[i] = vecChannels[i].GetNetwBufSizeFactIn();
|
||||||
|
|
|
@ -216,6 +216,7 @@ public:
|
||||||
CVector<CVector<double> >& vecvecdGains );
|
CVector<CVector<double> >& vecvecdGains );
|
||||||
|
|
||||||
void GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
void GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
||||||
|
CVector<std::string>& vecsName,
|
||||||
CVector<int>& veciJitBufSize,
|
CVector<int>& veciJitBufSize,
|
||||||
CVector<int>& veciNetwOutBlSiFact,
|
CVector<int>& veciNetwOutBlSiFact,
|
||||||
CVector<int>& veciNetwInBlSiFact );
|
CVector<int>& veciNetwInBlSiFact );
|
||||||
|
|
|
@ -31,8 +31,8 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
|
||||||
CLlconServerDlgBase ( parent, name, modal, f )
|
CLlconServerDlgBase ( parent, name, modal, f )
|
||||||
{
|
{
|
||||||
/* set text for version and application name */
|
/* set text for version and application name */
|
||||||
TextLabelNameVersion->
|
TextLabelNameVersion->setText ( QString ( APP_NAME ) +
|
||||||
setText(QString(APP_NAME) + tr(" server ") + QString(VERSION));
|
tr ( " server " ) + QString ( VERSION ) );
|
||||||
|
|
||||||
/* Create bitmaps */
|
/* Create bitmaps */
|
||||||
/* Define size of the bitmaps */
|
/* Define size of the bitmaps */
|
||||||
|
@ -49,16 +49,19 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
|
||||||
already there) */
|
already there) */
|
||||||
ListViewClients->setColumnText ( 0, tr ( "Client IP : Port" ) );
|
ListViewClients->setColumnText ( 0, tr ( "Client IP : Port" ) );
|
||||||
ListViewClients->setColumnWidth ( 0, 170 );
|
ListViewClients->setColumnWidth ( 0, 170 );
|
||||||
|
ListViewClients->addColumn ( tr ( "Name" ) );
|
||||||
|
ListViewClients->setColumnAlignment ( 1, Qt::AlignLeft );
|
||||||
|
ListViewClients->setColumnWidth ( 1, 150 );
|
||||||
ListViewClients->addColumn ( tr ( "Put" ) );
|
ListViewClients->addColumn ( tr ( "Put" ) );
|
||||||
ListViewClients->setColumnAlignment(1, Qt::AlignCenter);
|
|
||||||
ListViewClients->addColumn(tr("Get"));
|
|
||||||
ListViewClients->setColumnAlignment ( 2, Qt::AlignCenter );
|
ListViewClients->setColumnAlignment ( 2, Qt::AlignCenter );
|
||||||
|
ListViewClients->addColumn ( tr ( "Get" ) );
|
||||||
|
ListViewClients->setColumnAlignment ( 3, Qt::AlignCenter );
|
||||||
ListViewClients->addColumn ( tr ( "Jitter buffer size" ) );
|
ListViewClients->addColumn ( tr ( "Jitter buffer size" ) );
|
||||||
ListViewClients->setColumnAlignment(3, Qt::AlignRight);
|
|
||||||
ListViewClients->addColumn(tr("Block Size In"));
|
|
||||||
ListViewClients->setColumnAlignment ( 4, Qt::AlignRight );
|
ListViewClients->setColumnAlignment ( 4, Qt::AlignRight );
|
||||||
ListViewClients->addColumn(tr("Block Size Out"));
|
ListViewClients->addColumn ( tr ( "Block Size In" ) );
|
||||||
ListViewClients->setColumnAlignment ( 5, Qt::AlignRight );
|
ListViewClients->setColumnAlignment ( 5, Qt::AlignRight );
|
||||||
|
ListViewClients->addColumn ( tr ( "Block Size Out" ) );
|
||||||
|
ListViewClients->setColumnAlignment ( 6, Qt::AlignRight );
|
||||||
ListViewClients->clear();
|
ListViewClients->clear();
|
||||||
|
|
||||||
/* insert items in reverse order because in Windows all of them are
|
/* insert items in reverse order because in Windows all of them are
|
||||||
|
@ -99,6 +102,7 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
|
||||||
void CLlconServerDlg::OnTimer()
|
void CLlconServerDlg::OnTimer()
|
||||||
{
|
{
|
||||||
CVector<CHostAddress> vecHostAddresses;
|
CVector<CHostAddress> vecHostAddresses;
|
||||||
|
CVector<std::string> vecsName;
|
||||||
CVector<int> veciJitBufSize;
|
CVector<int> veciJitBufSize;
|
||||||
CVector<int> veciNetwOutBlSiFact;
|
CVector<int> veciNetwOutBlSiFact;
|
||||||
CVector<int> veciNetwInBlSiFact;
|
CVector<int> veciNetwInBlSiFact;
|
||||||
|
@ -106,7 +110,7 @@ void CLlconServerDlg::OnTimer()
|
||||||
|
|
||||||
ListViewMutex.lock();
|
ListViewMutex.lock();
|
||||||
|
|
||||||
pServer->GetConCliParam ( vecHostAddresses, veciJitBufSize,
|
pServer->GetConCliParam ( vecHostAddresses, vecsName, veciJitBufSize,
|
||||||
veciNetwOutBlSiFact, veciNetwInBlSiFact );
|
veciNetwOutBlSiFact, veciNetwInBlSiFact );
|
||||||
|
|
||||||
/* fill list with connected clients */
|
/* fill list with connected clients */
|
||||||
|
@ -114,20 +118,23 @@ void CLlconServerDlg::OnTimer()
|
||||||
{
|
{
|
||||||
if ( ! ( vecHostAddresses[i].InetAddr == QHostAddress ( (Q_UINT32) 0 ) ) )
|
if ( ! ( vecHostAddresses[i].InetAddr == QHostAddress ( (Q_UINT32) 0 ) ) )
|
||||||
{
|
{
|
||||||
/* main text (IP, port number) */
|
// IP, port number
|
||||||
vecpListViewItems[i]->setText ( 0, QString().sprintf ( "%s : %d",
|
vecpListViewItems[i]->setText ( 0, QString().sprintf ( "%s : %d",
|
||||||
vecHostAddresses[i].InetAddr.toString().latin1(),
|
vecHostAddresses[i].InetAddr.toString().latin1(),
|
||||||
vecHostAddresses[i].iPort ) /* IP, port */);
|
vecHostAddresses[i].iPort ) /* IP, port */);
|
||||||
|
|
||||||
/* jitter buffer size (polling for updates) */
|
// name
|
||||||
vecpListViewItems[i]->setText(3,
|
vecpListViewItems[i]->setText ( 1, vecsName[i].c_str() );
|
||||||
|
|
||||||
|
// jitter buffer size (polling for updates)
|
||||||
|
vecpListViewItems[i]->setText ( 4,
|
||||||
QString().setNum ( veciJitBufSize[i] ) );
|
QString().setNum ( veciJitBufSize[i] ) );
|
||||||
|
|
||||||
/* in / out network block sizes */
|
// in/out network block sizes
|
||||||
vecpListViewItems[i]->setText(4,
|
vecpListViewItems[i]->setText ( 5,
|
||||||
QString().setNum (
|
QString().setNum (
|
||||||
double ( veciNetwInBlSiFact[i] * MIN_BLOCK_DURATION_MS), 'f', 2 ) );
|
double ( veciNetwInBlSiFact[i] * MIN_BLOCK_DURATION_MS), 'f', 2 ) );
|
||||||
vecpListViewItems[i]->setText(5,
|
vecpListViewItems[i]->setText(6,
|
||||||
QString().setNum (
|
QString().setNum (
|
||||||
double ( veciNetwOutBlSiFact[i] * MIN_BLOCK_DURATION_MS), 'f', 2 ) );
|
double ( veciNetwOutBlSiFact[i] * MIN_BLOCK_DURATION_MS), 'f', 2 ) );
|
||||||
|
|
||||||
|
@ -138,10 +145,11 @@ void CLlconServerDlg::OnTimer()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/* remove text for Windows version */
|
// remove text for Windows version
|
||||||
vecpListViewItems[i]->setText ( 0, "" );
|
vecpListViewItems[i]->setText ( 0, "" );
|
||||||
vecpListViewItems[i]->setText(3, "");
|
vecpListViewItems[i]->setText ( 1, "" );
|
||||||
vecpListViewItems[i]->setText ( 4, "" );
|
vecpListViewItems[i]->setText ( 4, "" );
|
||||||
|
vecpListViewItems[i]->setText ( 5, "" );
|
||||||
#else
|
#else
|
||||||
vecpListViewItems[i]->setVisible ( false );
|
vecpListViewItems[i]->setVisible ( false );
|
||||||
#endif
|
#endif
|
||||||
|
@ -150,7 +158,7 @@ void CLlconServerDlg::OnTimer()
|
||||||
|
|
||||||
ListViewMutex.unlock();
|
ListViewMutex.unlock();
|
||||||
|
|
||||||
/* response time (if available) */
|
// response time (if available)
|
||||||
if ( pServer->GetTimingStdDev ( dCurTiStdDev ) )
|
if ( pServer->GetTimingStdDev ( dCurTiStdDev ) )
|
||||||
{
|
{
|
||||||
TextLabelResponseTime->setText ( QString().
|
TextLabelResponseTime->setText ( QString().
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>629</width>
|
<width>752</width>
|
||||||
<height>240</height>
|
<height>239</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
|
|
|
@ -126,7 +126,7 @@ protected:
|
||||||
class CServerListViewItem : public QListViewItem
|
class CServerListViewItem : public QListViewItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CServerListViewItem ( QListView* parent ) : LED0 ( 1 ), LED1 ( 2 ),
|
CServerListViewItem ( QListView* parent ) : LED0 ( 2 ), LED1 ( 3 ),
|
||||||
QListViewItem ( parent )
|
QListViewItem ( parent )
|
||||||
{
|
{
|
||||||
LED0.SetListViewItemPointer ( this );
|
LED0.SetListViewItemPointer ( this );
|
||||||
|
|
|
@ -50,10 +50,11 @@ public:
|
||||||
bool IsRunning() { return Timer.isActive (); }
|
bool IsRunning() { return Timer.isActive (); }
|
||||||
|
|
||||||
void GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
void GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
|
||||||
|
CVector<std::string>& vecsName,
|
||||||
CVector<int>& veciJitBufSize, CVector<int>& veciNetwOutBlSiFact,
|
CVector<int>& veciJitBufSize, CVector<int>& veciNetwOutBlSiFact,
|
||||||
CVector<int>& veciNetwInBlSiFact)
|
CVector<int>& veciNetwInBlSiFact)
|
||||||
{
|
{
|
||||||
ChannelSet.GetConCliParam ( vecHostAddresses,
|
ChannelSet.GetConCliParam ( vecHostAddresses, vecsName,
|
||||||
veciJitBufSize, veciNetwOutBlSiFact, veciNetwInBlSiFact );
|
veciJitBufSize, veciNetwOutBlSiFact, veciNetwInBlSiFact );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue