This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/6042
MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE
Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
---
M library/L3_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
3 files changed, 13 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/6042/1
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index c603b7b..f23c8fa 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -23,7 +23,10 @@
CM_TYPE_MO_CALL ('0001'B),
CM_TYPE_EMERG_CALL ('0010'B),
CM_TYPE_MO_SMS ('0100'B),
- CM_TYPE_SS_ACT ('1000'B)
+ CM_TYPE_SS_ACT ('1000'B),
+ CM_TYPE_VGCS ('1001'B),
+ CM_TYPE_VBS ('1010'B),
+ CM_TYPE_LCS ('1011'B)
}
@@ -104,7 +107,7 @@
};
/* Send template for CM SERVICE REQUEST */
-template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(BIT4 serv_type, MobileIdentityLV mi_lv) := {
+template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := {
discriminator := '0000'B, /* overwritten */
tiOrSkip := {
skipIndicator := '0000'B
@@ -114,7 +117,7 @@
cMServiceRequest := {
messageType := '000000'B, /* overwritten */
nsd := '00'B,
- cm_ServiceType := serv_type,
+ cm_ServiceType := int2bit(enum2int(serv_type), 4),
cipheringKeySequenceNumber := { '000'B, '0'B },
mobileStationClassmark2 := ts_CM2,
mobileIdentity := mi_lv,
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn b/msc_tests/BSC_ConnectionHandler.ttcn
index 25f8daf..330f25a 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -101,7 +101,7 @@
/* helper function to fully establish a dedicated channel */
function f_establish_fully(MobileIdentityLV mi, boolean expect_auth)
runs on BSC_ConnHdlr {
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
var PDU_DTAP_MT dtap_mt;
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 5976b45..566999b 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -475,7 +475,7 @@
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var BSSMAP_IE_CellIdentifier cell_id := valueof(ts_CellId_CGI('262'H, '042'H, 23, 42));
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
f_create_gsup_expect(hex2str(g_pars.imsi));
@@ -858,7 +858,7 @@
/* helper function for an emergency call. caller passes in mobile identity to use */
private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr {
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0010'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_ACC));
@@ -905,7 +905,7 @@
g_pars := pars;
var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0010'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ('05'O)));
setverdict(pass);
@@ -943,7 +943,7 @@
f_perform_lu(false, true, true);
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('1001'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VGCS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
setverdict(pass);
@@ -964,7 +964,7 @@
f_perform_lu(false, true, true);
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('1010'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VBS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
setverdict(pass);
@@ -985,7 +985,7 @@
f_perform_lu(false, true, true);
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('1011'B, mi));
+ var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_LCS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1))));
setverdict(pass);
--
To view, visit https://gerrit.osmocom.org/6042
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>