Commit 52a990bc authored by YannGarcia's avatar YannGarcia
Browse files

Add a test purpose for each class; Enhance Security test purpose

parent 2a797364
Loading
Loading
Loading
Loading
+159 −0
Original line number Diff line number Diff line
module LibItsMbr_Templates {

   // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    // LibHelpers
    import from LibHelpers_Functions all;

    // LibIts
    import from EtsiTs103759Data language "ASN.1:1997" all;
    
    group mbrPrimitives {

        /**
         * @desc    Receive template for EtsiTs103759Data Message (MbrPort Primitive)
         * @param   p_mbrMsg    Expected EtsiTs103759Data Message
         */
        template MbrInd mw_mbrInd (
                                   in template (present) EtsiTs103759Data p_mbrMsg
                                   ) := { 
            msgIn               := p_mbrMsg,
            recvTime            := ?,
            gnNextHeader        := *,
            gnHeaderType        := *,
            gnHeaderSubtype     := *,
            gnLifetime          := *,
            gnTrafficClass      := *,
            btpDestinationPort  := *,
            btpInfo             := *,
            ssp                 := *,
            its_aid             := *
        };
        
        /**
         * @desc    Receive template for EtsiTs103759Data Message (MbrPort Primitive)
         * @param   p_mbrMsg            Expected EtsiTs103759Data Message
         * @param   p_gnNextHeader      GN next header value
         * @param   p_gnHeaderType      GN header type value
         * @param   p_gnHeaderSubtype   GN header subtype value
         * @param   p_gnLifetime        GN packet lifetime value (ms)
         * @param   p_gnTrafficClass    GN traffic class value
         */
        template MbrInd mw_mbrIndWithGnParameters (
                                                   in template (present) EtsiTs103759Data p_mbrMsg,
                                                   in template UInt8 p_gnNextHeader := *,
                                                   in template UInt8 p_gnHeaderType := *,
                                                   in template UInt8 p_gnHeaderSubtype := *,
                                                   in template UInt32 p_gnLifetime := *,
                                                   in template UInt8 p_gnTrafficClass := *
                                                   ) modifies mw_mbrInd := { 
            gnNextHeader := p_gnNextHeader,
            gnHeaderType := p_gnHeaderType,
            gnHeaderSubtype := p_gnHeaderSubtype,
            gnLifetime := p_gnLifetime,
            gnTrafficClass := p_gnTrafficClass    
        };
        
        /**
         * @desc    Receive template for CA Message (DenmPort Primitive)
         * @param   p_caMsg     The expected CA Message
         * @param   p_ssp       SSP security parameter
         * @param   p_its_aid   ITS-AID value
         */
        template MbrInd mw_mbrIndWithSecurityParameters(
                                                        template (present) EtsiTs103759Data p_mbrMsg,
                                                        template Bit256 p_ssp := *,
                                                        template UInt32 p_its_aid := c_its_aid_EtsiTs103759Data
                                                        ) modifies mw_mbrInd := { 
            ssp             := p_ssp,
            its_aid         := p_its_aid
        };
        
        /**
         * @desc    Receive template for EtsiTs103759Data Message (MbrPort Primitive)
         * @param   p_mbrMsg                Expected EtsiTs103759Data Message
         * @param   p_btpDestinationPort    BTP destination port value
         * @param   p_btpInfo               BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
         */
        template MbrInd mw_mbrIndWithBtpParameters (
                                                    in template (present) EtsiTs103759Data p_mbrMsg,
                                                    in template UInt16 p_btpDestinationPort := *,
                                                    in template UInt16 p_btpInfo := *
                                                    ) modifies mw_mbrInd := { 
            btpDestinationPort := p_btpDestinationPort,
            btpInfo := p_btpInfo     
        };

        /**
         * @desc    Send template for EtsiTs103759Data Message (MbrPort Primitive)
         * @param   p_mbrMsg EtsiTs103759Data Message to be received
         */    
        template (value) MbrReq m_mbrReq (
                                          in template (value) EtsiTs103759Data p_mbrMsg
                                          ) := { 
            msgOut := p_mbrMsg 
        };

        group mbrUtPrimitives {

            /**
             * @desc Initializes the CAM IUT. 
             */
            template (value) UtMbrInitialize m_camInitialize := {
                hashedId8 := '0000000000000000'O
            }
            
        } // End of group mbrUtPrimitives
        
    } // End of group mbrPrimitives

    group etsiTs103759Data {

        template (value) EtsiTs103759Data m_etsiTs103759Data(
                                                             in UInt8 p_version,
                                                             in Time64 p_generationTime, 
                                                             in template (value) ThreeDLocation p_observationLocation, 
                                                             in template (value) AidSpecificReport p_report                
                                                             ) := {
            version             := p_version,
            generationTime      := p_generationTime, 
            observationLocation := p_observationLocation, 
            report              := p_report 
        } // End of template m_etsiTs103759Data

        template (present) EtsiTs103759Data mw_etsiTs103759Data(
                                                                template (present) UInt8 p_version := ?,
                                                                template (present) Time64 p_generationTime := ?, 
                                                                template (present) ThreeDLocation p_observationLocation := ?, 
                                                                template (present) AidSpecificReport p_report := ?                
                                                                ) := {
            version             := p_version,
            generationTime      := p_generationTime, 
            observationLocation := p_observationLocation, 
            report              := p_report 
        } // End of template mw_etsiTs103759Data

        template (value) MbSingleObservation
    } // End of group etsiTs103759Data

    group camObservation { // FIXME To be checked

        template (value) AidSpecificReport m_cam_specific_report(
                                                                 in template (value) SetMbObsCamBeacon p_content
                                                                 ) := {
            aid     := c-AsrCam,
            content := p_content
        } // End of template m_cam_specific_report

        template (present) AidSpecificReport mw_cam_specific_report(
                                                                    template (present) SetMbObsCamBeacon p_content := ?
                                                                    ) := {
            aid     := c-AsrCam,
            content := p_content
        } // End of template mw_cam_specific_report

    } // End of group camObservation

} // End of module LibItsMbr_Templates
Compare 02ebe0a8 to df1c3156
Original line number Diff line number Diff line
Subproject commit 02ebe0a872418e41b77da3cfde3da4a9e404a6b6
Subproject commit df1c3156b32fa9d1bf45cafe53e990a29bd66af9
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ module LibItsMbr_TestSystem language "TTCN-3:2010 Real Time and Performance Test
    import from LibCommon_DataStrings all;

    // LibIts
    import from MBR_PDU_Descriptions language "ASN.1:1997" all;
    import from EtsiTs103759Data language "ASN.1:1997" all;

    // LibItsCommon
    import from LibItsCommon_TestSystem all;
+0 −6
Original line number Diff line number Diff line
@@ -2,9 +2,3 @@
[2]	ETSI EN 302 665: "Intelligent Transport Systems (ITS); Communications Architecture".
[3]	ETSI TS 102 941: "Intelligent Transport Systems (ITS); Security; Trust and Privacy Management".
[4] ETSI TS 103 759: "Intelligent Transport Systems (ITS); Security; Misbehaviour Reporting service".


[4]	ISO/IEC 9646-1: "Information technology -- Open Systems Interconnection -- Conformance testing methodology and framework -- Part 1: General concepts".
[5]	ISO/IEC 9646-7: "Information technology -- Open Systems Interconnection -- Conformance testing methodology and framework -- Part 7: Implementation Conformance Statements".
[6]	ETSI ETS 300 406: "Methods for testing and Specification (MTS); Protocol and profile conformance testing specifications; Standardization methodology".
[7]	ETSI ES 203 119-4: "Methods for Testing and Specification (MTS); The Test Description Language (TDL); Part 4: Structured Test Objective Specification (Extension)".
 No newline at end of file
+11 −3
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ Package its_mbr_commons {
        ;
        constant:
        - PX_SUBJECT_PDU_INDEX      // Number of invalid messages observations
        - PX_IMPLAUSIBLE_POSITION_1 // Invalid position in CA message (e.g. wrong latitude)

        ;
        entities:
        - IUT           // Implementation Under Test
@@ -35,14 +37,20 @@ Package its_mbr_commons {
                        // A set of observations of class1 (Implausible values within the incoming message)
        - MBR_OBSERVATIONS_CLASS2
                        // A set of observations of class2 (Inconsistencies of the incoming message with previous messages of the same type emitted from the same station)
        - MBR_OBSERVATIONS_CLASS3
                        // A set of observations of class3 (Inconsistencies of the incoming message with the knowledge of the local environment of the ego vehicle)
        - MBR_OBSERVATIONS_CLASS4
                        // A set of observations of class4 (Inconsistencies of the incoming message with the on-board sensors’ perception)
        - MBR_OBSERVATIONS_CLASS5
                        // A set of observations of class5 (Inconsistencies of the incoming message with previous messages of other types from the same station or with messages (of the same type or not) emitted by other stations)
        - AID_MBR       // AID of MBR Service
        - CERT_IUT_A_AT // Default IUT AT certificate 
        - CERT_MA       // Defaut MA certificate
        - CERT_MA_HASHEDID8
                        // Hashed Id 8 of the CERT_MA
        - MBR_ENC_KEY   // TODO
        - PX_IMPLAUSIBLE_POSITION_1
                        // Invalid position in CA message (e.g. wrong latitude)
        - MBR_GEN_TIME  // The time the MBR messsage is generated
        - MBR_GEN_LOC   // The location of the OBU when the MBR messsage is generated
        ;
        events:
        - publish
Loading