summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-08-01 18:10:36 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-07 23:32:32 +0200
commitb409ff28197e6d01adb3c6063b66b814ce0bbaf8 (patch)
tree21ba4f529fb7eb1ea167501e966f47ddb0397d06 /msc
parent5e71c14750c06e5511ea4522b67f69d96329f8ee (diff)
move USSD_Helpers.ttcn to library
We want to use those also from the HLR_Tests, not just from MSC_Tests. Change-Id: I22be6c03d85dc6d6a8266b5ebce5d0c69c0551ed
Diffstat (limited to 'msc')
-rw-r--r--msc/USSD_Helpers.ttcn78
-rwxr-xr-xmsc/gen_links.sh2
2 files changed, 1 insertions, 79 deletions
diff --git a/msc/USSD_Helpers.ttcn b/msc/USSD_Helpers.ttcn
deleted file mode 100644
index 5dd4bb1..0000000
--- a/msc/USSD_Helpers.ttcn
+++ /dev/null
@@ -1,78 +0,0 @@
-module USSD_Helpers {
-
-/* USSD helpers for composing messages, building on top
- * of both L3_Templates and USSD_Templates.
- *
- * (C) 2018 by Vadim Yanitskiy <axilirator@gmail.com>
- * All rights reserved.
- *
- * Released under the terms of GNU General Public License, Version 2 or
- * (at your option) any later version.
- */
-
-import from General_Types all;
-import from TCCEncoding_Functions all;
-
-import from SS_Templates all;
-import from SS_Types all;
-
-function f_USSD_FACILITY_IE_INVOKE(
- integer invoke_id := 1,
- SS_Op_Code op_code := SS_OP_CODE_PROCESS_USS_REQ,
- charstring ussd_string := "*#100#"
-) return octetstring {
- var SS_FacilityInformation facility_ie;
- var octetstring ussd_string_enc;
-
- /* Encode input string with GSM 7-bit encoding */
- ussd_string_enc := f_encGSM7bit(ussd_string);
-
- /* Encode Facility IE */
- facility_ie := valueof(ts_SS_USSD_FACILITY_INVOKE(
- invoke_id := invoke_id,
- op_code := op_code,
- ussd_dcs := SS_USSD_DEFAULT_DCS,
- ussd_string := ussd_string_enc
- ));
-
- return enc_SS_FacilityInformation(facility_ie);
-}
-
-function f_USSD_FACILITY_IE_RETURN_RESULT(
- integer invoke_id := 1,
- SS_Op_Code op_code := SS_OP_CODE_PROCESS_USS_REQ,
- charstring ussd_string := "Lorem Ipsum"
-) return octetstring {
- var SS_FacilityInformation facility_ie;
- var octetstring ussd_string_enc;
-
- /* Encode input string with GSM 7-bit encoding */
- ussd_string_enc := f_encGSM7bit(ussd_string);
-
- /* Encode Facility IE */
- facility_ie := valueof(ts_SS_USSD_FACILITY_RETURN_RESULT(
- invoke_id := invoke_id,
- op_code := op_code,
- ussd_dcs := SS_USSD_DEFAULT_DCS,
- ussd_string := ussd_string_enc
- ));
-
- return enc_SS_FacilityInformation(facility_ie);
-}
-
-function f_USSD_FACILITY_IE_RETURN_ERROR(
- integer invoke_id := 1,
- SS_Err_Code err_code := SS_ERR_CODE_UNEXPECTED_DATA_VALUE
-) return octetstring {
- var SS_FacilityInformation facility_ie;
-
- /* Encode Facility IE */
- facility_ie := valueof(ts_SS_FACILITY_RETURN_ERROR(
- invoke_id := invoke_id,
- err_code := err_code
- ));
-
- return enc_SS_FacilityInformation(facility_ie);
-}
-
-}
diff --git a/msc/gen_links.sh b/msc/gen_links.sh
index d8a7d22..a191aa5 100755
--- a/msc/gen_links.sh
+++ b/msc/gen_links.sh
@@ -90,7 +90,7 @@ FILES+="BSSMAP_Emulation.ttcn BSSAP_CodecPort.ttcn BSSMAP_Templates.ttcn BSSAP_A
FILES+="RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunctDef.cc "
FILES+="MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunctDef.cc "
FILES+="SMPP_CodecPort.ttcn SMPP_CodecPort_CtrlFunct.ttcn SMPP_CodecPort_CtrlFunctDef.cc SMPP_Emulation.ttcn SMPP_Templates.ttcn "
-FILES+="SS_Templates.ttcn SCCP_Templates.ttcn"
+FILES+="SS_Templates.ttcn SCCP_Templates.ttcn USSD_Helpers.ttcn"
gen_links $DIR $FILES
ignore_pp_results