Commit f52dd161 authored by Yann Garcia's avatar Yann Garcia
Browse files

Continue RLT implementation

parent 10e146e9
Loading
Loading
Loading
Loading
+21 −2
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ module LibItsMapemSpatem_Functions {
    // LibIts
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from ITS_Container language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    
    
    // LibItsCommon
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_TypesAndValues all;
@@ -26,6 +27,9 @@ module LibItsMapemSpatem_Functions {
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Pixits all;
    import from LibItsCommon_Pixits all;
    
    
    // LibItsSecurity
    import from LibItsSecurity_Functions all;
    
    // LibItsMapemSpatem
    // LibItsMapemSpatem
    import from LibItsMapemSpatem_TestSystem all;
    import from LibItsMapemSpatem_TestSystem all;
    import from LibItsMapemSpatem_TypesAndValues all;
    import from LibItsMapemSpatem_TypesAndValues all;
@@ -274,10 +278,25 @@ module LibItsMapemSpatem_Functions {
         * @desc Brings the IUT into an initial state.
         * @desc Brings the IUT into an initial state.
         * @return FncRetCode 
         * @return FncRetCode 
         */
         */
        function f_prInitialState() runs on ItsMapemSpatem return FncRetCode {
        function f_prInitialState(
                                  in charstring p_certificate_id := ""
                                  ) runs on ItsMapemSpatem return FncRetCode {
            var FncRetCode v_ret := e_success;
            var FncRetCode v_ret := e_success;
            
            
            // Initialize IUT with given certificate
            if (p_certificate_id != "") { // Initialize IUT with given certificate
                var HashedId8 v_hashedId8 := '0000000000000000'O;
                
                fx_readCertificateDigest("CERT_SRM_SSP_NONE", v_hashedId8);
                if ('0000000000000000'O ==  v_hashedId8) {
                    // Certificate not found
                    log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
                    return e_timeout;
                }
                f_utInitializeIut(m_mapemSpatemInitialize(v_hashedId8));
            } else {
                f_utInitializeIut(m_mapemSpatemInitialize);
                f_utInitializeIut(m_mapemSpatemInitialize);
            }
            f_prDefault();
            f_prDefault();
            return v_ret;
            return v_ret;
        }
        }
+10 −4
Original line number Original line Diff line number Diff line
@@ -48,20 +48,26 @@ module LibItsMapemSpatem_Pics {
     * @desc Support for MAPEM reception
     * @desc Support for MAPEM reception
     * @see  TODO
     * @see  TODO
     */
     */
    modulepar boolean PICS_MAPEM_HAS_LANE_WIDTH := false;
    modulepar boolean PICS_MAPEM_TRANSMISSION_RATE := false;
    
    
    /**
    /**
     * @desc Support for MAPEM reception
     * @desc Support for MAPEM pedestrians manoeuvres
     * @see  TODO
     * @see  TODO
     */
     */
    modulepar boolean PICS_MAPEM_TRANSMISSION_RATE := false;
    modulepar boolean PICS_PEDESTRIAN_MANOEUVRES := false;
    
    
    /**
    /**
     * @desc Support for MAPEM reception
     * @desc Support for MAPEM cars manoeuvres
     * @see  TODO
     * @see  TODO
     */
     */
    modulepar boolean PICS_SPECIALIZED_CARS_MANOEUVRES := false;
    modulepar boolean PICS_SPECIALIZED_CARS_MANOEUVRES := false;
    
    
    /**
     * @desc Support for MAPEM width attribut
     * @see  TODO
     */
    modulepar boolean PICS_MAPEM_HAS_LANE_WIDTH := false;
    
    /**
    /**
     * @desc Support for SPATEM generation
     * @desc Support for SPATEM generation
     * @see  ETSI TS 103 191-1 Table A.2
     * @see  ETSI TS 103 191-1 Table A.2
+29 −26
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ module LibItsMapemSpatem_Templates {
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    import from DSRC language "ASN.1:1997" all;
    import from DSRC_REGION_noCircular language "ASN.1:1997" all;
    import from DSRC_REGION_noCircular language "ASN.1:1997" all;
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    
    
    // LibItsCommon
    // LibItsCommon
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Functions all;
@@ -111,8 +112,8 @@ module LibItsMapemSpatem_Templates {
         */
         */
        template (present) MapemInd mw_mapemIndWithSecurityParameters(
        template (present) MapemInd mw_mapemIndWithSecurityParameters(
                                                                      template (present) MAPEM p_mapemMsg,
                                                                      template (present) MAPEM p_mapemMsg,
                                                                      template Bit256 p_ssp := *,
                                                                      template (present) Bit24 p_ssp := ?,
                                                                      template UInt32 p_its_aid := *
                                                                      template (present) UInt32 p_its_aid := ?
        ) modifies mw_mapemInd := { 
        ) modifies mw_mapemInd := { 
            ssp     := p_ssp,
            ssp     := p_ssp,
            its_aid := p_its_aid
            its_aid := p_its_aid
@@ -194,8 +195,8 @@ module LibItsMapemSpatem_Templates {
         */
         */
        template (present) SpatemInd mw_spatemIndWithSecurityParameters(
        template (present) SpatemInd mw_spatemIndWithSecurityParameters(
                                                                        template (present) SPATEM p_spatemMsg,
                                                                        template (present) SPATEM p_spatemMsg,
                                                                        template Bit256 p_ssp := *,
                                                                        template (present) Bit24 p_ssp := ?,
                                                                        template UInt32 p_its_aid := *
                                                                        template (present) UInt32 p_its_aid := ?
        ) modifies mw_spatemInd := { 
        ) modifies mw_spatemInd := { 
            ssp     := p_ssp,
            ssp     := p_ssp,
            its_aid := p_its_aid
            its_aid := p_its_aid
@@ -209,8 +210,10 @@ module LibItsMapemSpatem_Templates {
         * @desc    Send template for Upper Tester event initialization
         * @desc    Send template for Upper Tester event initialization
         * @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
         * @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
        */
        */
        template (value) UtMapemSpatemInitialize m_mapemSpatemInitialize := {
        template (value) UtMapemSpatemInitialize m_mapemSpatemInitialize(
            hashedId8 := '0000000000000000'O
                                                                         in HashedId8 p_hashedId8 := '0000000000000000'O
                                                                         ) := {
            hashedId8 := p_hashedId8
        }
        }


        /**
        /**
@@ -448,7 +451,7 @@ module LibItsMapemSpatem_Templates {
                    ingressApproach := p_ingressApproach,   // inbound Approach IDs to which this lane belongs
                    ingressApproach := p_ingressApproach,   // inbound Approach IDs to which this lane belongs
                    egressApproach  := p_egressApproach,    // outbound Approach IDs to which this lane belongs
                    egressApproach  := p_egressApproach,    // outbound Approach IDs to which this lane belongs
                    laneAttributes  := p_laneAttributes,    // All Attribute information about the basic selected lane type
                    laneAttributes  := p_laneAttributes,    // All Attribute information about the basic selected lane type
                    maneuvers       := p_allowedManeuvers,  // the permitted maneuvers for this lane
                    maneuvers       := omit,                // the permitted maneuvers for this lane
                    nodeList        := p_nodeListXY,        // Lane spatial path information as well as various Attribute information along the node path  
                    nodeList        := p_nodeListXY,        // Lane spatial path information as well as various Attribute information along the node path  
                                                            // Attributes found here are more general and may come and go over the length of the lane.
                                                            // Attributes found here are more general and may come and go over the length of the lane.
                    connectsTo      := p_connectsToList,    // a list of other lanes and their signal group IDs each connecting lane and its signal group ID is given, therefore this element provides the information formerly in "signalGroups" in prior editions.
                    connectsTo      := p_connectsToList,    // a list of other lanes and their signal group IDs each connecting lane and its signal group ID is given, therefore this element provides the information formerly in "signalGroups" in prior editions.
@@ -492,11 +495,11 @@ module LibItsMapemSpatem_Templates {
                template (present) MapData mw_defaultMapem := {
                template (present) MapData mw_defaultMapem := {
                    timeStamp         := *,
                    timeStamp         := *,
                    msgIssueRevision  := ?,
                    msgIssueRevision  := ?,
                    layerType         := *,
                    layerType         := omit,
                    layerID           := *,
                    layerID           := omit,
                    intersections     := *,
                    intersections     := *,
                    roadSegments      := ?,
                    roadSegments      := omit,
                    dataParameters    := *,
                    dataParameters    := omit,
                    restrictionList   := *,
                    restrictionList   := *,
                    regional          := *
                    regional          := *
                }
                }
@@ -522,18 +525,6 @@ module LibItsMapemSpatem_Templates {
                    id      := p_intersectionID     // a unique mapping to the intersection in question within the above region of use
                    id      := p_intersectionID     // a unique mapping to the intersection in question within the above region of use
                }
                }
                
                
                /**
                 * @desc    Receive template for MAPEM Message with no LayerType
                 */
                template (present) MapData mw_mapemLayerType(
                                                             template (present) IntersectionGeometryList p_intersections := ?,
                                                             template (present) RoadSegmentList p_roadSegments := ?,
                                                             template (present) LayerID p_layerID := ?
                ) modifies mw_mapem := {
                    layerType         := ?,
                    layerID           := p_layerID
                }
                
                template (present) IntersectionGeometry mw_intersectionGeometry(
                template (present) IntersectionGeometry mw_intersectionGeometry(
                                                                                template (present) IntersectionReferenceID p_id := ?,
                                                                                template (present) IntersectionReferenceID p_id := ?,
                                                                                template (present) MsgCount p_revision := ?,
                                                                                template (present) MsgCount p_revision := ?,
@@ -547,7 +538,7 @@ module LibItsMapemSpatem_Templates {
                    laneWidth           := *,                           // Reference width used by all subsequent lanes unless a new width is given
                    laneWidth           := *,                           // Reference width used by all subsequent lanes unless a new width is given
                    speedLimits         := *,
                    speedLimits         := *,
                    laneSet             := p_laneList,                  // Data about one or more lanes (all lane data is found here)
                    laneSet             := p_laneList,                  // Data about one or more lanes (all lane data is found here)
                    preemptPriorityData := *,                           // data about one or more regional preempt or priority zones 
                    preemptPriorityData := omit,                        // data about one or more regional preempt or priority zones 
                    regional            := *
                    regional            := *
                }
                }
                
                
@@ -590,13 +581,25 @@ module LibItsMapemSpatem_Templates {
                    ingressApproach := p_ingressApproach,
                    ingressApproach := p_ingressApproach,
                    egressApproach  := p_egressApproach,
                    egressApproach  := p_egressApproach,
                    laneAttributes  := p_laneAttributes, 
                    laneAttributes  := p_laneAttributes, 
                    maneuvers       := *,
                    maneuvers       := omit,
                    nodeList        := ?,
                    nodeList        := ?,
                    connectsTo      := p_connectsTo, 
                    connectsTo      := p_connectsTo, 
                    overlays        := *, 
                    overlays        := omit, 
                    regional        := *
                    regional        := *
                }
                }
                
                
                /**
                 * @desc    Receive template for MAPEM Message with no LayerType
                 */
                template (present) MapData mw_mapemLayerType(
                                                             template (present) IntersectionGeometryList p_intersections := ?,
                                                             template (present) RoadSegmentList p_roadSegments := ?,
                                                             template (present) LayerID p_layerID := ?
                ) modifies mw_mapem := {
                    layerType         := omit,
                    layerID           := p_layerID
                }
                
            } // End of group mapemTemplatesRecv 
            } // End of group mapemTemplatesRecv 
            
            
            template (present) NodeXY mw_nodeXY(
            template (present) NodeXY mw_nodeXY(
+2 −2
Original line number Original line Diff line number Diff line
@@ -111,7 +111,7 @@ module LibItsMapemSpatem_TestSystem {
            UInt8       gnTrafficClass optional,
            UInt8       gnTrafficClass optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpInfo optional,
            UInt16      btpInfo optional,
            Bit256      ssp optional,
            Bit24       ssp optional,
            UInt32      its_aid optional
            UInt32      its_aid optional
        }
        }
        with {
        with {
@@ -127,7 +127,7 @@ module LibItsMapemSpatem_TestSystem {
            UInt8       gnTrafficClass optional,
            UInt8       gnTrafficClass optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpInfo optional,
            UInt16      btpInfo optional,
            Bit256      ssp optional,
            Bit24       ssp optional,
            UInt32      its_aid optional
            UInt32      its_aid optional
        }
        }
        with {
        with {
+21 −2
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@ module LibItsRtcmem_Functions {
    // LibIts
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from ITS_Container language "ASN.1:1997" all;
    import from RTCMEM_PDU_Descriptions language "ASN.1:1997" all;
    import from RTCMEM_PDU_Descriptions language "ASN.1:1997" all;
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    
    
    // LibItsCommon
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_TypesAndValues all;
@@ -15,6 +16,9 @@ module LibItsRtcmem_Functions {
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Pixits all;
    import from LibItsCommon_Pixits all;
    
    
    // LibItsSecurity
    import from LibItsSecurity_Functions all;
    
    // LibItsRtcmem
    // LibItsRtcmem
    import from LibItsRtcmem_TestSystem all;
    import from LibItsRtcmem_TestSystem all;
    import from LibItsRtcmem_TypesAndValues all;
    import from LibItsRtcmem_TypesAndValues all;
@@ -317,10 +321,25 @@ module LibItsRtcmem_Functions {
         * @desc Brings the IUT into an initial state.
         * @desc Brings the IUT into an initial state.
         * @return FncRetCode 
         * @return FncRetCode 
         */
         */
        function f_prInitialState() runs on ItsRtcmem return FncRetCode {
        function f_prInitialState(
                                  in charstring p_certificate_id := ""
                                  ) runs on ItsRtcmem return FncRetCode {
            var FncRetCode v_ret := e_success;
            var FncRetCode v_ret := e_success;
            
            
            // Initialize IUT with given certificate
            if (p_certificate_id != "") { // Initialize IUT with given certificate
                var HashedId8 v_hashedId8 := '0000000000000000'O;
                
                fx_readCertificateDigest("CERT_SRM_SSP_NONE", v_hashedId8);
                if ('0000000000000000'O ==  v_hashedId8) {
                    // Certificate not found
                    log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
                    return e_timeout;
                }
                f_utInitializeIut(m_rtcmemInitialize(v_hashedId8));
            } else {
                f_utInitializeIut(m_rtcmemInitialize);
                f_utInitializeIut(m_rtcmemInitialize);
            }
            f_prDefault();
            f_prDefault();
            return v_ret;
            return v_ret;
        }
        }
Loading