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.
| 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. |
| 701 | int 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. |
| 720 | int MSInfo::msCountTBF2(RLCDir::type dir, TbfMacroState tbfmstate, TBF**ptbf) |
no test coverage detected