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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15449 Change subject: library/GSM_RR_Types.ttcn: introduce generic tr_IMM_TBF_ASS ...................................................................... library/GSM_RR_Types.ttcn: introduce generic tr_IMM_TBF_ASS Both 't_IMM_ASS_TBF_DL' and 't_RR_IMM_ASS_TBF_DL' templates were introduced for a specific task - matching Packet Immediate Assignment (Downlink TBF) by TLLI. In the upcoming changes we will also need to match Uplink TBF assignment, and more generic fields such as Timing Advance. Let's add a generic template for Packet Immediate Assignment and allow passing IaRestOctets as a parameter. Change-Id: I492cf990820ba153ea71469b8b623e56e031e549 --- M library/GSM_RR_Types.ttcn M library/L1CTL_PortType.ttcn M pcu/PCU_Tests.ttcn 3 files changed, 33 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/15449/1 diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index 480a12b..fee19c9 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -882,6 +882,32 @@ } }; + /* TODO: implement send version of this template */ + template GsmRrMessage tr_IMM_TBF_ASS(template boolean dl := ?, + template uint8_t ra := ?, + template GsmFrameNumber fn := ?, + template TimingAdvance ta := ?, + template PacketChannelDescription ch_desc := ?, + template IaRestOctets rest := ?) := { + header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?), + payload := { + imm_ass := { + ded_or_tbf := { + spare := ?, + tma := ?, + downlink := dl, + tbf := true + }, + page_mode := ?, + chan_desc := omit, + pkt_chan_desc := ch_desc, + req_ref := tr_compute_ReqRef(ra, fn), + timing_advance := ta, + mobile_allocation := ?, + rest_octets := rest + } + } + }; template (value) GsmRrL3Message ts_MEAS_REP(boolean valid, uint6_t rxl_f, uint6_t rxl_s, uint3_t rxq_f, uint3_t rxq_s, @@ -906,37 +932,4 @@ } }; - /* TODO: introduce generic TBF Assignment template for DL and UL */ - template ImmediateAssignment t_IMM_ASS_TBF_DL(template GprsTlli tlli) := { - ded_or_tbf := { - spare := ?, - tma := ?, - downlink := ?, - tbf := true - }, - page_mode := ?, - chan_desc := omit, - pkt_chan_desc := { - channel_Type_spare := ?, - tn := ?, - tsc := ?, - presence := ?, - zero := *, - one := omit - }, - req_ref := ?, - timing_advance := ?, - mobile_allocation := ?, - rest_octets := tr_IaRestOctets_DLAss(tr_PacketDlAssign(tlli)) - }; - - template GsmRrMessage t_RR_IMM_ASS_TBF_DL(template GprsTlli tlli) := { - header := t_RrHeader(IMMEDIATE_ASSIGNMENT, ?), - payload := { - imm_ass := t_IMM_ASS_TBF_DL(tlli) - } - }; - - - } with { encode "RAW" ; variant "FIELDORDER(msb)" } diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn index 2423715..3c83c3d 100644 --- a/library/L1CTL_PortType.ttcn +++ b/library/L1CTL_PortType.ttcn @@ -152,15 +152,18 @@ } function f_L1CTL_WAIT_IMM_ASS_TBF_DL(L1CTL_PT pt, GprsTlli tlli) return ImmediateAssignment { + var template PacketDlAssign dl_ass := tr_PacketDlAssign(tlli); + var template IaRestOctets rest := tr_IaRestOctets_DLAss(dl_ass); var L1ctlDlMessage dl; var GsmRrMessage rr; timer T := 10.0; T.start; alt { [] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl { + /* TODO: use decmatch tr_IaRestOctets_DLAss(...) instead */ rr := dec_GsmRrMessage(dl.payload.data_ind.payload); log("PCH/AGCN DL RR: ", rr); - if (match(rr, t_RR_IMM_ASS_TBF_DL(tlli))) { + if (match(rr, tr_IMM_TBF_ASS(dl := true, rest := rest))) { log("Received IMM.ASS for our TLLI!"); } else { repeat; diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 4ef71fa..838b6e1 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -591,6 +591,8 @@ } function f_wait_tbf_dl(TbfNr tbf_nr, GprsTlli tlli) runs on dummy_CT return ImmediateAssignment { + var template PacketDlAssign dl_ass := tr_PacketDlAssign(tlli); + var template IaRestOctets rest := tr_IaRestOctets_DLAss(dl_ass); var LAPDm_ph_data ph_data; var GsmRrMessage rr; timer T := 10.0; @@ -599,7 +601,7 @@ [] L1.receive(LAPDm_ph_data:{sacch:=?,sapi:=0,lapdm:={bbis:=?}}) -> value ph_data { rr := dec_GsmRrMessage(ph_data.lapdm.bbis.payload); log("PCH/AGCH DL RR: ", rr); - if (match(rr, t_RR_IMM_ASS_TBF_DL(tlli))) { + if (match(rr, tr_IMM_TBF_ASS(dl := true, rest := rest))) { var TbfPars tbf_pars := valueof(t_TbfParsInit); log("Received IMM.ASS for our TLLI!"); tbf_pars.tfi[rr.payload.imm_ass.pkt_chan_desc.tn] := -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15449 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: I492cf990820ba153ea71469b8b623e56e031e549 Gerrit-Change-Number: 15449 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190909/33c7dfcf/attachment.htm>