pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43790?usp=email )
Change subject: NGAP_Templates.ttcn: HandoverRequired: Allow passing optional Direct Forwarding Path Availability IE ......................................................................
NGAP_Templates.ttcn: HandoverRequired: Allow passing optional Direct Forwarding Path Availability IE
Change-Id: Ie2da6fffb57bf0e1eeb39c89e808725e1ac7baa2 --- M 5gc/ConnHdlr.ttcn M library/ngap/NGAP_Templates.ttcn 2 files changed, 84 insertions(+), 4 deletions(-)
Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/5gc/ConnHdlr.ttcn b/5gc/ConnHdlr.ttcn index 6125489..74a47a8 100644 --- a/5gc/ConnHdlr.ttcn +++ b/5gc/ConnHdlr.ttcn @@ -1122,25 +1122,27 @@ /* 3GPP TS 38.413 8.4.1 Handover Preparation * 3GPP TS 38.413 9.2.3.1 HANDOVER REQUIRED * 3GPP TS 38.413 9.3.4.14 Handover Required Transfer */ -function f_n2_handover_required(template (value) TargetID target_id) runs on ConnHdlr -{ +function f_n2_handover_required(template (value) TargetID target_id, + template (omit) DirectForwardingPathAvailability direct_forwarding_avail := omit) +runs on ConnHdlr { var template (value) HandoverRequiredTransfer transfer; var octetstring transfer_enc; var template (value) PDUSessionResourceItemHORqd it; var template (value) NGAP_PDU tx_pdu;
- transfer := m_handoverRequiredTransfer(omit); + transfer := m_handoverRequiredTransfer(direct_forwarding_avail); transfer_enc := enc_NGAP_HandoverRequiredTransfer(valueof(transfer)); it := m_pDUSessionResourceItemHORqd(g_pars.ue_pars.sess_pars.id, transfer_enc);
tx_pdu := m_ngap_initMsg( - m_n2_HandoverRequired( + f_m_n2_HandoverRequired( g_pars.ue_pars.amf_id, g_pars.ue_pars.ran_id, intra5gs, m_cause_radioNetwork(resource_optimisation_handover), target_id, + direct_forwarding_avail, { it }, '1234'O /* random string, transparent to the AMF */)); NGAP.send(tx_pdu); diff --git a/library/ngap/NGAP_Templates.ttcn b/library/ngap/NGAP_Templates.ttcn index 8a3e543..df6be17 100644 --- a/library/ngap/NGAP_Templates.ttcn +++ b/library/ngap/NGAP_Templates.ttcn @@ -3863,6 +3863,84 @@ } } // End of template m_n2_HandoverRequired
+ function f_m_n2_HandoverRequired(template (value) AMF_UE_NGAP_ID p_amfUeNgapID := PX_AMF_UE_NGAP_ID, + template (value) RAN_UE_NGAP_ID p_ranUeNgapID := PX_RAN_UE_NGAP_ID, + template (value) HandoverType p_handoverType := PX_HANDOVER_TYPE, + template (value) Cause p_cause := m_cause_radioNetwork(PX_CAUSE_HANDOVER_REQUIRED), + template (value) TargetID p_targetID, + template (omit) DirectForwardingPathAvailability p_directForwardingPathAvailability, + template (value) PDUSessionResourceListHORqd p_pDUSessionResourceListHORqd, + template (value) SourceToTarget_TransparentContainer p_SourceToTarget_TransparentContainer) + return template (value) InitiatingMessage { + var template (value) InitiatingMessage pdu := { + procedureCode := id_HandoverPreparation, + criticality := reject, + value_ := { + HandoverRequired := { + protocolIEs := { + { + id := id_AMF_UE_NGAP_ID, + criticality := reject, + value_ := { AMF_UE_NGAP_ID := p_amfUeNgapID } + }, + { + id := id_RAN_UE_NGAP_ID, + criticality := reject, + value_ := { RAN_UE_NGAP_ID := p_ranUeNgapID } + }, + { + id := id_HandoverType, + criticality := reject, + value_ := { HandoverType := p_handoverType } + }, + { + id := id_Cause, + criticality := ignore, + value_ := { Cause := p_cause } + }, + { + id := id_TargetID, + criticality := reject, + value_ := { TargetID := p_targetID } + } + } + } + } + }; + var integer idx := lengthof(pdu.value_.HandoverRequired.protocolIEs); + + /* Direct Forwarding Path Availability */ + if (isvalue(p_directForwardingPathAvailability)) { + pdu.value_.HandoverRequired.protocolIEs[idx] := + { + id := id_DirectForwardingPathAvailability, + criticality := ignore, + value_ := { DirectForwardingPathAvailability := p_directForwardingPathAvailability } + }; + idx := idx + 1; + } + + /* PDU Session Resource List */ + pdu.value_.HandoverRequired.protocolIEs[idx] := + { + id := id_PDUSessionResourceListHORqd, + criticality := reject, + value_ := { PDUSessionResourceListHORqd := p_pDUSessionResourceListHORqd } + }; + idx := idx + 1; + + /* Source to Target Transparent Container */ + pdu.value_.HandoverRequired.protocolIEs[idx] := + { + id := id_SourceToTarget_TransparentContainer, + criticality := reject, + value_ := { SourceToTarget_TransparentContainer := p_SourceToTarget_TransparentContainer } + }; + idx := idx + 1; + + return pdu; + } // End of f_m_n2_HandoverRequired + } // End of group Send
group Receive {