See if this block the MS sent to us corresponds to a reservation, and if so, update the counters in the corresponding TBF.
| 1163 | // See if this block the MS sent to us corresponds to a reservation, |
| 1164 | // and if so, update the counters in the corresponding TBF. |
| 1165 | RLCBlockReservation::type L1UplinkReservation::recvReservation( |
| 1166 | RLCBSN_t bsn, // The BSN of a received block. |
| 1167 | TBF**restbf, // Return tbf specified by reservation here, just for debugging. |
| 1168 | RadData *prd, // Return radio data here. |
| 1169 | PDCHL1FEC *ch) // Implicit in this pointer, but easier to pass it. |
| 1170 | { |
| 1171 | ScopedLock lock(mLock); // This lock is probably no longer necessary. |
| 1172 | RLCBlockReservation::type result = RLCBlockReservation::None; |
| 1173 | RLCBlockReservation *rp = &mReservations[bsn % mReservationSize]; |
| 1174 | *restbf = 0; |
| 1175 | if (rp->mrBSN == bsn) { |
| 1176 | result = rp->mrType; |
| 1177 | if (prd) { *prd = rp->mrRadData; } |
| 1178 | if (rp->mrTBF) { |
| 1179 | devassert(rp->mrType != RLCBlockReservation::ForRACH); |
| 1180 | TBF *rtbf = rp->mrTBF; |
| 1181 | GPRSLOG(1) << "recvReservation " <<rp->mrType <<LOGVAR2("ttype",rp->mrSubType) |
| 1182 | <<rtbf <<rtbf->mtMS <<LOGVAR(bsn) <<" "<<ch; |
| 1183 | *restbf = rtbf; |
| 1184 | rtbf->mtRecvAck(rp->mrSubType); |
| 1185 | switch (rp->mrType) { |
| 1186 | case RLCBlockReservation::ForPoll: rtbf->mtMS->msCountCcchReservations.addGood(); break; |
| 1187 | case RLCBlockReservation::ForRRBP: rtbf->mtMS->msCountRbbpReservations.addGood(); break; |
| 1188 | default: break; |
| 1189 | } |
| 1190 | } else { |
| 1191 | GPRSLOG(1) << "recvReservation"<<rp->mrType<<" tbf=null" <<LOGVAR(bsn)<<" "<<ch; |
| 1192 | } |
| 1193 | } else { |
| 1194 | //GPRSLOG(1) << "recvReservation unrecognized"<<LOGVAR(bsn)<<"\n"; |
| 1195 | } |
| 1196 | clearReservation(bsn,NULL); // Be tidy. |
| 1197 | return result; |
| 1198 | } |
| 1199 | |
| 1200 | void L1UplinkReservation::dumpReservations(std::ostream&os) |
| 1201 | { |
no test coverage detected