ostinato/client/port.cpp
Srivats P. 8251383351 - added PortStatsFilter
- added PacketDump (test code)
- added PacketTree (not complete)
- Protocol stuff (not complete)
2008-05-25 11:30:30 +00:00

27 lines
590 B
C++

#include "port.h"
Port::Port(quint32 id, quint32 portGroupId)
{
mPortId = id;
mPortGroupId = portGroupId;
mAdminStatus = AdminDisable;
mOperStatus = OperDown;
mControlMode = ControlShared;
// FIXME(HI): TEST only
for(int i = 0; i < 10; i++)
mPortStats[i] = mPortGroupId*10000+mPortId*100+i;
}
void Port::insertDummyStreams()
{
mStreams.append(*(new Stream));
mStreams[0].setName(QString("%1:%2:0").arg(portGroupId()).arg(id()));
#if 1
mStreams.append(*(new Stream));
mStreams[1].setName(QString("%1:%2:1").arg(portGroupId()).arg(id()));
#endif
}