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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22702 )
Change subject: Move "ro_integer" to Osmocom_Types
......................................................................
Move "ro_integer" to Osmocom_Types
We don't need several re-definitions of a "record of integer" type,
plus associated helper functions. Let's move that to the shared
Osmocom_Types.ttcn
Change-Id: I6a68ab8180a40b93c540db9cb80941c39c2fb549
---
M gbproxy/GBProxy_Tests.ttcn
M library/L1CTL_PortType.ttcn
M library/NS_Emulation.ttcnpp
M library/Osmocom_Types.ttcn
4 files changed, 20 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/22702/1
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 506ed38..ad8874c 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -498,19 +498,6 @@
f_vty_transceive(GBPVTY, "enable");
}
-type record of integer ro_integer;
-
-private function ro_integer_contains(ro_integer r, integer x) return boolean {
- for (var integer j := 0; j < lengthof(r); j := j+1) {
- if (r[j] == x) {
- return true;
- }
- }
- return false;
-}
-
-private type record of ro_integer roro_integer;
-
/* count the number of unblocked BVCI for each SGSN NSE */
private altstep as_count_unblocked4nse(integer sgsn_idx, inout roro_integer bvci_unblocked)
runs on test_CT {
diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 5c554c2..80e33a8 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -12,9 +12,9 @@
module L1CTL_PortType {
import from L1CTL_Types all;
import from UD_PortType all;
+ import from Socket_API_Definitions all;
import from UD_Types all;
import from Osmocom_Types all;
- import from Osmocom_Types all;
import from GSM_Types all;
import from GSM_RR_Types all;
import from L1CTL_PortType_CtrlFunct all;
@@ -32,7 +32,7 @@
charstring m_l1ctl_sock_path := "/tmp/osmocom_l2";
}
- function f_L1CTL_getMsgLen(in octetstring stream, inout ro_integer args) return integer {
+ function f_L1CTL_getMsgLen(in octetstring stream, inout Socket_API_Definitions.ro_integer args) return integer {
var integer stream_len := lengthof(stream);
var integer len;
if (stream_len < 2) {
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 34bbcd9..ca44a02 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -217,8 +217,8 @@
/* references to the per-NSVC components */
var NsvcTable g_nsvcs := {};
/* list of indexes to g_nsvcs[] of currently unblocked NSVCs */
- var ro_integer g_unblocked_nsvcs_sig := {};
- var ro_integer g_unblocked_nsvcs_data := {};
+ var Osmocom_Types.ro_integer g_unblocked_nsvcs_sig := {};
+ var Osmocom_Types.ro_integer g_unblocked_nsvcs_data := {};
};
type record NsvcTableEntry {
NSVCConfiguration cfg,
@@ -226,7 +226,6 @@
NsvcState state
};
type record of NsvcTableEntry NsvcTable;
- type record of integer ro_integer;
/* internal port from the NS-VC point of view */
type port NSint_SP_PT message {
@@ -319,7 +318,7 @@
}
} else if (g_nsvcs[i].state == NSVC_S_ALIVE_UNBLOCKED and state != NSVC_S_ALIVE_UNBLOCKED) {
/* remove index to list of unblocked NSVCs */
- var ro_integer new_unblocked_nsvcs_sig := {};
+ var Osmocom_Types.ro_integer new_unblocked_nsvcs_sig := {};
for (var integer j := 0; j < lengthof(g_unblocked_nsvcs_sig); j := j+1) {
if (g_unblocked_nsvcs_sig[j] != i) {
new_unblocked_nsvcs_sig := new_unblocked_nsvcs_sig & {j};
@@ -327,7 +326,7 @@
}
g_unblocked_nsvcs_sig := new_unblocked_nsvcs_sig;
- var ro_integer new_unblocked_nsvcs_data := {};
+ var Osmocom_Types.ro_integer new_unblocked_nsvcs_data := {};
for (var integer j := 0; j < lengthof(g_unblocked_nsvcs_data); j := j+1) {
if (g_unblocked_nsvcs_data[j] != i) {
new_unblocked_nsvcs_data := new_unblocked_nsvcs_data & {j};
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index e813a11..06920bf 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -283,5 +283,19 @@
return tmsi;
}
+type record of integer ro_integer;
+
+function ro_integer_contains(ro_integer r, integer x) return boolean {
+ for (var integer j := 0; j < lengthof(r); j := j+1) {
+ if (r[j] == x) {
+ return true;
+ }
+ }
+ return false;
+}
+
+type record of ro_integer roro_integer;
+
+
} with { encode "RAW"; variant "FIELDORDER(msb)" }
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22702
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: I6a68ab8180a40b93c540db9cb80941c39c2fb549
Gerrit-Change-Number: 22702
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210204/26e8ce8f/attachment.htm>