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

Method getNextMsgSendTime

GSM/GSMLogicalChannel.cpp:232–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230#endif
231
232Time GSM::CCCHLogicalChannel::getNextMsgSendTime() {
233 // Get the current frame.
234 // DAB GPRS - This should call L1->resync() first, otherwise, in an idle system,
235 // DAB GPRS - you can get times well into the past..
236 // (pat) Above is done in the underlying getNextWriteTime()
237 // Pats note: This may return the current frame number if it is ready to send now.
238 // 3-18-2012: FIXME: This result is not monotonically increasing!!
239 // That is screwing up GPRS sendAssignment.
240 GSM::Time next = getNextWriteTime();
241 int achload = load();
242 if (mWaitingToSend) { achload++; }
243 //old: GSM::Time result = next + (achload+3) * 51; // add one to be safe.
244
245 // (pat) TODO: We are adding a whole 51-multframe for each additional
246 // CCCH message, which may not be correct.
247 // Note: We dont need to carefully make sure the frame
248 // numbers are valid (eg, by rollForward), because this code is used by GPRS
249 // which is going to convert it to an RLC block time anyway.
250 int fnresult = (next.FN() + achload * 51) % gHyperframe;
251 GSM::Time result(fnresult);
252 LOG(DEBUG) << "CCCHLogicalChannel::getNextSend="<< next.FN()
253 <<" load="<<achload<<LOGVAR(mWaitingToSend) <<" now="<<gBTS.time().FN()<<LOGVAR(fnresult);
254 return result;
255}
256
257
258

Callers 1

makeCCCHReservationMethod · 0.80

Calls 2

FNMethod · 0.45
timeMethod · 0.45

Tested by

no test coverage detected