diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-03-14 23:56:40 +0300 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2022-04-05 13:52:53 +0000 |
commit | a144e3c78689e3fee68754d86080610a290aba63 (patch) | |
tree | a7c9aa79379f85a6ba5892b72d4f7344f127d7df | |
parent | 6844c161f984b809a0b96451359635af642eede5 (diff) |
BTS_Tests: add altstep as_dl_sacch_lapdm_ab
Change-Id: I3ba17683892e8aa1694bb6dd32d8b37660020026
-rw-r--r-- | bts/BTS_Tests.ttcn | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1d3dfe7c..3a3d7cc3 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -917,6 +917,27 @@ runs on ConnHdlr { } } +/* 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. */ |