pespin submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified
NGAP_Templates: Introduce generic NGSetupFailure template f_mw_n2_NGSetupFailure()

Use one template containing all possible optional IEs instead of having
different templates containing optional subsets.

Change-Id: I39302624212b907a5267b8104176c2bbb96bd2ae
---
M 5gc/C5G_Tests.ttcn
M library/ngap/NGAP_Templates.ttcn
2 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/5gc/C5G_Tests.ttcn b/5gc/C5G_Tests.ttcn
index fdad2d2..e8c9cd2 100644
--- a/5gc/C5G_Tests.ttcn
+++ b/5gc/C5G_Tests.ttcn
@@ -260,7 +260,7 @@

if (exp_fail) {
exp_pdu := mw_ngap_unsuccMsg((mw_n2_NGSetupFailure(exp_cause),
- mw_n2_NGSetupFailure_TimeToWait(exp_cause)));
+ f_mw_n2_NGSetupFailure(exp_cause, p_timeToWait := ?)));
} else {
exp_pdu := mw_ngap_succMsg(mw_n2_NGSetupResponse);
}
diff --git a/library/ngap/NGAP_Templates.ttcn b/library/ngap/NGAP_Templates.ttcn
index 8b297e4..3b2f953 100644
--- a/library/ngap/NGAP_Templates.ttcn
+++ b/library/ngap/NGAP_Templates.ttcn
@@ -6225,29 +6225,35 @@
}
} // End of template mw_n2_NGSetupFailure

- template (present) UnsuccessfulOutcome mw_n2_NGSetupFailure_TimeToWait(
- template (present) Cause p_cause := ?,
- template (present) TimeToWait p_timeToWait := ?
- ) := {
- procedureCode := id_NGSetup,
- criticality := reject,
- value_ := {
- NGSetupFailure := {
- protocolIEs := {
- {
- id := id_Cause,
- criticality := ignore,
- value_ := { Cause := p_cause }
- },
- {
- id := id_TimeToWait,
- criticality := ignore,
- value_ := { TimeToWait := p_timeToWait }
- }
- }
- }
- }
- } // End of template mw_n2_NGSetupFailure_TimeToWait
+ function f_mw_n2_NGSetupFailure(template (present) Cause p_cause := ?,
+ template TimeToWait p_timeToWait := omit,
+ template CriticalityDiagnostics p_criticalityDiagnostics := omit)
+ return template (present) UnsuccessfulOutcome {
+
+ var template (present) UnsuccessfulOutcome pdu := mw_n2_NGSetupFailure(p_cause);
+ var integer idx := lengthof(pdu.value_.NGSetupFailure.protocolIEs);
+
+ /* Time to Wait */
+ if (not istemplatekind(p_timeToWait, "omit")) {
+ pdu.value_.NGSetupFailure.protocolIEs[idx] := {
+ id := id_TimeToWait,
+ criticality := ignore,
+ value_ := { TimeToWait := p_timeToWait }
+ };
+ idx := idx + 1;
+ }
+
+ /* Criticality Diagnostics */
+ if (not istemplatekind(p_criticalityDiagnostics, "omit")) {
+ pdu.value_.NGSetupFailure.protocolIEs[idx] := {
+ id := id_CriticalityDiagnostics,
+ criticality := ignore,
+ value_ := { CriticalityDiagnostics := p_criticalityDiagnostics }
+ };
+ idx := idx + 1;
+ }
+ return pdu;
+ } // End of f_mw_mw_n2_NGSetupFailure

} // End of group Receive


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

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I39302624212b907a5267b8104176c2bbb96bd2ae
Gerrit-Change-Number: 40916
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>