Commit b0060164 authored by Iztok Juvancic's avatar Iztok Juvancic
Browse files

adapted tcfunctions

parent 68cf3a70
Loading
Loading
Loading
Loading
+49 −42
Original line number Diff line number Diff line
@@ -1250,11 +1250,12 @@ module NG_NAS_TCFunctions {
                        {'1'B,'001'B},//in template (value) RegistrationType p_RegistrationType,
                        '111'B,//in template (value) NAS_KsiValue p_KeySetId,
                        '0'B,//in template (value) B1_Type p_Tsc,
                        m_NG_MobileIdentitySUCI(PX_SUPI_FORMAT,PX_SUPI_DIGITS)//in template (value) NG_MobileIdentity p_MobileId,  // 24.501 cl. 9.11.3.4
                        m_NG_MobileIdentitySUCI(PX_SUPI_FORMAT,PX_SUPI_DIGITS),//in template (value) NG_MobileIdentity p_MobileId,  // 24.501 cl. 9.11.3.4
                        
                        /* in template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,
                        in template (omit) NG_GMM_Cap p_GMM_Cap := omit,
                        in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                        -,/* in template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,*/
                        -,/*in template (omit) NG_GMM_Cap p_GMM_Cap := omit,*/
                        m_ng_ue_security_capability
                        /*in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                        in template (omit) NSSAI p_ReqNSSAI := omit,
                        in template (omit) NG_TrackingAreaId p_TAI := omit,
                        in template (omit) UE_NetworkCap p_UE_NetworkCap := omit,
@@ -1294,7 +1295,7 @@ module NG_NAS_TCFunctions {
                    )

                vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasUl_Msg ));
                var bitstring s := encvalue( vt_NgNasUl_Msg );
                /*var bitstring s := encvalue( vt_NgNasUl_Msg );
                //int i := decvalue(encvalue( vt_NgNasUl_Msg),vt_NgNasUl_Msg);
                log(vt_NgNasUl_Msg);
                log(vc_sendNAS_PDU);
@@ -1302,7 +1303,7 @@ module NG_NAS_TCFunctions {
                var integer i;
                i := decvalue(s,rec);
                log(i);
                log(rec);
                log(rec);*/

                f_send_NGAP_PDU(
                    m_ngap_initMsg(
@@ -1351,42 +1352,42 @@ module NG_NAS_TCFunctions {
                }
                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());

                log(vc_recvNGAP_PDU);
                f_NASPDU_Get(vc_recvNGAP_PDU);
                s := oct2bit(vc_recvNAS_PDU);
                log(s);
                var NG_NAS_DL_Message_Type recdl;
                var integer ir;
                ir := decvalue(s,recdl);
                log(ir);
                log(recdl);

                 vt_NgNasDl_Msg := 
                    m_NG_REGISTRATION_REJECT(
                                                cs_GMM_GSM_Cause(omit,
                                                  '00001101'B/*;tsc_Cause_Roaming_NotAllowed*/)
                                                /*in template (omit) GPRS_Timer2 p_T3346 := omit,
                                                in template (omit) GPRS_Timer2 p_T3502 := omit,
                                                in template (omit) EAP_Message p_EAP := omit,
                                                in template (omit) RejectedNSSAI p_RejectedNSSAI := omit,
                                                in template (omit) CAGInfoList p_CAGInfoList := omit,
                                                in template (omit) ExtdRejectedNSSAI p_ExtdRejectedNSSAI := omit,
                                                in template (omit) RegistrationWaitRange p_DisasterReturnWaitRange := omit,
                                                in template (omit) ExtdCAGInfoList p_ExtdCAGInfoList := omit,
                                                in template (omit) GPRS_Timer3 p_LowerBoundTimerValue := omit,
                                                in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_Roaming := omit,
                                                in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := omit
                                        */);
                 vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasDl_Msg ));
                s := encvalue( vt_NgNasDl_Msg );
                //int i := decvalue(encvalue( vt_NgNasUl_Msg),vt_NgNasUl_Msg);
                log(vt_NgNasDl_Msg);
                log(vc_sendNAS_PDU);
                var NG_NAS_DL_Message_Type recdl1;
                
                i := decvalue(s,recdl1);
                log(i);
                log(recdl1);
                // log(vc_recvNGAP_PDU);
                // f_NASPDU_Get(vc_recvNGAP_PDU);
                // s := oct2bit(vc_recvNAS_PDU);
                // log(s);
                // var NG_NAS_DL_Message_Type recdl;
                // var integer ir;
                // ir := decvalue(s,recdl);
                // log(ir);
                // log(recdl);

                //  vt_NgNasDl_Msg := 
                //     m_NG_REGISTRATION_REJECT(
                //                                 cs_GMM_GSM_Cause(omit,
                //                                   '00001101'B/*;tsc_Cause_Roaming_NotAllowed*/)
                //                                 /*in template (omit) GPRS_Timer2 p_T3346 := omit,
                //                                 in template (omit) GPRS_Timer2 p_T3502 := omit,
                //                                 in template (omit) EAP_Message p_EAP := omit,
                //                                 in template (omit) RejectedNSSAI p_RejectedNSSAI := omit,
                //                                 in template (omit) CAGInfoList p_CAGInfoList := omit,
                //                                 in template (omit) ExtdRejectedNSSAI p_ExtdRejectedNSSAI := omit,
                //                                 in template (omit) RegistrationWaitRange p_DisasterReturnWaitRange := omit,
                //                                 in template (omit) ExtdCAGInfoList p_ExtdCAGInfoList := omit,
                //                                 in template (omit) GPRS_Timer3 p_LowerBoundTimerValue := omit,
                //                                 in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_Roaming := omit,
                //                                 in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := omit
                //                         */);
                //  vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasDl_Msg ));
                // s := encvalue( vt_NgNasDl_Msg );
                // //int i := decvalue(encvalue( vt_NgNasUl_Msg),vt_NgNasUl_Msg);
                // log(vt_NgNasDl_Msg);
                // log(vc_sendNAS_PDU);
                // var NG_NAS_DL_Message_Type recdl1;
                
                // i := decvalue(s,recdl1);
                // log(i);
                // log(recdl1);


                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
@@ -1407,6 +1408,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

@@ -1420,7 +1422,7 @@ module NG_NAS_TCFunctions {
                            
                            omit, // in template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,
                            omit, // in template (omit) NG_GMM_Cap p_GMM_Cap := omit,
                            omit //in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                            m_ng_ue_security_capability //in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                            //in template (omit) NSSAI p_ReqNSSAI := omit,
                            /*in template (omit) NG_TrackingAreaId p_TAI := omit,
                            in template (omit) UE_NetworkCap p_UE_NetworkCap := omit,
@@ -1528,6 +1530,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

@@ -1593,6 +1596,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

@@ -1662,6 +1666,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                //USER REGISTRATION
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");
@@ -1720,6 +1725,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

@@ -1808,6 +1814,7 @@ module NG_NAS_TCFunctions {

                // Preamble
                f_NGAP_gnb_init2();
                f_send_NGSetupRequest_await_NGSetupRespone();
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");