diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-07-01 16:36:10 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-07-02 15:05:17 +0200 |
commit | 07ddce5c1f7f68157a48da3b1e7513db45375da3 (patch) | |
tree | 1b14bf641114ef3c38b20003c57ce3b6481fb261 /Transceiver52M/Transceiver.cpp | |
parent | 25ae190dc69b6229a2448ec756e241f0a095d957 (diff) |
Transceiver: Drop use of GSM::Time from trx_ul_burst_ind
Use of that class is really not needed since we don't need to do any
calculation with those values, so we can simply store the final values
in the struct.
Related: OS#4006
Change-Id: Iadf2683d7f52138a2248598641f3b702252f325d
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index a6a32f0..6e678ac 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -558,6 +558,7 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) float toa, max = -1.0, avg = 0.0; int max_i = -1; signalVector *burst; + GSM::Time burstTime; TransceiverState *state = &mStates[chan]; /* Blocking FIFO read */ @@ -566,8 +567,10 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) return false; /* Set time and determine correlation type */ - bi->burstTime = radio_burst->getTime(); - CorrType type = expectedCorrType(bi->burstTime, chan); + burstTime = radio_burst->getTime(); + bi->fn = burstTime.FN(); + bi->tn = burstTime.TN(); + CorrType type = expectedCorrType(burstTime, chan); /* Enable 8-PSK burst detection if EDGE is enabled */ if (mEdge && (type == TSC)) @@ -576,7 +579,7 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) /* Debug: dump bursts to disk */ /* bits 0-7 - chan 0 timeslots * bits 8-15 - chan 1 timeslots */ - if (mWriteBurstToDiskMask & ((1<<bi->burstTime.TN()) << (8*chan))) + if (mWriteBurstToDiskMask & ((1<<bi->tn) << (8*chan))) writeToFile(radio_burst, chan); /* No processing if the timeslot is off. @@ -913,7 +916,7 @@ void Transceiver::logRxBurst(size_t chan, const struct trx_ul_burst_ind *bi) { LOG(DEBUG) << std::fixed << std::right << " chan: " << chan - << " time: " << bi->burstTime + << " time: " << bi->tn << ":" << bi->fn << " RSSI: " << std::setw(5) << std::setprecision(1) << (bi->rssi - rssiOffset) << "dBFS/" << std::setw(6) << -bi->rssi << "dBm" << " noise: " << std::setw(5) << std::setprecision(1) << (bi->noise - rssiOffset) @@ -939,8 +942,8 @@ void Transceiver::driveReceiveFIFO(size_t chan) struct trxd_hdr_v0* pkt = (struct trxd_hdr_v0*)burstString; pkt->common.version = 0; pkt->common.reserved = 0; - pkt->common.tn = bi.burstTime.TN(); - osmo_store32be(bi.burstTime.FN(), &pkt->common.fn); + pkt->common.tn = bi.tn; + osmo_store32be(bi.fn, &pkt->common.fn); pkt->v0.rssi = bi.rssi; osmo_store16be(TOAint, &pkt->v0.toa); SoftVector::iterator burstItr = bi.rxBurst->begin(); |