Commit 619d1529 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed on ngKSI computaation

parent 57bfc337
Loading
Loading
Loading
Loading
+9 −9
Changes for etc/AtsNGAP/AtsNGAP_GNB_p_net.cfg_: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

LibCommon_Time.PX_TDONE                 := 30.0;
LibCommon_Time.PX_TAC                   := 30.0;
LibCommon_Time.PX_TNOAC                 := 10.0;
LibCommon_Time.PX_TWAIT                 := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 40.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 40.0;

LibNGAP_Pixits.PX_NGAP_TWAIT            := 40.0
LibCommon_Time.PX_TDONE                 := 40.0;
LibCommon_Time.PX_TAC                   := 40.0;
LibCommon_Time.PX_TNOAC                 := 20.0;
LibCommon_Time.PX_TWAIT                 := 40.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT      := 120.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 120.0;

LibNGAP_Pixits.PX_NGAP_TWAIT            := 120.0
LibNGAP_Pixits.PX_TIMER_T3560           := 500

NGAP_Pics.PICS_NGAP_AMF_IUT    := false
@@ -25,7 +25,7 @@ LibNGAP_Pics.PICS_REGISTRATION_REQUEST_WITH_NO_UE_CONTEXT_REQUEST := true # true
LibNGAP_Pixits.PX_NAS_MCC          := '999'H
LibNGAP_Pixits.PX_NAS_MNC          := '40'H
LibNGAP_Pixits.PX_UT_PLMN_MCC      := '999'H;
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '39'H;
LibNGAP_Pixits.PX_UT_PLMN_MNC      := '40'H;

# After its restart, the real UE (modem) is forced onto this PLMN: AT+CFUN=1, then AT+COPS=1
LibNGAP_Pixits.PX_UT_PLMN_MANUAL_SELECT := true
+40 −4
Changes for scripts/fast_rebuild.sh: 40 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -24,9 +24,17 @@ then
    exit 1
fi

if [ $# -eq 0 ]
# Modules whose TTCN-3/ASN.1 source is newer than their object file are always rebuilt, named on
# the command line or not: a module left out by mistake would otherwise be linked from its old
# object without any warning, and the binary would silently run the old code. So the module
# list is optional. Set DRY_RUN=1 to only print what would be rebuilt.
#
# Not detected: a module whose own source did not change but which uses a type, a component
# definition or a template signature changed in another module. The link fails on most of
# these; when such a definition changes, name the dependent modules too, or run a full `make`.
if [ "$1" = "-h" ] || [ "$1" = "--help" ]
then
    echo "Usage: ATS=<ats_name> $0 <module1> [module2 ...]"
    echo "Usage: ATS=<ats_name> [DRY_RUN=1] $0 [module1 module2 ...]"
    echo "Example: ATS=AtsNGAP $0 NGAP_PDU_Descriptions NGAP_Steps"
    exit 1
fi
@@ -36,6 +44,8 @@ cd "$(dirname "$0")/.." || exit 1
OUT_DIR=build/${ATS}
START_TS=$(date +%s)

if [ -z "$DRY_RUN" ]
then
    echo "=== Regenerating .cc/.hh for ${ATS} (all modules, but cheap) ==="
    make ATS=${ATS} "${OUT_DIR}/.generate"
    if [ $? -ne 0 ]
@@ -43,8 +53,34 @@ then
        echo "Code generation failed"
        exit 1
    fi
fi

# Sources as the Makefile passes them to the TTCN-3 compiler, to find the modules whose source
# is newer than their object file
modules=("$@")
for src in $(make ATS=${ATS} -n -B "${OUT_DIR}/.generate" | grep -m1 '/bin/compiler ' | tr ' ' '\n' | grep -E '\.(ttcn|ttcn3|asn|asn1)$')
do
    module=$(basename "${src%.*}")
    if [ "$src" -nt "${OUT_DIR}/${module}.o" ] && [[ ! " ${modules[*]} " =~ " ${module} " ]]
    then
        echo "=== ${module}: source newer than its object file, added to the modules to rebuild ==="
        modules+=("$module")
    fi
done

if [ ${#modules[@]} -eq 0 ]
then
    echo "Nothing to rebuild: no module named, and no source newer than its object file"
    exit 0
fi

if [ -n "$DRY_RUN" ]
then
    echo "DRY_RUN: would rebuild: ${modules[*]}"
    exit 0
fi

for module in "$@"
for module in "${modules[@]}"
do
    cc_file="${OUT_DIR}/${module}.cc"
    o_file="${OUT_DIR}/${module}.o"
@@ -85,6 +121,6 @@ then
fi

END_TS=$(date +%s)
echo "Done: bin/${ATS} rebuilt from {$*} in $((END_TS - START_TS))s."
echo "Done: bin/${ATS} rebuilt from {${modules[*]}} in $((END_TS - START_TS))s."

exit 0
+22 −11
Changes for ttcn/AtsNGAP/NGAP_TCFunctions.ttcn: 22 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -24,8 +24,11 @@ module NGAP_TCFunctions {
    // LibNGAP
    import from NGAP_IEs language "ASN.1:2002" all;
    import from NGAP_Constants language "ASN.1:2002" all;
    import from CommonDefs all;
    import from LibNGAP_Pics all;
    import from LibNGAP_Pixits all;
    import from LibNGAP_Templates all;
    import from LibNGAP_EncdecDeclarations all;
    import from LibNGAP_Functions all;
    import from LibNGAP_Interface all;
    import from LibNGAP_Steps all;
@@ -63,6 +66,20 @@ module NGAP_TCFunctions {
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                // Test Body
                if (PICS_USE_AT_COMMANDS) {
                    // A real UE only gets a PDU session it asked for: wait for its PDU SESSION ESTABLISHMENT
                    // REQUEST (triggered by the data call requested from the upper tester in the preamble),
                    // then send the PDU SESSION RESOURCE SETUP REQUEST carrying the acceptance for the UE
                    var O1_Type v_psi;
                    var O1_Type v_pti;

                    f_NGAP_gnb_UE_PDU_SessionEstablishmentRequest();
                    if (not f_get_pdu_session_establishment_request_ids(v_psi, v_pti)) {
                        log("*** " & __SCOPE__ & ": INCONC: No PDU SESSION ESTABLISHMENT REQUEST received from the UE. ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                    }
                    f_send_pdu_session_resource_setup_request_with_accept(v_psi, v_pti);
                } else {
                    var PDUSessionResourceSetupRequestTransfer v_pdu_session_resource_setup_request_transfer := valueof(
                    m_pDUSessionResourceSetupRequestTransfer(
                                                             m_pDUSessionResourceSetupRequestTransfer_mandatories(
@@ -90,14 +107,14 @@ module NGAP_TCFunctions {
                                                             ))));
                    log("v_pdu_session_resource_setup_request_transfer: ", v_pdu_session_resource_setup_request_transfer);
                    var octetstring v_os := bit2oct(
                                                encvalue(
                                                    fx_enc_PDUSessionResourceSetupRequestTransfer( // FIXME FSCOM Check why encvalue does not work
                                                                                                  v_pdu_session_resource_setup_request_transfer
                                                    ));
                    log("v_os: ", v_os);
                    var PDUSessionResourceSetupItemSUReq v_pdu_session_resource_setup_item_su_req := valueof(
                                                                                                             m_pDUSessionResourceSetupItemSUReq(
                                                                                                                                                -,
                                                                                                                                            m_s_NSSAI('00'O, '000000'O),
                                                                                                                                                m_s_NSSAI(PX_SST, PX_SD),
                                                                                                                                                v_os
                                                                                                             ));
                    log("v_pdu_session_resource_setup_item_su_req: ", v_pdu_session_resource_setup_item_su_req);
@@ -109,6 +126,8 @@ module NGAP_TCFunctions {
                                                                                       { v_pdu_session_resource_setup_item_su_req }
                                    )));

                }

                f_recv_NGAP_PDU(
                    mw_ngap_succMsg(
                      mw_n2_PDUSessionResourceSetupResponse(
@@ -117,15 +136,7 @@ module NGAP_TCFunctions {
                         {
                           (mw_pDUSessionResourceSetupItemSURes(
                               ?,//template (present) PDUSessionID p_pDUSessionID,
                               decmatch (
                                 mw_pDUSessionResourceSetupResponseTransfer(
                                   ?,//template (present) QosFlowPerTNLInformation p_dLQosFlowPerTNLInformation := ?,
                                   *,//template QosFlowPerTNLInformationList p_additionalDLQosFlowPerTNLInformation := *,
                                   *,//template SecurityResult p_securityResult := *,
                                   *,//template QosFlowListWithCause p_qosFlowFailedToSetupList := *,
                                   *//template PDUSessionResourceSetupResponseTransfer.iE_Extensions p_iE_Extensions := *
                                 )
                               ),// Decode&Match - In ASN1 it is OCTET STRING - PDUSessionResourceSetupResponseTransfer
                               ?,// Not decoded here: decmatch would decode this OCTET STRING as unaligned PER, while the gNB sends aligned PER
                               *//template PDUSessionResourceSetupItemSURes.iE_Extensions p_iE_Extensions := *
                             )
                           )
+3 −0
Changes for ttcn/LibNGAP/lib/LibNGAP_Pixits.ttcn: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -733,6 +733,9 @@ module LibNGAP_Pixits {
    /** @desc APN/DNN of the data call the real UE (AT commands) places when PICS_USE_AT_COMMANDS is true; see f_NGAP_gnb_UE_Register */
    modulepar charstring PX_UT_DATA_CALL_APN := "internet";

    /** @desc IPv4 address assigned to the real UE in the PDU SESSION ESTABLISHMENT ACCEPT; see f_encode_dl_nas_transport_pdu_session_establishment_accept */
    modulepar Oct4 PX_UT_PDU_ADDRESS_IPV4 := '0A2D0002'O; // 10.45.0.2

    /** @desc Time, in seconds, the upper tester waits for the real UE to be attached before it dials the data call; it must cover the registration procedure */
    modulepar float      PX_UT_DATA_CALL_ATTACH_TIMEOUT := 60.0;

+274 −44

File changed.

Preview size limit exceeded, changes collapsed.

Loading