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

Method neighborAddMeasurement

GSM/GSMLogicalChannel.cpp:332–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332int NeighborCache::neighborAddMeasurement(unsigned freqindex, unsigned BSIC, int RSSI)
333{
334 unsigned key = (freqindex<<6) + BSIC;
335 NeighborData &data = mNeighborRSSI[key];
336 int result;
337 int startCount = data.mnCount, startAvg = data.mnAvgRSSI;
338 if (data.mnCount == 0) {
339 // Handsets sometimes send a spuriously low measurement report,
340 // so dont handover until we have seen at least two measurements from the same neighbor.
341 // We prevent handover by sending an impossibly low RSSI.
342 data.mnAvgRSSI = RSSI;
343 data.mnCount = cNumReports;
344 result = -200; // Impossibly low value.
345 } else {
346 data.mnCount = cNumReports;
347 result = data.mnAvgRSSI = RSSI/2 + data.mnAvgRSSI/2;
348 }
349 int endCount=data.mnCount; // ffing << botches this.
350 LOG(DEBUG) <<LOGVAR(result) <<LOGVAR(BSIC)<<LOGVAR(freqindex)<<LOGVAR(RSSI)<<LOGVAR(endCount) <<LOGVAR(startCount)<<LOGVAR(startAvg);
351 return result;
352}
353
354
355SACCHLogicalChannel::SACCHLogicalChannel(

Callers 1

HandoverDeterminationFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected