MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / msDump

Method msDump

GPRS/MSInfo.cpp:1057–1108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void MSInfo::msDump(std::ostream&os, SGSN::PrintOptions options)
1058{
1059 int i;
1060 RROperatingMode::type rrmode = getRROperatingMode();
1061 os << this // Dumps the operator<< value, which is sprintf(MS#%d,msDebugId)
1062 //<< LOGHEX(msTlli) // The TLLI is in the default id now, so do not reprint it.
1063 << LOGVAR(rrmode)
1064 << " Bytes:" << msBytesUp << "up/" << msBytesDown << "down"
1065 // The TrafficMetric is total number of blocks sent and received,
1066 // decayed by 1/2 every 24 blocks, so max is 48/channel.
1067 // The metric will be > 100% if multiple channels are used simultaneously.
1068 // Note: channel = uplink or downlink, so single slot MS with uplink and downlink TBFs
1069 // could reach 200%. Even a one-way TBF uses some of the other direction so can exceed 100%.
1070 //<< format(" Utilization=%.1f%%",100.0 * msTrafficMetric / 48.0)
1071 << " Utilization=" << fmtfloat2(100.0 * msTrafficMetric / 48.0) << "%"
1072 << "\n";
1073 os << "\t"; sgsnPrint(msTlli,options | SGSN::printNoMsId,os);
1074 dumpSignalQuality(os);
1075 msStatDump("\t",os);
1076
1077 if (!(options & SGSN::printVerbose)) {return;}
1078
1079 // In case the queue is completely stalled or suspended, add a new data point for
1080 // the current max delay if it is greater.
1081 if (msDownlinkQueue.size()) {
1082 double curage = msDownlinkQOldest.elapsed()/1000.0;
1083 if (curage > msDownlinkQDelay.getCurrent()) { msDownlinkQDelay.addPoint(curage); }
1084 }
1085 os << "\t" << LOGVAR2("DownlinkQ:bytes",msDownlinkQStat)
1086 << LOGVAR2("delay",msDownlinkQDelay)
1087 << "\n";
1088
1089 os << "\t TBFs:" <<LOGVAR2("total",msCountTbfs);
1090 if (msCountTbfFail) { os<<LOGVAR2("failed",msCountTbfFail); }
1091 if (msCountTbfNoConnect) { os<<LOGVAR2("NC",msCountTbfNoConnect); }
1092 os <<"\n";
1093
1094 os << "\t current=(";
1095 TBF *tbf;
1096 RN_MS_FOR_ALL_TBF(this,tbf) {
1097 //os << " "<<tbf << (tbf->mtDir == RLCDir::Up ? "(up)" : "(down)");
1098 os << " "<<tbf <<tbf->mtDir;
1099 }
1100 os << ")\n";
1101
1102 os << "\t USFs=(";
1103 for (i = 0; i < 8; i++) { os << " " << msUSFs[i]; }
1104 os << " )\n";
1105
1106 os << "\t"; msDumpChannels(os); os << "\n";
1107 msDumpCommon(os);
1108}
1109
1110string MSInfo::id() const
1111{

Callers 1

gprsListFunction · 0.80

Calls 4

fmtfloat2Function · 0.85
RN_MS_FOR_ALL_TBFFunction · 0.85
elapsedMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected