pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified jolly: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve
library: Improve some f_rnd_*() functions

Change-Id: I82535caf08aa628738c0cbc29b8b27d525ec78ce
---
M library/General_Types.ttcn
M library/Osmocom_Types.ttcn
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/library/General_Types.ttcn b/library/General_Types.ttcn
index 163ec47..dca4ea2 100644
--- a/library/General_Types.ttcn
+++ b/library/General_Types.ttcn
@@ -172,6 +172,7 @@
type hexstring HEX4n length(4) with { variant "" };
type hexstring HEX6n length(6) with { variant "" };
type hexstring HEX8n length(8) with { variant "" };
+ type hexstring HEX14n length(14) with { variant "" };
type hexstring HEX15n length(15) with { variant "" };
type hexstring HEX16n length(16) with { variant "" };
type hexstring HEX24n length(24) with { variant "" };
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index 21d7abf..f966ccc 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -101,11 +101,11 @@
return substr(oct2bit(oct), 0, len);
}

-function f_rnd_imsi(in hexstring prefix) return hexstring {
+function f_rnd_imsi(in hexstring prefix := ''H) return HEX15n {
return prefix & f_rnd_hexstring(15 - lengthof(prefix), 10);
}

-function f_rnd_imei(in hexstring prefix) return hexstring {
+function f_rnd_imei(in hexstring prefix := ''H) return HEX14n {
return prefix & f_rnd_hexstring(14 - lengthof(prefix), 10);
}


To view, visit change 40442. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I82535caf08aa628738c0cbc29b8b27d525ec78ce
Gerrit-Change-Number: 40442
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>