Change in osmo-pcu[master]: Make use of T3142 received from BTS

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.org
Mon Apr 26 11:59:04 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/23905 )


Change subject: Make use of T3142 received from BTS
......................................................................

Make use of T3142 received from BTS

Related: OS#3928
Change-Id: I4e26f181db9693d3a267a879e2aebda12eab2a8c
---
M src/bts.cpp
M src/encoding.cpp
M src/encoding.h
M tests/types/TypesTest.cpp
4 files changed, 11 insertions(+), 11 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/23905/1

diff --git a/src/bts.cpp b/src/bts.cpp
index 3d935a1..9798402 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -76,7 +76,7 @@
 }
 
 static struct osmo_tdef T_defs_bts[] = {
-	{ .T=3142, .default_val=20,  .unit=OSMO_TDEF_S,  .desc="timer (s)", .val=0 },
+	{ .T=3142, .default_val=20,  .unit=OSMO_TDEF_S,  .desc="Wait Indication used in Imm Ass Reject during TBF Establishment (s)", .val=0, .min_val = 0, .max_val = 255 }, /* TS 44.018 10.5.2.43 */
 	{ .T=3169, .default_val=5,   .unit=OSMO_TDEF_S,  .desc="Reuse of USF and TFI(s) after the MS uplink TBF assignment is invalid (s)", .val=0 },
 	{ .T=3191, .default_val=5,   .unit=OSMO_TDEF_S,  .desc="Reuse of TFI(s) after sending (1) last RLC Data Block on TBF(s), or (2) PACKET TBF RELEASE for an MBMS radio bearer (s)", .val=0 },
 	{ .T=3193, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Reuse of TFI(s) after reception of final PACKET DOWNLINK ACK/NACK from MS for TBF (ms)", .val=0 },
@@ -890,7 +890,8 @@
 	if (rc != 0) {
 		LOGP(DRLCMAC, LOGL_DEBUG, "Tx Immediate Assignment Reject on AGCH\n");
 		plen = Encoding::write_immediate_assignment_reject(
-			bv, rip->ra, Fn, rip->burst_type);
+			bv, rip->ra, Fn, rip->burst_type,
+			(uint8_t)osmo_tdef_get(bts->T_defs_bts, 3142, OSMO_TDEF_S, 0));
 		bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_REJ);
 	} else {
 		LOGP(DRLCMAC, LOGL_DEBUG, "Tx Immediate Assignment on AGCH: "
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 8bc8d15..f91c638 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -361,10 +361,8 @@
  * Immediate assignment reject, sent on the CCCH/AGCH
  * see GSM 44.018, 9.1.20 + 10.5.2.30
  */
-int Encoding::write_immediate_assignment_reject(
-	bitvec *dest, uint16_t ra,
-	uint32_t ref_fn,
-	enum ph_burst_type burst_type)
+int Encoding::write_immediate_assignment_reject(bitvec *dest, uint16_t ra,
+	uint32_t ref_fn, enum ph_burst_type burst_type, uint8_t t3142)
 {
 	unsigned wp = 0;
 	int plen;
@@ -404,8 +402,8 @@
 		bitvec_write_field(dest, &wp, ref_fn % 51, 6);          // T3
 		bitvec_write_field(dest, &wp, ref_fn % 26, 5);          // T2
 
-		/* TODO: Make it configurable */
-		bitvec_write_field(dest, &wp, 20, 8); //Wait Indication 1
+		/* 10.5.2.43 Wait Indication */
+		bitvec_write_field(dest, &wp, t3142, 8);
 	}
 
 	plen = wp / 8;
diff --git a/src/encoding.h b/src/encoding.h
index 89d057c..e7046e2 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -59,7 +59,8 @@
 	static int write_immediate_assignment_reject(
 			bitvec *dest, uint16_t ra,
 			uint32_t ref_fn,
-			enum ph_burst_type burst_type
+			enum ph_burst_type burst_type,
+			uint8_t t3142
 		);
 
 	static void write_packet_uplink_assignment(
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 643ce4c..480a9ac 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -877,7 +877,7 @@
 	bitvec_unhex(immediate_assignment_rej, DUMMY_VEC);
 	plen = Encoding::write_immediate_assignment_reject(
 		immediate_assignment_rej, 112, 100,
-		GSM_L1_BURST_TYPE_ACCESS_1);
+		GSM_L1_BURST_TYPE_ACCESS_1, 20);
 
 	printf("assignment reject: %s\n",
 		osmo_hexdump(immediate_assignment_rej->data, 22));
@@ -892,7 +892,7 @@
 
 	plen = Encoding::write_immediate_assignment_reject(
 		immediate_assignment_rej, 112, 100,
-		GSM_L1_BURST_TYPE_ACCESS_0);
+		GSM_L1_BURST_TYPE_ACCESS_0, 20);
 
 	printf("assignment reject: %s\n",
 		osmo_hexdump(immediate_assignment_rej->data, 22));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/23905
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4e26f181db9693d3a267a879e2aebda12eab2a8c
Gerrit-Change-Number: 23905
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210426/d1fbf644/attachment.htm>


More information about the gerrit-log mailing list