jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33142 )
Change subject: WIP: ASCI related BTS tests
..
WIP: ASCI related BTS tests
Change-Id: I3a93fa486a48957367d2c727cc0a8eea33d3bf11
---
M bts/BTS_Tests.ttcn
A bts/BTS_Tests_ASCI.ttcn
2 files changed, 93 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks
refs/changes/42/33142/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 34afaca..1f0ba32 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -74,6 +74,7 @@
import from TELNETasp_PortType all;
import from BTS_Tests_LAPDm all;
+friend module BTS_Tests_ASCI;
friend module BTS_Tests_SMSCB;
friend module BTS_Tests_VAMOS;
friend module BTS_Tests_virtphy;
diff --git a/bts/BTS_Tests_ASCI.ttcn b/bts/BTS_Tests_ASCI.ttcn
new file mode 100644
index 000..4bf0f8d
--- /dev/null
+++ b/bts/BTS_Tests_ASCI.ttcn
@@ -0,0 +1,83 @@
+module BTS_Tests_ASCI {
+
+/* Integration Tests for OsmoBTS
+ *
+ * (C) 2021 by sysmocom - s.m.f.c. GmbH
+ * Author: Vadim Yanitskiy
+ *
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This module contains VAMOS specific test cases.
+ */
+
+import from Misc_Helpers all;
+import from General_Types all;
+import from Osmocom_Types all;
+import from GSM_Types all;
+import from L1CTL_PortType all;
+import from L1CTL_Types all;
+import from LAPDm_Types all;
+import from IPA_Emulation all;
+import from GSM_RR_Types all;
+import from L3_Templates all;
+
+import from MobileL3_CommonIE_Types all;
+
+import from RSL_Emulation all;
+import from RSL_Types all;
+
+import from BTS_Tests all;
+
+
+
+/* convert from boolean value to BIT1 */
+private function bool2bit1(boolean inp) return BIT1 {
+ if (inp) {
+ return '1'B;
+ } else {
+ return '0'B;
+ }
+}
+
+/* encode a VBS/VGCS call reference into it's OCT5 representation */
+private function f_enc_gcr(integer call_ref, boolean is_group_call, boolean
ack_required := false)
+return OCT5
+{
+ var DescriptiveGroupOrBroadcastCallReference_V v := {
+ binaryCodingOfGroupOrBroadcastCallReference :=
int2bit(call_ref, 27),
+ sF := bool2bit1(is_group_call),
+ aF := bool2bit1(ack_required),
+ callPriority := '000'B,
+ cipheringInformation := ''B,
+ spare := ''B
+ }
+ return bit2oct(encvalue(v));
+}
+
+testcase TC_vbs_notification() runs on test_CT {
+
+ f_init_l1ctl();
+ f_l1_tune(L1CTL);
+
+ var OCT5 gcr := f_enc_gcr(2342, false, false);
+ var OCT3 chan_desc := '234266'O;
+
+ RSL_CCHAN.send(ts_ASP_RSL_UD(ts_RSL_NOTIF_CMD_START(gcr, chan_desc)));
+
+ /* FIXME: expect receiving something on PCH */
+ f_sleep(5.0);
+
+}
+
+control {
+ execute( TC_vbs_notification() );
+
+}
+
+
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33142
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: I3a93fa486a48957367d2c727cc0a8eea33d3bf11
Gerrit-Change-Number: 33142
Gerrit-PatchSet: 1
Gerrit-Owner: jolly
Gerrit-CC: laforge
Gerrit-MessageType: newchange