pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510


Change subject: lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()
......................................................................

lib/bssmap: Introduce function f_bssmap_ie_cic_2_int()

Function will be re-used in forthcoming commits.

Change-Id: Ifc7444ecca1571959ed83b43d3c7461c637686ae
---
M library/BSSMAP_Templates.ttcn
M library/RAN_Emulation.ttcnpp
2 files changed, 6 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/10/14510/1

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 @@
        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 @@
                    
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);
                }
        }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14510
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: Ifc7444ecca1571959ed83b43d3c7461c637686ae
Gerrit-Change-Number: 14510
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to