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/+/14786 )
Change subject: driveTxPriorityQueue(): use trxd_hdr_common for message parsing
......................................................................
driveTxPriorityQueue(): use trxd_hdr_common for message parsing
Change-Id: If6a93e2b7fc9ada55edbdd16352cd4f7040e3d2a
---
M Transceiver52M/Transceiver.cpp
1 file changed, 10 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 1e0339b..368ed3f 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -33,6 +33,7 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/socket.h>
+#include <osmocom/core/bits.h>
}
#ifdef HAVE_CONFIG_H
@@ -914,6 +915,8 @@
int msgLen;
int burstLen;
char buffer[EDGE_BURST_NBITS + 50];
+ struct trxd_hdr_common *chdr;
+ uint32_t fn;
// check data socket
msgLen = read(mDataSockets[chan], buffer, sizeof(buffer));
@@ -934,12 +937,13 @@
return false;
}
- int timeSlot = (int) buffer[0];
- uint32_t frameNum = 0;
- for (int i = 0; i < 4; i++)
- frameNum = (frameNum << 8) | (0x0ff & buffer[i+1]);
+ /* Common header part: HDR version, TDMA TN & FN */
+ chdr = (struct trxd_hdr_common *) buffer;
- LOG(DEBUG) << "rcvd. burst at: " << GSM::Time(frameNum,timeSlot);
+ /* Convert TDMA FN to the host endianness */
+ fn = osmo_load32be(&chdr->fn);
+
+ LOG(DEBUG) << "rcvd. burst at: " << GSM::Time(fn, chdr->tn);
int RSSI = (int) buffer[5];
BitVector newBurst(burstLen);
@@ -948,7 +952,7 @@
while (itr < newBurst.end())
*itr++ = *bufferItr++;
- GSM::Time currTime = GSM::Time(frameNum,timeSlot);
+ GSM::Time currTime = GSM::Time(fn, chdr->tn);
addRadioVector(chan, newBurst, RSSI, currTime);
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/14786
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: If6a93e2b7fc9ada55edbdd16352cd4f7040e3d2a
Gerrit-Change-Number: 14786
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
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/20190719/2b4946b5/attachment.htm>