| 324 | } |
| 325 | |
| 326 | SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, |
| 327 | int &RSSI, |
| 328 | int &timingOffset) |
| 329 | { |
| 330 | bool needDFE = false; |
| 331 | bool success = false; |
| 332 | complex amplitude = 0.0; |
| 333 | float TOA = 0.0, avg = 0.0; |
| 334 | |
| 335 | radioVector *rxBurst = (radioVector *) mReceiveFIFO->get(); |
| 336 | |
| 337 | if (!rxBurst) return NULL; |
| 338 | |
| 339 | int timeslot = rxBurst->getTime().TN(); |
| 340 | |
| 341 | CorrType corrType = expectedCorrType(rxBurst->getTime()); |
| 342 | |
| 343 | if ((corrType==OFF) || (corrType==IDLE)) { |
| 344 | delete rxBurst; |
| 345 | return NULL; |
| 346 | } |
| 347 | |
| 348 | signalVector *vectorBurst = rxBurst; |
| 349 | |
| 350 | energyDetect(*vectorBurst, 20 * mSPSRx, 0.0, &avg); |
| 351 | |
| 352 | // Update noise level |
| 353 | mNoiseLev = mNoises.avg(); |
| 354 | avg = sqrt(avg); |
| 355 | |
| 356 | // run the proper correlator |
| 357 | if (corrType==TSC) { |
| 358 | LOG(DEBUG) << "looking for TSC at time: " << rxBurst->getTime(); |
| 359 | signalVector *channelResp; |
| 360 | double framesElapsed = rxBurst->getTime()-channelEstimateTime[timeslot]; |
| 361 | bool estimateChannel = false; |
| 362 | if ((framesElapsed > 50) || (channelResponse[timeslot]==NULL)) { |
| 363 | if (channelResponse[timeslot]) delete channelResponse[timeslot]; |
| 364 | if (DFEForward[timeslot]) delete DFEForward[timeslot]; |
| 365 | if (DFEFeedback[timeslot]) delete DFEFeedback[timeslot]; |
| 366 | channelResponse[timeslot] = NULL; |
| 367 | DFEForward[timeslot] = NULL; |
| 368 | DFEFeedback[timeslot] = NULL; |
| 369 | estimateChannel = true; |
| 370 | } |
| 371 | if (!needDFE) estimateChannel = false; |
| 372 | float chanOffset; |
| 373 | success = analyzeTrafficBurst(*vectorBurst, |
| 374 | mTSC, |
| 375 | 5.0, |
| 376 | mSPSRx, |
| 377 | &litude, |
| 378 | &TOA, |
| 379 | mMaxExpectedDelay, |
| 380 | estimateChannel, |
| 381 | &channelResp, |
| 382 | &chanOffset); |
| 383 | if (success) { |
nothing calls this directly
no test coverage detected