Change in osmo-ttcn3-hacks[master]: BSSMAP_templates: Update templates to set Osmux fields

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu May 23 13:14:50 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/14141


Change subject: BSSMAP_templates: Update templates to set Osmux fields
......................................................................

BSSMAP_templates: Update templates to set Osmux fields

After new fields (osmux osmocom extensions) were added to BSSMAP Reset
and BSSMAP AssignReq/AssignCompl in titan.ProtocolModules.BSSMAP, we
need to set them in ts_* templates, otherwise TTCN3 runtimes fails with:
"""
BSC_Tests.ttcn:143 Dynamic test case error: Performing a valueof or send
operation on a non-specific template of type @BSSAP_Types.BSSMAP_IE_Osmo_OsmuxSupport.
"""

Fixes: fe0c6083bd7176b8375fafc6d6399772d85a70a3
Depends: titan.ProtocolModules.BSSMAP Iaf1e137269c0da20b2c96fd104b57edf336693af
Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd
---
M library/BSSMAP_Templates.ttcn
1 file changed, 44 insertions(+), 16 deletions(-)



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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 02c84e2..ad314a3 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -164,47 +164,62 @@
 	oldToNewBSSIEs := val
 }
 
-template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause) modifies ts_BSSAP_BSSMAP := {
+template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
+	elementIdentifier := 'F0'O
+}
+
+private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport {
+	if (osmux_enabled) {
+		return tr_BSSMAP_IE_Osmo_OsmuxSupport;
+	}
+	return omit;
+}
+
+template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
 			reset := {
 				messageType := '30'O,
 				cause := ts_BSSMAP_IE_Cause(cause),
-				a_InterfaceSelectorForReset := omit
+				a_InterfaceSelectorForReset := omit,
+				osmuxSupport := f_enc_osmux_support(osmux_enabled)
 			}
 		}
 	}
 }
 
-template PDU_BSSAP tr_BSSMAP_Reset modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
 			reset := {
 				messageType := '30'O,
 				cause := ?,
-				a_InterfaceSelectorForReset := *
+				a_InterfaceSelectorForReset := *,
+				osmuxSupport := f_enc_osmux_support(osmux_enabled)
 			}
 		}
 	}
 }
 
-template (value) PDU_BSSAP ts_BSSMAP_ResetAck modifies ts_BSSAP_BSSMAP := {
+template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
 			resetAck := {
 				messageType := '31'O,
-				a_InterfaceSelectorForReset := omit
+				a_InterfaceSelectorForReset := omit,
+				osmuxSupport := f_enc_osmux_support(osmux_enabled)
 			}
 		}
 	}
 }
 
-template PDU_BSSAP tr_BSSMAP_ResetAck modifies tr_BSSAP_BSSMAP := {
+template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
 			resetAck := {
 				messageType := '31'O,
-				a_InterfaceSelectorForReset := *
+				a_InterfaceSelectorForReset := *,
+				osmuxSupport := f_enc_osmux_support(osmux_enabled)
 			}
 		}
 	}
@@ -443,9 +458,15 @@
 	codecElements := valueof(elem)
 }
 
+template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := {
+	elementIdentifier := 'F1'O,
+	osmuxCID := cid
+}
+
 template PDU_BSSAP
 ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
-			template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit)
+			template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
+			template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
 modifies ts_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
@@ -472,14 +493,16 @@
 				globalCallReference := omit,
 				lCLS_Configuration := omit,
 				lCLS_ConnectionStatusControl := omit,
-				lCLS_CorrelationNotNeeded := omit
+				lCLS_CorrelationNotNeeded := omit,
+				osmuxCID := osmuxCID
 			}
 		}
 	}
 }
 
 template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *,
-					   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *)
+					   template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
+					   template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
 modifies tr_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
@@ -506,7 +529,8 @@
 				globalCallReference := *,
 				lCLS_Configuration := *,
 				lCLS_ConnectionStatusControl := *,
-				lCLS_CorrelationNotNeeded := *
+				lCLS_CorrelationNotNeeded := *,
+				osmuxCID := osmuxCID
 			}
 		}
 	}
@@ -515,7 +539,8 @@
 template PDU_BSSAP
 ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit,
 			     template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
-			     template BSSMAP_IE_SpeechCodec speechCodec := omit)
+			     template BSSMAP_IE_SpeechCodec speechCodec := omit,
+			     template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
 modifies ts_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
@@ -533,14 +558,16 @@
 				aoIPTransportLayer := aoip,
 				speechCodec := speechCodec,
 				codecList := omit,
-				lCLS_BSS_Status := omit
+				lCLS_BSS_Status := omit,
+				osmuxCID := osmuxCID
 			}
 		}
 	}
 }
 
 template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *,
-						template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *)
+						template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
+						template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
 modifies tr_BSSAP_BSSMAP := {
 	pdu := {
 		bssmap := {
@@ -558,7 +585,8 @@
 				aoIPTransportLayer := aoip,
 				speechCodec := *,
 				codecList := *,
-				lCLS_BSS_Status := *
+				lCLS_BSS_Status := *,
+				osmuxCID := osmuxCID
 			}
 		}
 	}

-- 
To view, visit https://gerrit.osmocom.org/14141
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I568100376cf8a47c01a33bada97bf8eaa7c07fcd
Gerrit-Change-Number: 14141
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190523/c0169312/attachment.html>


More information about the gerrit-log mailing list