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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21001 )
Change subject: library/PCUIF_Types: add f_PCUIF_ver_INFO_PDCHMask_set()
......................................................................
library/PCUIF_Types: add f_PCUIF_ver_INFO_PDCHMask_set()
Change-Id: I443bc99d35994dda14cdf9c41609d528368c401f
---
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 27 insertions(+), 19 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 0e112dc..8af3757 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -990,6 +990,24 @@
}
}
+function f_PCUIF_ver_INFO_PDCHMask_set(inout PCUIF_info_ind info, BIT8 pdch_mask,
+ template (present) uint8_t trx_nr := ?)
+{
+ if (PCUIF_Types.mp_pcuif_version >= 10) {
+ for (var integer nr := 0; nr < lengthof(info.trx.v10); nr := nr + 1) {
+ if (match(nr, trx_nr)) {
+ info.trx.v10[nr].pdch_mask := pdch_mask;
+ }
+ }
+ } else {
+ for (var integer nr := 0; nr < lengthof(info.trx.v09); nr := nr + 1) {
+ if (match(nr, trx_nr)) {
+ info.trx.v09[nr].pdch_mask := pdch_mask;
+ }
+ }
+ }
+}
+
function f_PCUIF_AF2addr_type(AddressFamily address_family)
return PCUIF_AddrType {
if (address_family == AF_INET) {
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 411890c..8facde7 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2192,19 +2192,10 @@
var BIT11 ra11;
info_ind := valueof(ts_PCUIF_INFO_default);
- if (PCUIF_Types.mp_pcuif_version >= 10) {
- /* Only the first TRX is enabled. */
- for (var integer i := 0; i < lengthof(info_ind.trx.v10); i := i + 1) {
- info_ind.trx.v10[i].pdch_mask := '00000000'B;
- }
- info_ind.trx.v10[0].pdch_mask := '00000001'B;
- } else {
- /* Only the first TRX is enabled. */
- for (var integer i := 0; i < lengthof(info_ind.trx.v09); i := i + 1) {
- info_ind.trx.v09[i].pdch_mask := '00000000'B;
- }
- info_ind.trx.v09[0].pdch_mask := '00000001'B;
- }
+
+ /* Only the first TRX is enabled. */
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (1 .. 7));
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000001'B, 0);
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename(), info_ind);
@@ -2501,14 +2492,13 @@
f_init_gprs_ms(num_ms);
info_ind := valueof(ts_PCUIF_INFO_default);
+
/* Only the 3 first TRX are enabled. The enabled ones all have same
amount of resources, hence same amount of initial resources. */
- for (i := 0; i < lengthof(info_ind.trx.v10); i := i + 1) {
- info_ind.trx.v10[i].pdch_mask := '00000000'B;
- }
- info_ind.trx.v10[0].pdch_mask := '00000011'B;
- info_ind.trx.v10[1].pdch_mask := '00001100'B;
- info_ind.trx.v10[2].pdch_mask := '11000000'B;
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000000'B, (3 .. 7));
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00000011'B, 0);
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '00001100'B, 1);
+ f_PCUIF_ver_INFO_PDCHMask_set(info_ind, '11000000'B, 2);
/* Initialize the PCU interface abstraction */
f_init_raw(testcasename(), info_ind);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21001
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I443bc99d35994dda14cdf9c41609d528368c401f
Gerrit-Change-Number: 21001
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.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/20201102/19060d15/attachment.htm>