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

Method msCountTBF1

GPRS/MSInfo.cpp:701–717  ·  view source on GitHub ↗

Count how many TBFs exist in the specified direction (which may be Either) are in the specified TbfMacroState. Normally there will only be one TBF. We also have to prevent starting a bunch of redundant nearly identical TBFs when the phone sends us a bunch of RACHes in a row.

Source from the content-addressed store, hash-verified

699// We also have to prevent starting a bunch of redundant nearly identical
700// TBFs when the phone sends us a bunch of RACHes in a row.
701int MSInfo::msCountTBF1(RLCDir::type dir, TbfMacroState tbfmstate, TBF**ptbf) const
702{
703 int count = 0;
704 TBF *tbf;
705 RN_MS_FOR_ALL_TBF(this,tbf) {
706 if (dir == RLCDir::Either || tbf->mtDir == dir) {
707 if (tbfmstate == TbfMActive && !tbf->isActive()) continue;
708 if (tbfmstate == TbfMTransmitting && !tbf->isTransmitting()) continue;
709 // We always ignore tbfs that are in the process of being deleted.
710 if (tbf->mtGetState() == TBFState::Deleting) continue;
711 if (tbf->mtGetState() == TBFState::Unused) continue; // shouldnt happen
712 if (ptbf) { *ptbf = tbf; }
713 count++;
714 }
715 }
716 return count;
717}
718
719// Count TBFs for this real MS, which means all MSInfo belonging to the real MS.
720int MSInfo::msCountTBF2(RLCDir::type dir, TbfMacroState tbfmstate, TBF**ptbf)

Callers 1

msCountTBF2Method · 0.80

Calls 4

RN_MS_FOR_ALL_TBFFunction · 0.85
isTransmittingMethod · 0.80
mtGetStateMethod · 0.80
isActiveMethod · 0.45

Tested by

no test coverage detected