LibItsBtp_TypesAndValues.ttcn 4.15 KB
Newer Older
/**
 *  @author   ETSI / STF405
 *  @version  $URL$
 *            $Id$
 *  @desc     Module containing types and values for Basic Transport Protocol
garciay's avatar
garciay committed
 *  @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 {

garciay's avatar
garciay committed
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_DataStrings all;
garciay's avatar
garciay committed
  type octetstring BtpRawPayload;
garciay's avatar
garciay committed
  group btpPdus {
garciay's avatar
garciay committed
    /**
     * @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 {
      variant "FIELDORDER(msb)"
      encode "LibIts_Interface"
      }
garciay's avatar
garciay committed
  } // end btpPdus
garciay's avatar
garciay committed
  group btpHeaders {
garciay's avatar
garciay committed
    /**
     * @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)"
      }
garciay's avatar
garciay committed
    /**
     * @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)"
      }
garciay's avatar
garciay committed
    /**
     * @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)"
      }
garciay's avatar
garciay committed
    /**
     * @desc BTP Port ID
     * @see ETSI TS 102 636-5-1 chapter 7.3.2
     */ 
    type UInt16 BtpPortId;
garciay's avatar
garciay committed
    /**
     * @desc BTP-B Port info
     * @see ETSI TS 102 636-5-1 chapter 7.3.2
     */ 
    type UInt16 BtpPortInfo;
garciay's avatar
garciay committed
  } // end btpHeaders
garciay's avatar
garciay committed
  group utPrimitives {
garciay's avatar
garciay committed
    group utCommonPrimitives {
garciay's avatar
garciay committed
      /**
       * @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 ""
      }
garciay's avatar
garciay committed
      /**
       * @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)"
	}
garciay's avatar
garciay committed
      /**
       * @desc Upper Tester message to request triggering of an BTPB message at IUT 
       */
      type record GenerateBtpB {
	BtpBHeader btpBHeader
      } with {
	variant "FIELDORDER(msb)"
	}
garciay's avatar
garciay committed
      /**
       * @desc Upper Tester message to check event/status on BTP IUT 
       */    
      type record UtBtpEventInd {
	BtpRawPayload rawPayload
      } with {
	variant "FIELDORDER(msb)"
	}
garciay's avatar
garciay committed
      /**
       * @desc List of Upper Tester messages to check event/status on CAM IUT 
       */    
      type record of UtBtpEventInd UtBtpEventIndList;
    }
garciay's avatar
garciay committed
  } // end utPrimitives
  with {
    variant ""
    encode "UpperTester"
  }
garciay's avatar
garciay committed
  variant ""
  encode "LibItsGeoNetworking"