Commit 05c27414 authored by garciay's avatar garciay
Browse files

Continue FNTP tests

parent 14cfbc22
Loading
Loading
Loading
Loading
+220 −8
Original line number Diff line number Diff line
/**
 *  @author     ETSI / STF455_EETS
 *  @author     ETSI / STF455
 *  @version    $URL$
 *              $Id$
 *  @desc       Access Technology Layer (ISO 21218) PICS
 */
module LibItsAls_Pics {
    

    group alsPics {
        
        /**
         * @desc PICS mnemonics for ISO 21218 "ITS - CALM - Access Technology Support"
         * @see  ETSI TS 102 760-1 v_stf455_v04
         */
        modulepar boolean PICS_AC1 := false;
        
        /**
         * @desc Is IUT supporting BC-VCI transmitter?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/4
         */
        modulepar boolean PICS_BCVC := false;
        
        /**
         * @desc Is IUT of CI access class CIAC-1 (no user authentiaction required, usage of CI is free of charge)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.6/1
         */
        modulepar boolean PICS_CIAC1 := false;
        
        /**
         * @desc Is IUT of CI access class CIAC-2 (access credentials required, usage of CI is subject of a service charge?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.6/2
         */
        modulepar boolean PICS_CIAC2 := false;

        /**
         * @desc Is IUT of CI access class CIAC-3 (access credentials required, usage of CI is free of charge)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.6/3
         */
        modulepar boolean PICS_CIAC3 := false;

        /**
         * @desc Is IUT of CI class CIC-il1 (non-deterministic ITS station-internal network interface)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/6
         */
        modulepar boolean PICS_CIC_il1 := false;

        /**
         * @desc Is IUT of CI class CIC-il2 (deterministic ITS station-internal network interface)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/7
         */
        modulepar boolean PICS_CIC_il2 := false;

        /**
         * @desc Is IUT of CI class CIC-l1 (multiple simultaneous peer stations transceiver)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/1
         */
        modulepar boolean PICS_CIC_l1 := false;

        /**
         * @desc Is IUT of CI class CIC-l2 (single peer station transceiver)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/2
         */
        modulepar boolean PICS_CIC_l2 := false;

        /**
         * @desc Is IUT of CI class CIC-l3 (groupcast transmitter only)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/3
         */
        modulepar boolean PICS_CIC_l3 := false;
        

        /**
         * @desc Is IUT of CI class CIC-l4 (broadcast receiver only)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/4
         */
        modulepar boolean PICS_CIC_l4 := false;

        /**
         * @desc Is IUT of CI class CIC-l5 (CEN / Japanese DSRC)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.5/5
         */
        modulepar boolean PICS_CIC_l5 := false;

        /**
         * @desc Is IUT supporting the connection procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/7
         */
        modulepar boolean PICS_CONN := false;

        /**
         * @desc Is IUT supporting the Cross-CI prioritization - interferer procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/10
         */
        modulepar boolean PICS_CRCIP_I := false;

        /**
         * @desc Is IUT supporting the Cross-CI prioritization - victim procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/9
         */
        modulepar boolean PICS_CRCIP_V := false;

        /**
         * @desc Is IUT supporting deletion of VCIs?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/18
         */
        modulepar boolean PICS_DELET := false;

        /**
         * @desc Is IUT supporting the disconnection procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/8
         */
        modulepar boolean PICS_DISCONN := false;

        /**
         * @desc Is IUT supporting dynamic registration using the standardized registration procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.1/1
         */
        modulepar boolean PICS_DYNREG := false;

        /**
         * @desc Is IUT supporting the inactivation procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/3
         */
        modulepar boolean PICS_INACT := false;

        /**
         * @desc Is IUT supporting the IN-UNITDATA-STATUS service?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.12/2
         */
        modulepar boolean PICS_INUDS := false;

        /**
         * @desc Is IUT supporting notification-only I-Parameters?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.24 any selected notify-only I-Parameter
         */
        modulepar boolean PICS_IPNO := false;

        /**
         * @desc Is IUT supporting read-only I-Parameters?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.21 and C.22 any selected read-only I-Parameter
         */
        modulepar boolean PICS_IPRO := false;

        /**
         * @desc Is IUT supporting read/write I-Parameters?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.19 and C.20 any selected read/write I-Parameter
         */
        modulepar boolean PICS_IPRW := false;

        /**
         * @desc Is IUT supporting write-only I-Parameters?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.23 any selected write-only I-Parameter
         */
        modulepar boolean PICS_IPWO := false;

        /**
         * @desc Is IUT useing 48 bit MAC addresses?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.4/1
         */
        modulepar boolean PICS_MAC48 := false;

        /**
         * @desc Is IUT supporting MC-VCI transmitter?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.8/2
         */
        modulepar boolean PICS_MCVCI := false;

        /**
         * @desc Is IUT supporting rejection of DL-UNITDATA.reqeusts with user priority smaller than given in parameter "MinimumUserPriority"?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/20
         */
        modulepar boolean PICS_REJECT := false;

        /**
         * @desc Is IUT supporting the resuming procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/6
         */
        modulepar boolean PICS_RES := false;

        /**
         * @desc Is IUT supporting the Regulatory Information Management procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/12
         */
        modulepar boolean PICS_RIM := false;

        /**
         * @desc Is IUT supporting SNAP?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.13/1
         */
        modulepar boolean PICS_SNAP := false;

        /**
         * @desc Is IUT supporting the suspension procedure?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.11/5
         */
        modulepar boolean PICS_SUSP := false;

        /**
         * @desc Is IUT supporting UC-VCI (transmitter and receiver)?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.8/3
         */
        modulepar boolean PICS_UCVCI := false;

        /**
         * @desc Is IUT supporting the UnitDataCmd command?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.15/12
         */
        modulepar boolean PICS_UDC := false;

        /**
         * @desc Is IUT supporting the WakeUp command?
         * @see  ETSI TS 102 760-1 v_stf455_v04 C.15/4
         */
        modulepar boolean PICS_WAKEUP := false;


    } // End of group alsPics
    
} // End of module LibItsAls_Pics
+109 −44
Original line number Diff line number Diff line
@@ -28,6 +28,13 @@ module LibItsFntp_Functions {
        type 
            EUI64, IN_SAPaddress, LLserviceAddr, Link_ID, AccessParameters 
    }; 
    import from CALMmsap language "ASN.1:1997" { 
        type 
            SimNLTcmd  
    }; 
    import from CITSapplReq language "ASN.1:1997" { 
        type ServiceRef 
    };
    import from CALMfntp language "ASN.1:1997" all; 
    import from LibItsMgt_Functions { 
        altstep 
@@ -43,7 +50,7 @@ module LibItsFntp_Functions {
        modulepar PICS_ITS_S_INW, PICS_ROLE_RH;
    };
    import from LibItsMgt_Templates { 
        template mw_mnRequestRequest 
        template mw_mnRequestRequest_setNotFNTP 
    };
    import from LibItsMgt_Functions { 
        function 
@@ -51,7 +58,9 @@ module LibItsFntp_Functions {
            f_getNextPduCounter 
    }; 
    import from LibItsCalm_Interface all; 
    import from LibItsCalm_Pixits all;
    import from LibItsCalm_Pixits {
        modulepar PX_USE_IICP_REMOTE_COMMAND  
    };
    
    group fntpConfigurationFunctions {
        
@@ -71,9 +80,12 @@ module LibItsFntp_Functions {
            // Map
            map(self:acPort, system:acPort);
            map(self:utPort, system:utPort);
            map(self:cfPort, system:cfPort);
            //map(self:cfPort, system:cfPort);
            map(self:fntpPort, system:fntpPort);
            
            vc_commandRef := 0;
            vc_pduCounter := 0;
            
            // Connect
            f_connect4SelfOrClientSync();
            
@@ -107,7 +119,7 @@ module LibItsFntp_Functions {
            // Map
            map(self:acPort, system:acPort);
            map(self:utPort, system:utPort);
            map(self:cfPort, system:cfPort);
            //map(self:cfPort, system:cfPort);
            map(self:fntpPort, system:fntpPort);
            
            // Connect
@@ -134,7 +146,7 @@ module LibItsFntp_Functions {
            // Unmap
            unmap(self:acPort, system:acPort);
            unmap(self:utPort, system:utPort);
            unmap(self:cfPort, system:cfPort);
            //unmap(self:cfPort, system:cfPort);
            unmap(self:fntpPort, system:fntpPort);
            
            // Disconnect
@@ -152,6 +164,7 @@ module LibItsFntp_Functions {
            // Unmap
            unmap(self:acPort, system:acPort);
            unmap(self:utPort, system:utPort);
            //unmap(self:cfPort, system:cfPort);
            unmap(self:fntpPort, system:fntpPort);
            
            // Disconnect
@@ -171,6 +184,7 @@ module LibItsFntp_Functions {
            
            // Set defaults
            activate(a_fntpDefault()); // Default for Fntp module
            // FIXME To be removed?
            activate(a_mgtMnSapPortDefault()); // Default for MGT module / MF-SAP port
            
        } // End of f_initialiseComponent
@@ -184,7 +198,7 @@ module LibItsFntp_Functions {
         */
        function f_initialState() runs on ItsCalm {
            
            f_utInitializeIut(m_fntpInitialize(PX_LOC_ITS_ACCESS_LAYER));
            f_utInitializeIut(m_fntpInitialize);
            f_sleepIgnoreDef(PX_WAIT_FOR_IUT_READY); // Wait until the IUT is in a stable situation (beaconing...)
        } // End of function f_initialState
        
@@ -205,7 +219,7 @@ module LibItsFntp_Functions {
            var template UtCommandConfirm v_commandConf;
            
            if (PX_USE_IICP_REMOTE_COMMAND == true) { 
                v_commandReq := m_fntpNfSapRemoteCommandRequest( 
                v_commandReq := m_fntpNfSapRemoteCommandRequest_simNutCmd( 
                    f_getNextPduCounter(), 
                    f_getNextCommandRef(), 
                    m_generateNfFntpPortCreationRequest(
@@ -237,23 +251,24 @@ module LibItsFntp_Functions {
                log("*** f_initializeFntpForwardingTable: INFO: portNumber value is: " & int2str(vc_portNumber.portLong) & " ***");
            }
            // And wait for a MN-SAP.MN-COMMAND/FWTupdate message sent by ITS management entity to update the forwarding table
            f_fntpAwaitFwtUpdate();
            
            f_fntpAwaitFwtUpdate(vc_portNumber);           
        } // End of function f_initializeFntpForwardingTable
        
        /**
         * @desc    Wait for MN-SAP.MN-REQUEST/FWTupdate message sent by IST management entity to update the forwarding table
         * @verdict Unchanged
         */
        function f_fntpAwaitFwtUpdate() runs on ItsCalm {
        function f_fntpAwaitFwtUpdate( 
			in template (present) PortNumber p_port 
		) runs on ItsCalm {
            var template (present) UtRequestRequest p_requestReq;
            
            if (PX_USE_IICP_REMOTE_COMMAND == true) { 
                p_requestReq := mw_fntpMnSapRemoteCommand( 
                    mw_awaitFwtUpdate(vc_portNumber).utFntpRequestRequest.mnRequestRequest 
                    mw_awaitFwtUpdate(p_port).utFntpRequestRequest.mnRequestRequest 
                ); 
            } else { 
                p_requestReq := mw_awaitFwtUpdate(vc_portNumber) 
                p_requestReq := mw_awaitFwtUpdate(p_port) 
            } 
            f_utAwaitRequestRequest(p_requestReq); 
        } // End of function f_fntpAwaitFwtUpdate()
@@ -264,7 +279,7 @@ module LibItsFntp_Functions {
            var template (value) UtCommandRequest p_commandReq;
            
            if (PX_USE_IICP_REMOTE_COMMAND == true) { 
                p_commandReq := m_fntpNfSapRemoteCommandRequest( 
                p_commandReq := m_fntpNfSapRemoteCommandRequest_simNutCmd( 
                    f_getNextPduCounter(), 
                    f_getNextCommandRef(), 
                    p_generateNfFntpCommandRequest.utFntpCommandRequest.nfSapPrimitives 
@@ -285,8 +300,19 @@ module LibItsFntp_Functions {
        function f_unInitializeFntpForwardingTable() runs on ItsCalm {
            // check c_portDyn
            // Send for FTN-SOCKET.request & Wait for FTN-SOCKET.confirm
            var template (value) UtCommandRequest p_commandReq;
            
            if (PX_USE_IICP_REMOTE_COMMAND == true) { 
                p_commandReq := m_fntpNfSapRemoteCommandRequest_simNutCmd( 
                    f_getNextPduCounter(), 
                    f_getNextCommandRef(), 
                   m_generateNfFntpPortDeletionRequest(f_getIutServiceRef(), vc_portNumber).utFntpCommandRequest.nfSapPrimitives 
                );
            } else {
                p_commandReq := m_generateNfFntpPortDeletionRequest(f_getIutServiceRef(), vc_portNumber);
            }
            f_utCommandRequestConfirm(
                m_generateNfFntpPortDeletionRequest(f_getIutServiceRef(), vc_portNumber),
                p_commandReq,
                mw_fntpPortConfirm(f_getIutServiceRef(), ?),
                false,
                vc_utCommandConf);
@@ -296,6 +322,35 @@ module LibItsFntp_Functions {
         * @desc Trigger a basic FNTPNPDU to create an entry in forwarding table for a known peer station 
         */
        function f_setupKnownPeerStation() runs on ItsCalm {             
            if (PX_USE_IICP_REMOTE_COMMAND == true) { 
                var octetstring v_inData := bit2oct( 
                    encvalue( 
                        m_fntpBasicNpdu( 
                            f_getIutRemotePortNumberValue(), 
                            vc_portNumber  
                        ) 
                    ) 
                ); 
                var template (value) SimNLTcmd v_simNltCmd := { //INsapPrimitivesUp 
                    spRef := 0, 
                    servPrimitive := {
                        IN_UNITDATA_indication := m_inUnitDataInd( 
                            m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), 
                            m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), 
                            v_inData 
                        ) 
                    }
                }; 
                var template (value) UtCommandRequest v_commandReq := m_fntpNfSapRemoteCommandRequest_simNltCmd( 
                    f_getNextPduCounter(), 
                    f_getNextCommandRef(), 
                    v_simNltCmd
                ); 
                f_utCommandRequestWithoutConfirm(v_commandReq);
	            // And wait for a MN-SAP.MN-COMMAND/FWTupdate message sent by ITS management entity to update the forwarding table
	            f_fntpAwaitFwtUpdate(f_getIutRemotePortNumberValue());
            } else {
                // FIXME How to manage creation of VCI ?
                f_acGenerateFntpNpdu( 
                    f_getIutRemotePortNumberValue(), 
                    vc_portNumber, 
@@ -303,6 +358,9 @@ module LibItsFntp_Functions {
                    m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), 
                    f_getIutShopValue() 
                );
            }
            

            // TODO Do we ignore management and NF-COMM.indication messages?
        } // End of function f_setupKnownPeerStation
        
@@ -360,8 +418,7 @@ module LibItsFntp_Functions {
                        encvalue( 
                            m_fntpBasicNpdu( 
                                p_sourcePort, 
                                p_destinationPort, 
                                p_hops 
                                p_destinationPort 
                            ) 
                        ) 
                    ) 
@@ -429,7 +486,7 @@ module LibItsFntp_Functions {
                    ) 
                ) 
            ); 
        } // End of function f_acGenerateFntpNPDU_With_Bit5
        } // End of function f_acGenerateFntpNpduInvalidBitSet
        
        /**
         * @desc    Triggers test adapter to send FNTP NDPU
@@ -621,14 +678,15 @@ module LibItsFntp_Functions {
            var bitstring v_data;
            var integer v_result;
            
//            log("*** f_oct2npdu: INFO: pdu: " & oct2str(p_data) & " ***");
            v_data := oct2bit(p_data);
            v_result := decvalue(v_data, p_decoded);
            if (v_result == 1) {
                f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); 
                log("*** f_oct2npdu: FAIL: 'decvalue' operation failed ***");
            } else if (v_result == 2) {
                f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); 
            } else if (v_result == 2) {
                log("*** f_oct2npdu: FAIL: 'decvalue' operation failed, not enougth bits ***");
                f_selfOrClientSyncAndVerdictTestBody(p_syncPoint, e_error); 
            }
            log("*** f_oct2npdu: INFO: Decoded message done ***");
        } // End of function f_oct2npdu
@@ -861,7 +919,7 @@ module LibItsFntp_Functions {
         * @see     PX_SERVICE_REF
         * @verdict Unchanged
         */
        function f_getIutServiceRef() return integer {
        function f_getIutServiceRef() return ServiceRef {
            return PX_SERVICE_REF;
        }
        
@@ -941,16 +999,6 @@ module LibItsFntp_Functions {
         * @desc The base default.
         */
        altstep a_fntpDefault() runs on ItsCalm {
            // FIXME Check why TTWB detect an error here?
//            [] fntpPort.receive(mw_fntpInSapPrimitiveReq(mw_inUnitDataReq_any)) {
//                log("*** a_fntpDefault: INFO: IN-UNITDATA.request received in default ***");
//                repeat;
//            }
// FIXME Add support of response to NF-FNTP-PORT.confirm & NF-FNTP-COMM.confirm
            [] fntpPort.receive {
                log("*** a_fntpDefault: INFO: Unkown FNTP NDPU received in default ***");
                repeat;
            }
            [] tc_wait.timeout {
                log("*** a_fntpDefault: ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
@@ -973,6 +1021,23 @@ module LibItsFntp_Functions {
            }
        } // End of altstep a_fntpDefault()
        
        /**
         * @desc The base default.
         */
        altstep a_fntpUnsollictedMessages() runs on ItsCalm {
            // FIXME Check why TTWB detect an error here?
//            [] fntpPort.receive(mw_fntpInSapPrimitiveReq(mw_inUnitDataReq_any)) {
//                log("*** a_fntpDefault: INFO: IN-UNITDATA.request received in default ***");
//            }
// FIXME Add support of response to NF-FNTP-PORT.confirm & NF-FNTP-COMM.confirm
			[] fntpPort.receive(mw_fntpInd(?)) {
                log("*** a_fntpUnsollictedMessages: INFO: Unkown FNTP NDPU received in default ***");
			}
			[] fntpPort.receive {
                log("*** a_fntpUnsollictedMessages: INFO: Unkown message received in default ***");				
            }
        } // End of altstep a_fntpUnsollictedMessages()
        
        /**
         * @desc Default handling cf01 de-initialisation.
         */
+66 −66
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ module LibItsFntp_Pics {
         * @desc Does the architecture implement ITS station-internal network?
         * @see  ETSI TS 102 985-1 v0.0.0 B.1/1 & B.1/2
         */
        modulepar boolean PICS_ITS_S_INW := false;
        modulepar boolean PICS_ITS_S_INW := true;
        
        /**
         * @desc Is IUT an host only?
@@ -42,13 +42,13 @@ module LibItsFntp_Pics {
         * @desc Is IUT support extended architecture?
         * @see  ETSI TS 102 868-1 v1.1.1 B.3/2
         */
        modulepar boolean PICS_EXT := false;
        modulepar boolean PICS_EXT := true;
        
        /**
         * @desc Is IUT support N-hop broadcast?
         * @see  ETSI TS 102 868-1 v1.1.1 B.4/1
         */
        modulepar boolean PICS_NHOPBC := false;
        modulepar boolean PICS_NHOPBC := true;
        
        /**
         * @desc Is access parameters settings supported?
+11 −14
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@ module LibItsFntp_Pixits {
    import from CALMlegacySupport language "ASN.1:1997" {
        type FNTPlpp
    };
	import from CITSapplReq language "ASN.1:1997" { 
		type ServiceRef 
	};
    
    /**
     * @desc Service reference value used bu NF-FNTP-PORT.request SAP primitive
@@ -43,19 +46,13 @@ module LibItsFntp_Pixits {
         * @desc Defines a number uniquely identifying the endpoint at this host in an implementation specific way
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar integer PX_SERVICE_REF := 0;
        
        /**
         * @desc Defines the value to set to fill field for NFsapPrimitivesUp primitive
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar Bit6 PX_NF_SAP_UP_FILL_FIELD_VALUE := '000000'B;
        
        /**
         * @desc Defines the value to set to fill field for NFsapPrimitivesDown primitive
         * @see ISO 29281-2 - Clause 8.2.1 Link Identifier
         */
        modulepar Bit7 PX_NF_SAP_DOWN_FILL_FIELD_VALUE := '0000000'B;
        modulepar ServiceRef PX_SERVICE_REF := {
			itsaid:= { 
				content := 8 
			},
			instance := 0, // Allows for 256 instances of this app
			flowNo := 0
		};
        
        /**
         * @desc ITS-SP payload
@@ -269,7 +266,7 @@ module LibItsFntp_Pixits {
        /**
         * @desc Indicate a second destination port number
         */
        modulepar PortNumber PX_SECOND_REMOTE_PORT_NUMBER := { portLong := 5556 } ;
        modulepar PortNumber PX_SECOND_REMOTE_PORT_NUMBER := { portLong := 5557 } ;
        
        /**
         * @desc Indicate an unknown destination port number
+238 −170

File changed.

Preview size limit exceeded, changes collapsed.

Loading