Commit 70a44369 authored by berge's avatar berge
Browse files

Cleaned up BTP

parent 5c701ecc
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
        
        /**
         * @desc Brings the IUT into an initial state.
         * @return 
         */
        function f_prInitialState() runs on ItsNt {
            
@@ -33,7 +32,6 @@
        
        /**
         * @desc    Requests to bring the IUT in an initial state
         * @return 
         */
        function f_utInitializeIut() runs on ItsNt {
            
@@ -41,14 +39,14 @@
            tc_ac.start;
            alt {
                [] utPort.receive(UtBtpResult:true) {
                    setverdict (pass, "IUT initialized");
                    setverdict (pass, "*** f_utInitializeIut: PASS: IUT initialized ***");
                }
                [] utPort.receive {
                    setverdict (inconc, "IUT could not be initialized");
                    setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized ***");
                    stop;
                }
                [] tc_ac.timeout {
                    setverdict (inconc, "IUT could not be initialized in time");
                    setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized in time ***");
                    stop;
                }
            }
@@ -82,15 +80,15 @@
            tc_ac.start;
            alt {
                [] utPort.receive(UtBtpResult:true) {
                    setverdict (pass, "Event correctly indicated at application layer");
                    setverdict (pass, "*** f_utCheckEvent: PASS: Event correctly indicated at application layer ***");
                    v_ret := e_success;
                }
                [] utPort.receive {
                    setverdict (fail, "Event not correctly indicated at application layer");
                    setverdict (fail, "*** f_utCheckEvent: FAIL: Event not correctly indicated at application layer ***");
                    v_ret := e_error;
                }
                [] tc_ac.timeout {
                    setverdict (inconc, "Timeout while waiting for event check result");
                    setverdict (inconc, "*** f_utCheckEvent: INCONC: Timeout while waiting for event check result ***");
                    v_ret := e_timeout;
                }
            }
+79 −31
Original line number Diff line number Diff line
@@ -14,12 +14,20 @@ module LibItsBtp_Templates {
        
    group btpPrimitivesTemplates {

        /**
         * @desc    Send template for BTP packet (BtpPort Primitive)
         * @param   p_btpPkt BTP Packet to be sent
         */
        template (value) BtpReq m_geoNwReq(
            template (value) BtpPacket p_btpPkt
            ) := {
            msgOut := p_btpPkt
        }
        
        /**
         * @desc    Receive template for BTP packet (BtpPort Primitive)
         * @param   p_btpPkt BTP Packet to be received
         */
        template BtpInd mw_geoNwInd(
            template (present) BtpPacket p_btpPkt
            ) := {
@@ -67,43 +75,83 @@ module LibItsBtp_Templates {
    
    group btpPduTemplates {
        
        template(value) BtpPacket m_btpA (	template (value) BtpPortId 	p_DestPort,
        									template (value) BtpPortId 	p_SrcPort,
        /**
         * @desc    Send template for BTP-A packet
         * @param   p_destPort  Destination port
         * @param   p_srcPort   Source port
         * @param   p_payload   Payload
         */
        template (value) BtpPacket m_btpA (
            template (value) BtpPortId  p_destPort,
            template (value) BtpPortId  p_srcPort,
            template (value) BtpPayload p_payload
        )
         := {
			header := { btpAHeader := {	destinationPort := p_DestPort, 
			    						sourcePort := p_SrcPort}}, 
        ):= {
            header := { 
                btpAHeader := {
                    destinationPort := p_destPort, 
                    sourcePort := p_srcPort
                }
            }, 
            payload := p_payload
        }

        template(value) BtpPacket m_btpB (	template (value) BtpPortId 		p_DestPort,
        									template (value) BtpPortInfo 	p_DestPortInfo,
        /**
         * @desc    Send template for BTP-B packet
         * @param   p_destPort      Destination port
         * @param   p_destPortInfo  Destination port information
         * @param   p_payload       Payload
         */
        template( value) BtpPacket m_btpB (
            template (value) BtpPortId      p_destPort,
            template (value) BtpPortInfo    p_destPortInfo,
            template (value) BtpPayload     p_payload
        )
         := {
			header := { btpBHeader := {	destinationPort := 		p_DestPort, 
                						destinationPortInfo := 	p_DestPortInfo}}, 
        ) := {
            header := { 
                btpBHeader := {
                    destinationPort := p_destPort, 
                    destinationPortInfo := p_destPortInfo
                }
            }, 
            payload := p_payload
		}

        template(present) BtpPacket mw_btpA (	template (present) 	BtpPortId 	p_DestPort,
        										template (present) 	BtpPortId 	p_SrcPort,
        /**
         * @desc    Receive template for BTP-A packet
         * @param   p_destPort  Destination port
         * @param   p_srcPort   Source port
         * @param   p_payload   Payload
         */
        template BtpPacket mw_btpA (
            template (present) BtpPortId   p_destPort,
            template (present) BtpPortId   p_srcPort,
            template BtpPayload  p_payload
        )
         := {
			header := { btpAHeader := {	destinationPort := p_DestPort, 
			    						sourcePort := p_SrcPort}}, 
        ) := {
            header := { 
                btpAHeader := {
                    destinationPort := p_destPort, 
                    sourcePort := p_srcPort
                }
            }, 
            payload := p_payload
        }

        template(present) BtpPacket mw_btpB (	template (present) 	BtpPortId 	p_DestPort,
        										template (present) 	BtpPortInfo p_DestPortInfo,
        /**
         * @desc    Receive template for BTP-B packet
         * @param   p_destPort      Destination port 
         * @param   p_destPortInfo  Destination port information
         * @param   p_payload       Payload
         */
        template BtpPacket mw_btpB (	
            template (present) BtpPortId   p_destPort,
            template (present) BtpPortInfo p_destPortInfo,
            template BtpPayload  p_payload
        )
         := {
			header := { btpBHeader := {	destinationPort := 		p_DestPort, 
                						destinationPortInfo := 	p_DestPortInfo}}, 
        ) := {
            header := { 
                btpBHeader := {
                    destinationPort := p_destPort, 
                    destinationPortInfo := p_destPortInfo
                }
            }, 
            payload := p_payload
        }

+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ module LibItsCam_Templates {

        /**
         * @desc    Send template for CAM Message (CamPort Primitive)
         * @param   p_camMsg CAM Message to be sent
         * @param   p_camMsg CAM Message to be received
         */    
        template (value) CamReq m_camReq (
            in template (value) CamPdu p_camMsg