aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bts/BTS_Tests.ttcn1
-rw-r--r--bts/BTS_Tests_ASCI.ttcn83
2 files changed, 84 insertions, 0 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 34afacab..1f0ba322 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -74,6 +74,7 @@ import from Osmocom_VTY_Functions all;
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 00000000..4bf0f8d7
--- /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 <info@sysmocom.de>
+ * Author: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
+ *
+ * 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 := '0000'B,
+ spare := '0000'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() );
+
+}
+
+
+}