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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18379 ) Change subject: pcu: Parse USF from Pkt Ul Ass ...................................................................... pcu: Parse USF from Pkt Ul Ass Change-Id: If786d838f24755f3207d57c849ac28e58a7ee1c6 --- M pcu/GPRS_Components.ttcn 1 file changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/79/18379/1 diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn index ca4bcd7..cf5dca8 100644 --- a/pcu/GPRS_Components.ttcn +++ b/pcu/GPRS_Components.ttcn @@ -63,9 +63,10 @@ }; type record UlTbf { - GsmRrMessage rr_imm_ass, - PacketUlAssignChan ass, + GsmRrMessage rr_imm_ass optional, + PacketUlAssignChan ass optional, uint5_t tfi, + uint3_t usf[8], boolean is_egprs, uint14_t bsn, CodingScheme tx_cs_mcs @@ -92,6 +93,7 @@ /* One phase packet access (see 3GPP TS 44.018, table 9.1.8.1) */ const BIT8 chan_req_def := '01111000'B; +const uint3_t USF_UNUSED := 7; /* used to indicate PRACH */ template (value) GprsMS t_GprsMS_def := { imsi := f_gen_imsi(42), @@ -105,6 +107,16 @@ dl_tbf := omit }; +template (value) UlTbf t_UlTbf_def := { + rr_imm_ass := omit, + ass := omit, + tfi := 0, + usf := { USF_UNUSED, USF_UNUSED, USF_UNUSED, USF_UNUSED, USF_UNUSED, USF_UNUSED, USF_UNUSED, USF_UNUSED }, + is_egprs := false, + bsn := 0, + tx_cs_mcs := CS_1 +}; + type component MS_BTS_IFACE_CT { /* Virtual BTS component */ var RAW_PCU_BTS_CT vc_BTS; @@ -146,10 +158,10 @@ function f_ultbf_new_from_rr_imm_ass(in GsmRrMessage rr_imm_ass) runs on MS_BTS_IFACE_CT return UlTbf { - var UlTbf ul_tbf; + var UlTbf ul_tbf := valueof(t_UlTbf_def); + var uint3_t tn_allocated := rr_imm_ass.payload.imm_ass.pkt_chan_desc.tn; ul_tbf.rr_imm_ass := rr_imm_ass; - ul_tbf.bsn := 0; /* Make sure we received an UL TBF Assignment */ if (match(rr_imm_ass, tr_IMM_TBF_ASS(dl := false, rest := tr_IaRestOctets_ULAss(?)))) { @@ -158,6 +170,7 @@ ul_tbf.is_egprs := false; if (match(ul_tbf.ass.ccch, tr_PacketUlDynAssign)) { ul_tbf.tfi := ul_tbf.ass.ccch.dynamic.tfi_assignment; + ul_tbf.usf[tn_allocated] := ul_tbf.ass.ccch.dynamic.usf; } else if (match(ul_tbf.ass.ccch, tr_PacketUlSglAssign)) { /* Nothing to do here yet */ } @@ -167,6 +180,7 @@ ul_tbf.is_egprs := true; if (match(ul_tbf.ass.ccch_egprs, tr_EgprsUlAssDynamic)) { ul_tbf.tfi := ul_tbf.ass.ccch_egprs.dynamic.tfi_assignment; + ul_tbf.usf[tn_allocated] := ul_tbf.ass.ccch_egprs.dynamic.usf; } else if (match(ul_tbf.ass.ccch_egprs, tr_EgprsUlAssMultiblock)) { /* Nothing to do here yet */ } @@ -181,10 +195,9 @@ function f_ultbf_new_from_ass_pacch(RlcmacDlBlock dl_block) runs on MS_BTS_IFACE_CT return UlTbf { - var UlTbf ul_tbf; + var UlTbf ul_tbf := valueof(t_UlTbf_def); ul_tbf.ass.pacch := dl_block.ctrl.payload.u.ul_assignment; - ul_tbf.bsn := 0; ul_tbf.tx_cs_mcs := f_rlcmac_dl_block_get_assigned_ul_cs_mcs(dl_block); ul_tbf.tfi := f_rlcmac_dl_block_get_tfi(dl_block); /* TODO: handle GlobalTfiOrTlli tfi_or_tlli from pkt_ul_ass */ @@ -193,10 +206,19 @@ if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_GPRS(?, tr_PktUlAssGprsDynamic(tr_DynamicAllocation(?))))) { ul_tbf.tfi := dl_block.ctrl.payload.u.ul_assignment.gprs.dyn_block_alloc.ul_tfi_assignment; ul_tbf.is_egprs := false; - } - if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_EGPRS(?, tr_PktUlAssEgprsDynamic(tr_DynamicAllocation(?))))) { + for (var integer i := 0; i < 8; i := i + 1) { + if (dl_block.ctrl.payload.u.ul_assignment.gprs.dyn_block_alloc.ts_allocation.ts[i].presence == '1'B) { + ul_tbf.usf[i] := dl_block.ctrl.payload.u.ul_assignment.gprs.dyn_block_alloc.ts_allocation.ts[i].usf_tn; + } + } + } else if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_EGPRS(?, tr_PktUlAssEgprsDynamic(tr_DynamicAllocation(?))))) { ul_tbf.tfi := dl_block.ctrl.payload.u.ul_assignment.egprs.dyn_block_alloc.ul_tfi_assignment; ul_tbf.is_egprs := true; + for (var integer i := 0; i < 8; i := i + 1) { + if (dl_block.ctrl.payload.u.ul_assignment.egprs.dyn_block_alloc.ts_allocation.ts[i].presence == '1'B) { + ul_tbf.usf[i] := dl_block.ctrl.payload.u.ul_assignment.egprs.dyn_block_alloc.ts_allocation.ts[i].usf_tn; + } + } } return ul_tbf; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18379 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: If786d838f24755f3207d57c849ac28e58a7ee1c6 Gerrit-Change-Number: 18379 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/20200520/3fc8fad7/attachment.htm>