| 330 | } |
| 331 | |
| 332 | int 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 | |
| 355 | SACCHLogicalChannel::SACCHLogicalChannel( |
no outgoing calls
no test coverage detected