summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-18 17:32:15 +0200
committerpespin <pespin@sysmocom.de>2019-06-19 10:52:11 +0000
commit43021cbbf784e08a0a07fcbc19b7bb22f056bbea (patch)
treec656f3bdf73a72585b57bc4ed9a1167c42fd2b5e
parent392963fa28231ee23567c2e99ec7f8a0c4614002 (diff)
lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
Function will be re-used in forthcoming commits. Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
-rw-r--r--library/BSSMAP_Templates.ttcn5
-rw-r--r--library/RAN_Emulation.ttcnpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index b377358..9015680 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -402,6 +402,11 @@ template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, u
cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5))
}
+function f_bssmap_ie_cic_2_int(BSSMAP_IE_CircuitIdentityCode cic_ie) return integer {
+ var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
+ return cic;
+}
+
template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,
uint16_t udp_port,
integer len) := {
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index cd0c867..de5b7f3 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -422,7 +422,7 @@ runs on RAN_Emulation_CT {
ispresent(bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode)) {
var BSSMAP_IE_CircuitIdentityCode cic_ie :=
bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode;
- var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
+ var integer cic := f_bssmap_ie_cic_2_int(cic_ie);
f_comp_store_cic(client, cic);
}
}