fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27519 )


Change subject: BTS_Tests: add altstep as_dl_sacch_lapdm_ab
......................................................................

BTS_Tests: add altstep as_dl_sacch_lapdm_ab

Change-Id: I3ba17683892e8aa1694bb6dd32d8b37660020026
---
M bts/BTS_Tests.ttcn
1 file changed, 21 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/19/27519/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1d3dfe7..3a3d7cc 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -917,6 +917,27 @@
        }
 }
 
+/* This altstep triggers on receipt of a Downlink SACCH containing a L2 payload
+ * that matches the given LAPDm frame, as well as the given SACCH L1 header. */
+private altstep as_dl_sacch_lapdm_ab(out SacchL1Header l1h, out LapdmFrameAB 
frame,
+                                    template (present) LapdmFrameAB tr_frame 
:= ?,
+                                    template (present) SacchL1Header tr_l1h := 
?,
+                                    template (present) GsmSapi sapi := ?)
+runs on ConnHdlr {
+       var L1ctlDlMessage dl_msg;
+       template (present) RslLinkId link_id := tr_RslLinkID_SACCH(sapi);
+       template (present) L1ctlDataReq tr_data := {
+               l1header := tr_l1h,
+               l2_payload := decmatch tr_frame
+       };
+
+       [] as_l1ctl_dl_msg(dl_msg, decmatch tr_data, g_chan_nr, link_id) {
+               var octetstring data := dl_msg.payload.data_ind.payload;
+               l1h := dec_SacchL1Header(substr(data, 0, 2));
+               frame := dec_LapdmFrameAB(substr(data, 2, lengthof(data) - 2));
+       }
+}
+
 /* This altstep is built on top of as_dl_dcch_lapdm_ab(), and triggers on 
receipt
  * of a LAPDm AB frame with a L3 payload matching the given template.  The L3
  * payload is treated as PDU_ML3_NW_MS. */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27519
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: I3ba17683892e8aa1694bb6dd32d8b37660020026
Gerrit-Change-Number: 27519
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to