This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/14656 ) Change subject: Transceiver: Move nbits burst size calculation to pullRadioVector() ...................................................................... Transceiver: Move nbits burst size calculation to pullRadioVector() That's where all the filling logic happens, while in driveReceiveFIFO we mostly want to take the burst, generate a message and sent it over the socket. Related: OS#4006 Change-Id: Ib1df10c40d737954904290f57d58b1c77d65f82e --- M Transceiver52M/Transceiver.cpp M Transceiver52M/Transceiver.h 2 files changed, 11 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index f04a132..a0ff4cd 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -643,6 +643,12 @@ bi->toa = toa; bi->rxBurst = demodAnyBurst(*burst, mSPSRx, amp, toa, type); + /* EDGE demodulator returns 444 (gSlotLen * 3) bits */ + if (bi->rxBurst->size() == EDGE_BURST_NBITS) + bi->nbits = EDGE_BURST_NBITS; + else /* size() here is actually gSlotLen + 8, due to guard periods */ + bi->nbits = gSlotLen; + delete radio_burst; return true; } @@ -917,7 +923,6 @@ { double dBm; // in dBm int TOAint; // in 1/256 symbols - unsigned nbits = gSlotLen; struct trx_ul_burst_ind bi; @@ -927,18 +932,12 @@ // Convert -1..+1 soft bits to 0..1 soft bits vectorSlicer(bi.rxBurst); - /* - * EDGE demodulator returns 444 (148 * 3) bits - */ - if (bi.rxBurst->size() == gSlotLen * 3) - nbits = gSlotLen * 3; - dBm = bi.rssi + rssiOffset; logRxBurst(chan, &bi, dBm); TOAint = (int) (bi.toa * 256.0 + 0.5); // round to closest integer - char burstString[sizeof(struct trxd_hdr_v0) + nbits + 2]; + char burstString[sizeof(struct trxd_hdr_v0) + bi.nbits + 2]; struct trxd_hdr_v0* pkt = (struct trxd_hdr_v0*)burstString; pkt->common.version = 0; pkt->common.reserved = 0; @@ -948,14 +947,14 @@ osmo_store16be(TOAint, &pkt->v0.toa); SoftVector::iterator burstItr = bi.rxBurst->begin(); - for (unsigned i = 0; i < nbits; i++) + for (unsigned i = 0; i < bi.nbits; i++) pkt->soft_bits[i] = (char) round((*burstItr++) * 255.0); /* +1: Historical reason. There's an uninitizalied byte in there: pkt->soft_bits[bi.nbits] */ - pkt->soft_bits[nbits + 1] = '\0'; + pkt->soft_bits[bi.nbits + 1] = '\0'; delete bi.rxBurst; - mDataSockets[chan]->write(burstString, sizeof(struct trxd_hdr_v0) + nbits + 2); + mDataSockets[chan]->write(burstString, sizeof(struct trxd_hdr_v0) + bi.nbits + 2); } void Transceiver::driveTxFIFO() diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h index 965d07d..d7c6182 100644 --- a/Transceiver52M/Transceiver.h +++ b/Transceiver52M/Transceiver.h @@ -37,6 +37,7 @@ struct trx_ul_burst_ind { SoftVector *rxBurst; + unsigned nbits; // number of symbols per slot in rxBurst, not counting guard periods GSM::Time burstTime; double rssi; // in dBFS double toa; // in symbols -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14656 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ib1df10c40d737954904290f57d58b1c77d65f82e Gerrit-Change-Number: 14656 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: laforge <laforge at gnumonks.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190703/65abda21/attachment.htm>