Commit 3d752de8 authored by garciay's avatar garciay
Browse files

Simplify Payload for GeoNetworking & BTP

==> Check TODO in Security ATS
parent 57568362
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -4,9 +4,6 @@ module LibItsBtp_EncdecDeclarations {
    import from LibItsBtp_TypesAndValues all;
    import from LibItsBtp_TypesAndValues all;
    import from LibItsBtp_TestSystem all;
    import from LibItsBtp_TestSystem all;
    
    
    external function fx_enc_BtpPayload (BtpPayload p) return bitstring
        with {extension "prototype(convert) encode(LibItsBtp_BtpPayload)"}
    
    /*  TODO RGy function not implemented! (decvalue() not used by test suite @29-06-2016)    
    /*  TODO RGy function not implemented! (decvalue() not used by test suite @29-06-2016)    
    external function fx_dec_BtpPayload (inout bitstring b, out BtpPayload p) return integer
    external function fx_dec_BtpPayload (inout bitstring b, out BtpPayload p) return integer
        with {extension "prototype(sliding) decode(LibItsBtp)"}
        with {extension "prototype(sliding) decode(LibItsBtp)"}
+1 −1
Original line number Original line Diff line number Diff line
@@ -234,7 +234,7 @@
         * @desc Gets the BTP payload to use.
         * @desc Gets the BTP payload to use.
         * @return BTP payload
         * @return BTP payload
         */
         */
        function f_getBtpPayload() return BtpPayload {
        function f_getBtpPayload() return BtpRawPayload {
            return PX_PAYLOAD;
            return PX_PAYLOAD;
        }
        }
        
        
+1 −4
Original line number Original line Diff line number Diff line
@@ -43,10 +43,7 @@ module LibItsBtp_Pixits {
         * @desc Payload to be sent to the IUT for testing matter
         * @desc Payload to be sent to the IUT for testing matter
         * 		 
         * 		 
         */
         */
    	modulepar BtpPayload PX_PAYLOAD := { 
    	modulepar BtpRawPayload PX_PAYLOAD := '0102030405'O ;
    	    decodedPayload := omit, 
    	    rawPayload := '0102030405'O 
    	};


    
    
} // end LibItsBtp_Pixits
} // end LibItsBtp_Pixits
 No newline at end of file
+14 −14
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ module LibItsBtp_Templates {
         * @param   p_payload   Payload
         * @param   p_payload   Payload
         */
         */
        template (value) BtpPacket m_btpA (
        template (value) BtpPacket m_btpA (
            template (value) BtpPayload p_payload
                                           template (value) BtpRawPayload p_payload
        ):= {
        ):= {
            header := { 
            header := { 
                btpAHeader := {
                btpAHeader := {
@@ -107,7 +107,7 @@ module LibItsBtp_Templates {
         * @param   p_payload       Payload
         * @param   p_payload       Payload
         */
         */
        template( value) BtpPacket m_btpB (
        template( value) BtpPacket m_btpB (
            template (value) BtpPayload     p_payload
                                           template (value) BtpRawPayload p_payload
        ) := {
        ) := {
            header := { 
            header := { 
                btpBHeader := {
                btpBHeader := {
@@ -127,7 +127,7 @@ module LibItsBtp_Templates {
        template (value) BtpPacket m_btpAWithPorts (
        template (value) BtpPacket m_btpAWithPorts (
                                                    template (value) BtpPortId  p_destPort,
                                                    template (value) BtpPortId  p_destPort,
                                                    template (value) BtpPortId  p_srcPort,
                                                    template (value) BtpPortId  p_srcPort,
            template (value) BtpPayload p_payload
                                                    template (value) BtpRawPayload p_payload
        ):= {
        ):= {
            header := { 
            header := { 
                btpAHeader := {
                btpAHeader := {
@@ -147,7 +147,7 @@ module LibItsBtp_Templates {
        template( value) BtpPacket m_btpBWithPorts (
        template( value) BtpPacket m_btpBWithPorts (
                                                    template (value) BtpPortId      p_destPort,
                                                    template (value) BtpPortId      p_destPort,
                                                    template (value) BtpPortInfo    p_destPortInfo,
                                                    template (value) BtpPortInfo    p_destPortInfo,
            template (value) BtpPayload     p_payload
                                                    template (value) BtpRawPayload     p_payload
        ) := {
        ) := {
            header := { 
            header := { 
                btpBHeader := {
                btpBHeader := {
@@ -167,7 +167,7 @@ module LibItsBtp_Templates {
        template BtpPacket mw_btpA (
        template BtpPacket mw_btpA (
                                    template (present) BtpPortId   p_destPort,
                                    template (present) BtpPortId   p_destPort,
                                    template (present) BtpPortId   p_srcPort,
                                    template (present) BtpPortId   p_srcPort,
            template BtpPayload  p_payload
                                    template BtpRawPayload  p_payload
        ) := {
        ) := {
            header := { 
            header := { 
                btpAHeader := {
                btpAHeader := {
@@ -187,7 +187,7 @@ module LibItsBtp_Templates {
        template BtpPacket mw_btpB (	
        template BtpPacket mw_btpB (	
                                    template (present) BtpPortId   p_destPort,
                                    template (present) BtpPortId   p_destPort,
                                    template (present) BtpPortInfo p_destPortInfo,
                                    template (present) BtpPortInfo p_destPortInfo,
            template BtpPayload  p_payload
                                    template BtpRawPayload  p_payload
        ) := {
        ) := {
            header := { 
            header := { 
                btpBHeader := {
                btpBHeader := {
+19 −59
Original line number Original line Diff line number Diff line
@@ -14,14 +14,7 @@ module LibItsBtp_TypesAndValues {
    // LibCommon
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_BasicTypesAndValues all;
    
    
    // LibIts
    type octetstring BtpRawPayload;
    import from CAM_PDU_Descriptions language "ASN.1:1997" all;
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;
    import from MAPEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
    import from SREM_PDU_Descriptions language "ASN.1:1997" all;
    import from SSEM_PDU_Descriptions language "ASN.1:1997" all;
    
    
    group btpPdus {
    group btpPdus {
     
     
@@ -33,9 +26,10 @@ module LibItsBtp_TypesAndValues {
         */
         */
        type record BtpPacket {
        type record BtpPacket {
            BtpHeader      header,
            BtpHeader      header,
            BtpPayload     payload optional
            BtpRawPayload  payload optional
        }
        }
        with {
        with {
	    variant "FIELDORDER(msb)"
            encode "LibIts_Interface"
            encode "LibIts_Interface"
        }
        }
        
        
@@ -52,8 +46,11 @@ module LibItsBtp_TypesAndValues {
        type union BtpHeader {
        type union BtpHeader {
            BtpAHeader btpAHeader,
            BtpAHeader btpAHeader,
            BtpBHeader btpBHeader 
            BtpBHeader btpBHeader 
        } with {
	    variant "FIELDORDER(msb)"
	}
	}



        /**
        /**
         * @desc BTP-A Header
         * @desc BTP-A Header
         * @see ETSI TS 102 636-5-1 chapter 7.2
         * @see ETSI TS 102 636-5-1 chapter 7.2
@@ -63,8 +60,11 @@ module LibItsBtp_TypesAndValues {
        type record BtpAHeader {
        type record BtpAHeader {
            BtpPortId destinationPort,
            BtpPortId destinationPort,
            BtpPortId sourcePort   
            BtpPortId sourcePort   
        } with {
	    variant "FIELDORDER(msb)"
	}
	}
 
 

        /**
        /**
         * @desc BTP-B Header
         * @desc BTP-B Header
         * @see ETSI TS 102 636-5-1 chapter 7.3
         * @see ETSI TS 102 636-5-1 chapter 7.3
@@ -74,8 +74,11 @@ module LibItsBtp_TypesAndValues {
        type record BtpBHeader {
        type record BtpBHeader {
            BtpPortId destinationPort,
            BtpPortId destinationPort,
            BtpPortInfo destinationPortInfo   
            BtpPortInfo destinationPortInfo   
        } with {
	    variant "FIELDORDER(msb)"
	}
	}


        
        /**
        /**
         * @desc BTP Port ID
         * @desc BTP Port ID
         * @see ETSI TS 102 636-5-1 chapter 7.3.2
         * @see ETSI TS 102 636-5-1 chapter 7.3.2
@@ -90,53 +93,6 @@ module LibItsBtp_TypesAndValues {
        
        
    } // end btpHeaders
    } // end btpHeaders


    group btpPayload {
        
        type octetstring BtpRawPayload;
        
        /**
         * @desc The payload of the BTP packet
         * @member decodedPayload The decoded payload
         * @member rawPayload Raw payload as it is received
         */
        type record BtpPayload {
            DecodedBtpPayload decodedPayload optional,
            BtpRawPayload rawPayload
        }
        with {
	        encode "LibItsBtp_BtpPayload"
        }
        
        /**
         * @desc The decoded payload of the BTP packet
         * @member camPacket The CAM packet
         * @member denmPacket The DENM packet
         * @member mapemPacket
         * @member spatemPacket
         * @member ivimPacket
         * @member sremPacket
         * @member seemPacket
         */
        type union DecodedBtpPayload {
            CAM     camPacket, 
            DENM    denmPacket, 
            MAPEM   mapemPacket, 
            SPATEM  spatemPacket, 
            IVIM    ivimPacket, 
            SREM    sremPacket, 
            SSEM    ssemPacket  
        } with { 
            encode (camPacket) "PER"; 
            encode (denmPacket) "PER"; 
            encode (mapemPacket) "PER"; 
            encode (spatemPacket) "PER"; 
            encode (ivimPacket) "PER"; 
            encode (sremPacket) "PER"; 
            encode (ssemPacket) "PER" 
        }
        
    } //end btpPayload

    group utPrimitives {
    group utPrimitives {
        
        
        group utCommonPrimitives {
        group utCommonPrimitives {
@@ -194,4 +150,8 @@ module LibItsBtp_TypesAndValues {
        encode "UpperTester"
        encode "UpperTester"
    }
    }
    
    
} with {
    variant ""
    encode "LibItsGeoNetworking"
}
}
Loading