Reverse service order of CCCH priority queue. Add LOG(DEBUG) to check it, and some miscellaneous comments.

This commit is contained in:
pat
2014-10-13 19:20:59 -07:00
committed by Michael Iedema
parent 4e4d559407
commit d1bb8df38c
3 changed files with 5 additions and 5 deletions

View File

@@ -133,13 +133,13 @@ struct RachCompareAdapter {
/** Compare the objects pointed to, not the pointers themselves. */
// (pat) This is used when a RachInfo is placed in a priority_queue.
// Return true if rach1 should appear before rach2 in the priority_queue,
// meaning that rach1 will be serviced before rach2.
// meaning that rach2 will be serviced before rach1, since the stupid C++ priority_queue pops from the END of the queue.
bool operator()(const RachInfo *rach1, const RachInfo *rach2) {
assert(!rach1->mChan == !rach2->mChan); // In any given queue, all raches have mChan, or none.
if (rach1->mChan) {
return rach1->mReadyTime < rach2->mReadyTime;
return rach1->mReadyTime > rach2->mReadyTime;
} else {
return rach1->mWhen < rach2->mWhen;
return rach1->mWhen > rach2->mWhen;
}
}
};

View File

@@ -316,7 +316,7 @@ extern const unsigned RACHWaitSParamCombined[16];
/**@name Modulus operations for frame numbers. */
//@{
/** The GSM hyperframe is largest time period in the GSM system, GSM 05.02 4.3.3. */
// It is 2715648
// It is 2715648 or 3 hours, 28 minutes, 53 seconds
const uint32_t gHyperframe = 2048UL * 26UL * 51UL;
/** Get a clock difference, within the modulus, v1-v2. */

View File

@@ -324,7 +324,7 @@ void SACCHLogicalChannel::l2sendf(const L3Frame& frame)
L3Frame * L2LogicalChannel::l2recv(unsigned timeout_ms)
{
LOG(DEBUG);
//LOG(DEBUG);
L3Frame *result = mL3Out.read(timeout_ms);
if (result) WATCHINFO("l2recv " << this <<LOGVAR2("sap",result->getSAPI()) <<LOGVAR(result));
return result;