Devel

V1.2.1 of the code (end of TTF-011)

Merge request reports

Loading
+29
Changes for lib/LibItsBtp_EncdecDeclarations.ttcn: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
module LibItsBtp_EncdecDeclarations {
    
    // LibItsBtp
    import from LibItsBtp_TypesAndValues all;
    
    /*  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
        with {extension "prototype(sliding) decode(LibItsBtp)"}
    */

    external function fx_enc_BtpReq (BtpReq p) return bitstring
        with {extension "prototype(convert) encode(LibIts_Interface)"}

    external function fx_enc_BtpInd (BtpInd p) return bitstring
        with {extension "prototype(convert) encode(LibIts_Interface)"}

    external function fx_dec_BtpInd (inout bitstring b, out BtpInd p) return integer
        with {extension "prototype(sliding) decode(LibIts_Interface)"}

    external function fx_dec_BtpReq (inout bitstring b, out BtpReq p) return integer
        with {extension "prototype(sliding) decode(LibIts_Interface)"}

    external function fx_enc_BtpPacket (BtpPacket p) return bitstring
        with {extension "prototype(convert) encode(LibIts_Interface)"}

    external function fx_dec_BtpPacket (inout bitstring b, out BtpPacket p) return integer
        with {extension "prototype(sliding) decode(LibIts_Interface)"}
        
} // End of module LibItsBtp_EncdecDeclarations 
+49
Changes for lib/LibItsBtp_Pixits.ttcn: 49 added lines, 0 removed lines.
Original line number Diff line number Diff line
/**
 *  @author   ETSI / STF405
 *  @version  $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/BTP/LibItsBtp_Pixits.ttcn $
 *            $Id: LibItsBtp_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $
 *  @desc     Basic Transport Protocol Templates
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 *
 */
module LibItsBtp_Pixits {
    
    // LibIts
    import from LibItsBtp_TypesAndValues all;
    

        /**
         * @desc BTP source port of the IUT
         * 		 
         */
    	modulepar BtpPortId PX_SOURCE_PORT := 0;

        /**
         * @desc BTP Destination port of the IUT
         * 		 
         */
    	modulepar BtpPortId PX_DESTINATION_PORT := 0;

        /**
         * @desc BTP Unknown Destination port of the IUT
         * 		 
         */
    	modulepar BtpPortId PX_UNKNOWN_DESTINATION_PORT := 0;

        /**
         * @desc BTP Destination port Info of the IUT
         * 		 
         */
    	modulepar BtpPortId PX_DESTINATION_PORT_INFO := 0;

        /**
         * @desc Payload to be sent to the IUT for testing matter
         * 		 
         */
    	modulepar BtpRawPayload PX_PAYLOAD := '0102030405'O ;

    
} // end LibItsBtp_Pixits
 No newline at end of file
+203
Changes for lib/LibItsBtp_Templates.ttcn: 203 added lines, 0 removed lines.
Original line number Diff line number Diff line
/**
 *  @author   ETSI / STF405
 *  @version  $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/BTP/LibItsBtp_Templates.ttcn $
 *            $Id: LibItsBtp_Templates.ttcn 1318 2017-01-26 10:20:53Z filatov $
 *  @desc     Basic Transport Protocol Templates
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 *
 */
module LibItsBtp_Templates {
    
    // LibIts
    import from LibItsBtp_TypesAndValues all;
    import from LibItsBtp_Pixits all;
    import from LibItsCommon_TypesAndValues all;
        
    group btpPrimitivesTemplates {

        /**
         * @desc    Send template for BTP packet (BtpPort Primitive)
         * @param   p_btpPkt BTP Packet to be sent
         */
        template (value) BtpReq m_btpReq(
            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_btpInd(
            template (present) BtpPacket p_btpPkt
            ) := {
            msgIn := p_btpPkt
        }
    
        group utPrimitives {
            
            /**
             * @desc Initializes the BTP IUT. 
             */
            template (value) UtBtpInitialize m_btpInitialize := {
                hashedId8 := '0000000000000000'O
            }
            
            /**
             * @desc Generate a BTP A packet
             * @param p_destPort  The destination port
             * @param p_srcPort   The source port
             */
            template (value) UtBtpTrigger m_generateBtpA(in BtpPortId p_destPort, in BtpPortId p_srcPort) := {
                btpA := {
                    btpAHeader := {
                        destinationPort := p_destPort,
                        sourcePort := p_srcPort
                    }
                }
            }
            
            /**
             * @desc Generate a BTP B packet
             * @param p_destPort      The destination port
             * @param p_destPortInfo  The destination port information
             */
            template (value) UtBtpTrigger m_generateBtpB(in BtpPortId p_destPort, in BtpPortInfo p_destPortInfo) := {
                btpB := {
                    btpBHeader := {
                        destinationPort := p_destPort,
                        destinationPortInfo := p_destPortInfo
                    }
                }
            }
                        
        } // end utPrimitives
        
    } // btpPrimitivesTemplates
    
    group btpPduTemplates {
        
        /**
         * @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) BtpRawPayload p_payload
        ):= {
            header := { 
                btpAHeader := {
                    destinationPort := PX_DESTINATION_PORT, 
                    sourcePort := PX_SOURCE_PORT
                }
            }, 
            payload := p_payload
        }

        /**
         * @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) BtpRawPayload p_payload
        ) := {
            header := { 
                btpBHeader := {
                    destinationPort := PX_DESTINATION_PORT, 
                    destinationPortInfo := 0
                }
            }, 
            payload := p_payload
        }
        
        /**
         * @desc    Send template for BTP-A packet with port parameters
         * @param   p_destPort  Destination port
         * @param   p_srcPort   Source port
         * @param   p_payload   Payload
         */
        template (value) BtpPacket m_btpAWithPorts (
                                                    template (value) BtpPortId  p_destPort,
                                                    template (value) BtpPortId  p_srcPort,
                                                    template (value) BtpRawPayload p_payload
        ):= {
            header := { 
                btpAHeader := {
                    destinationPort := p_destPort, 
                    sourcePort := p_srcPort
                }
            }, 
            payload := p_payload
        }

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

        /**
         * @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 BtpRawPayload  p_payload
        ) := {
            header := { 
                btpAHeader := {
                    destinationPort := p_destPort, 
                    sourcePort := p_srcPort
                }
            }, 
            payload := p_payload
        }

        /**
         * @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 BtpRawPayload  p_payload
        ) := {
            header := { 
                btpBHeader := {
                    destinationPort := p_destPort, 
                    destinationPortInfo := p_destPortInfo
                }
            }, 
            payload := p_payload
        }

    } // end btpPduTemplates
    
    
} // end LibItsBtp_Templates
+203
Changes for lib/LibItsBtp_TypesAndValues.ttcn: 203 added lines, 0 removed lines.
Original line number Diff line number Diff line
/**
 *  @author   ETSI / STF405
 *  @version  $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/BTP/LibItsBtp_TypesAndValues.ttcn $
 *            $Id: LibItsBtp_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $
 *  @desc     Module containing types and values for Basic Transport Protocol
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 *
 */
module LibItsBtp_TypesAndValues {

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_DataStrings all;
    
  type octetstring BtpRawPayload;
    
  group btpPdus {
     
    /**
     * @desc BTP Packet
     * @see ETSI TS 102 636-5-1 chapter 6
     * @member header
     * @member payload
     */
    type record BtpPacket {
      BtpHeader      header,
      BtpRawPayload  payload optional
    }
    with {
      encode "LibIts_Interface"
      variant "FIELDORDER(msb)"
    }
        
  } // end btpPdus
    
  group btpHeaders {
        
    /**
     * @desc BTP Header
     * @see ETSI TS 102 636-5-1 chapter 7.1
     * @member btpAHeader
     * @member btpBHeader
     */
    type union BtpHeader {
      BtpAHeader btpAHeader,
      BtpBHeader btpBHeader 
    } with {
      variant "FIELDORDER(msb)"
    }


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

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

        
    /**
     * @desc BTP Port ID
     * @see ETSI TS 102 636-5-1 chapter 7.3.2
     */ 
    type UInt16 BtpPortId;

    /**
     * @desc BTP-B Port info
     * @see ETSI TS 102 636-5-1 chapter 7.3.2
     */ 
    type UInt16 BtpPortInfo;
        
  } // end btpHeaders

  group utPrimitives {
    
    group utCommonPrimitives {
      
      /**
       * @desc Upper Tester message to initialize IUT 
       * @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
       */
      type record UtBtpInitialize {
        Oct8 hashedId8 
      } with {
        variant "FIELDORDER(msb)"
      }

      /**
       * @desc Upper Tester results message of the Btp IUT
       * @member utBtpInitialize             -
       * @member utBtpTriggerResult          -
       */
      type union UtBtpResults {
        boolean utBtpInitializeResult,
        boolean utBtpTriggerResult
      } with {
        variant ""
      }
            
      /**
       * @desc    UT primitives for BTP
       * @member  btpA      -
       * @member  btpB    -
       */
      type union UtBtpTrigger {
        GenerateBtpA btpA,
        GenerateBtpB btpB
      } with {
        variant ""
      }
      
      /**
       * @desc Upper Tester message to request triggering of an BTPA message at IUT 
       */
      type record GenerateBtpA {
        BtpAHeader btpAHeader
      } with {
        variant "FIELDORDER(msb)"
      }
      
      /**
       * @desc Upper Tester message to request triggering of an BTPB message at IUT 
       */
      type record GenerateBtpB {
        BtpBHeader btpBHeader
      } with {
        variant "FIELDORDER(msb)"
      }
      
      /**
       * @desc Upper Tester message to check event/status on BTP IUT 
       */    
      type record UtBtpEventInd {
        BtpRawPayload rawPayload
      } with {
        variant "FIELDORDER(msb)"
      }
      
      /**
       * @desc List of Upper Tester messages to check event/status on CAM IUT 
       */    
      type record of UtBtpEventInd UtBtpEventIndList;
      
    }
    
  } // end utPrimitives
  with {
    variant ""
    encode "UpperTester"
  }
    
    group networkAndTransportPrimitives { 
            
        group nt1Primitives {

            /**
             * @desc NT1 BTP Indication Primitive 
             */
            type record BtpInd {
                BtpPacket msgIn
            }
        
            /**
             * @desc NT1 BTP Request Primitive 
             */
            type record BtpReq {
                BtpPacket msgOut
            }
                        
        } // end nt1Primitives
        
    } // End of group networkAndTransportPrimitives    
        with {
           encode "LibIts_Interface"
    } // end interfacePrimitives    
     
} with {
  variant ""
  encode "LibItsBtp"
}
+4
Changes for lib/module.mk: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
sources := LibItsBtp_EncdecDeclarations.ttcn \
           LibItsBtp_Pixits.ttcn             \
           LibItsBtp_Templates.ttcn          \
           LibItsBtp_TypesAndValues.ttcn
Loading
Loading