Transceiver: Support TRXD v1

Related: OS#4006
Change-Id: I53db2678458a7377c87875b58b58b76a1b900517
This commit is contained in:
Pau Espin Pedrol
2019-07-01 20:42:53 +02:00
parent 13c81098f8
commit cf6113b2fe
3 changed files with 98 additions and 3 deletions

View File

@@ -618,6 +618,10 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
bi->toa = 0.0;
bi->noise = 0.0;
bi->idle = false;
bi->modulation = MODULATION_GMSK;
bi->tss = 0; /* TODO: we only support tss 0 right now */
bi->tsc = 0;
bi->ci = 0.0;
/* Select the diversity channel with highest energy */
for (size_t i = 0; i < radio_burst->chans(); i++) {
@@ -665,13 +669,18 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
type = (CorrType) rc;
bi->toa = ebp.toa;
bi->tsc = ebp.tsc;
bi->ci = ebp.ci;
rxBurst = demodAnyBurst(*burst, mSPSRx, ebp.amp, ebp.toa, type);
/* EDGE demodulator returns 444 (gSlotLen * 3) bits */
if (rxBurst->size() == EDGE_BURST_NBITS)
if (rxBurst->size() == EDGE_BURST_NBITS) {
bi->modulation = MODULATION_8PSK;
bi->nbits = EDGE_BURST_NBITS;
else /* size() here is actually gSlotLen + 8, due to guard periods */
} else { /* size() here is actually gSlotLen + 8, due to guard periods */
bi->modulation = MODULATION_GMSK;
bi->nbits = gSlotLen;
}
// Convert -1..+1 soft bits to 0..1 soft bits
vectorSlicer(bi->rx_burst, rxBurst->begin(), bi->nbits);
@@ -980,6 +989,7 @@ void Transceiver::logRxBurst(size_t chan, const struct trx_ul_burst_ind *bi)
<< " noise: " << std::setw(5) << std::setprecision(1) << (bi->noise - rssiOffset)
<< "dBFS/" << std::setw(6) << -bi->noise << "dBm"
<< " TOA: " << std::setw(5) << std::setprecision(2) << bi->toa
<< " C/I: " << std::setw(5) << std::setprecision(2) << bi->ci << "dB"
<< " bits: " << os;
}
@@ -996,6 +1006,9 @@ void Transceiver::driveReceiveFIFO(size_t chan)
case 0:
trxd_send_burst_ind_v0(chan, mDataSockets[chan], &bi);
break;
case 1:
trxd_send_burst_ind_v1(chan, mDataSockets[chan], &bi);
break;
default:
OSMO_ASSERT(false);
}