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

Compile AtsCPS

parent 86797beb
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ module ItsCps_TestCases {
  group cpsLowerLayerParameters {

    /**
    * @desc Check that CPS is encapsulated in BTP type B packet
    * @desc Check that CCPMPS is encapsulated in BTP type B packet
    * <pre>
    * Pics Selection: PICS_CPS_GENERATION AND NOT PICS_IS_IUT_SECURED
    * Initial conditions: 
@@ -38,7 +38,7 @@ module ItsCps_TestCases {
    } // End of TC_CPS_MSD_PAR_BV_01

    /**
    * @desc Check that CPS is encapsulated in SHB packet
    * @desc Check that CPM is encapsulated in SHB packet
    * <pre>
    * Pics Selection: PICS_CPS_GENERATION AND NOT PICS_IS_IUT_SECURED
    * Initial conditions: 
@@ -67,7 +67,7 @@ module ItsCps_TestCases {
    } // End of TC_CPS_MSD_PAR_BV_02

    /**
    * @desc Check that CPS is encapsulated in GN packet with lifetime lower than 1s
    * @desc Check that CPM is encapsulated in GN packet with lifetime lower than 1s
    * <pre>
    * Pics Selection: PICS_CPS_GENERATION AND NOT PICS_IS_IUT_SECURED
    * Initial conditions: 
@@ -80,7 +80,7 @@ module ItsCps_TestCases {
    *          a CollectivePerceptionMessage is generated
    *      }
    *      then {
    *          the IUT sends a CCollectivePerceptionMessagePS
    *          the IUT sends a CollectivePerceptionMessage
    *              encapsulated in a GN packet
    *                  containing Basic Header
    *                      containing Lifetime field 
+7 −7
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ module ItsCps_TpFunctions {
        }
        [] cpmPort.receive(mw_cpsIndWithGnParameters(mw_cpmMsg_any, omit)) { 
        tc_ac.stop;
        log("*** " & testcasename() & ": INCONC: no GN NH information in CpsInd ***");
        log("*** " & testcasename() & ": INCONC: no GN NH information in CpmInd ***");
        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);  
        }      
        [] cpmPort.receive(mw_cpsInd(mw_cpmMsg_any)) { 
@@ -116,7 +116,7 @@ module ItsCps_TpFunctions {
      }
      [] cpmPort.receive(mw_cpsIndWithGnParameters(mw_cpmMsg_any, -, omit, omit)) { 
      tc_ac.stop;
      log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CpsInd ***");
      log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CpmInd ***");
      f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);  
      }      
      [] cpmPort.receive(mw_cpsInd(mw_cpmMsg_any)) { 
@@ -142,7 +142,7 @@ module ItsCps_TpFunctions {
    function f_CPS_MSD_PAR_BV_03() runs on ItsCps {
    
    // Local variables
    var CpsInd v_cpsInd;
    var CpmInd v_cpmInd;
    
    // Test control
    if (not PICS_CPS_GENERATION or PICS_IS_IUT_SECURED) {
@@ -163,13 +163,13 @@ module ItsCps_TpFunctions {
    // Test Body
    tc_ac.start;
    alt {
      [] cpmPort.receive(mw_cpsIndWithGnParameters(mw_cpmMsg_any)) -> value v_cpsInd { 
      [] cpmPort.receive(mw_cpsIndWithGnParameters(mw_cpmMsg_any)) -> value v_cpmInd { 
      tc_ac.stop;
      if(not ispresent(v_cpsInd.gnLifetime)) {
        log("*** " & testcasename() & ": INCONC: no GN lifetime information in CpsInd ***");
      if(not ispresent(v_cpmInd.gnLifetime)) {
        log("*** " & testcasename() & ": INCONC: no GN lifetime information in CpmInd ***");
        f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);  
      }
      if(v_cpsInd.gnLifetime <= 1000) {
      if(v_cpmInd.gnLifetime <= 1000) {
        log("*** " & testcasename() & ": PASS: Expected CPS message received encapsulted in GN packet with correct lifetime value ***");
        f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
      }
+3 −3
Original line number Diff line number Diff line
@@ -6,13 +6,13 @@ module LibItsCps_EncdecDeclarations {
  // LibItsCps
  import from LibItsCps_TypesAndValues all; 

  external function fx_enc_CpsReq (CpsReq p) return bitstring
  external function fx_enc_CpsReq (CpmReq p) return bitstring
      with {extension "prototype(convert) encode(LibIts_Interface)"}
  
  external function fx_dec_CpsReq (inout bitstring b, out CpsReq p) return integer
  external function fx_dec_CpsReq (inout bitstring b, out CpmReq p) return integer
      with {extension "prototype(sliding) decode(LibIts_Interface)"}

  external function fx_dec_CpsInd (inout bitstring b, out CpsInd p) return integer
  external function fx_dec_CpsInd (inout bitstring b, out CpmInd p) return integer
      with {extension "prototype(sliding) decode(LibIts_Interface)"}
      
  external function fx_enc_CPM (CollectivePerceptionMessage p) return bitstring
+20 −20
Original line number Diff line number Diff line
@@ -22,10 +22,10 @@ module LibItsCps_Templates {
  group cpsPrimitives {

    /**
      * @desc    Receive template for CPS Message (CpsPort Primitive)
      * @desc    Receive template for CPS Message (CpmPort Primitive)
      * @param   p_cpsMsg    Expected CPS Message
      */
    template CpsInd mw_cpsInd (
    template CpmInd mw_cpsInd (
                               in template (present) CollectivePerceptionMessage p_cpsMsg
                               ) := { 
      msgIn               := p_cpsMsg,
@@ -42,7 +42,7 @@ module LibItsCps_Templates {
    } // End of template mw_cpsInd

    /**
      * @desc    Receive template for CPS Message (CpsPort Primitive)
      * @desc    Receive template for CPS Message (CpmPort Primitive)
      * @param   p_cpsMsg            Expected CPS Message
      * @param   p_gnNextHeader      GN next header value
      * @param   p_gnHeaderType      GN header type value
@@ -50,7 +50,7 @@ module LibItsCps_Templates {
      * @param   p_gnLifetime        GN packet lifetime value (ms)
      * @param   p_gnTrafficClass    GN traffic class value
      */
    template CpsInd mw_cpsIndWithGnParameters (
    template CpmInd mw_cpsIndWithGnParameters (
                                               in template (present) CollectivePerceptionMessage p_cpsMsg,
                                               in template UInt8 p_gnNextHeader := *,
                                               in template UInt8 p_gnHeaderType := *,
@@ -71,7 +71,7 @@ module LibItsCps_Templates {
      * @param   p_ssp       SSP security parameter
      * @param   p_its_aid   ITS-AID value
      */
    template CpsInd mw_cpsIndWithSecurityParameters(
    template CpmInd mw_cpsIndWithSecurityParameters(
                                                    template (present) CollectivePerceptionMessage p_cpsMsg,
                                                    template Bit256 p_ssp := *,
                                                    template UInt32 p_its_aid := c_its_aid_CAM
@@ -81,12 +81,12 @@ module LibItsCps_Templates {
    } // End of template mw_cpsIndWithSecurityParameters

    /**
      * @desc    Receive template for CPS Message (CpsPort Primitive)
      * @desc    Receive template for CPS Message (CpmPort Primitive)
      * @param   p_cpsMsg                Expected CPS Message
      * @param   p_btpDestinationPort    BTP destination port value
      * @param   p_btpInfo               BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
      */
    template CpsInd mw_cpsIndWithBtpParameters(
    template CpmInd mw_cpsIndWithBtpParameters(
                                               in template (present) CollectivePerceptionMessage p_cpsMsg,
                                               in template UInt16 p_btpDestinationPort := *,
                                               in template UInt16 p_btpInfo := *
@@ -96,10 +96,10 @@ module LibItsCps_Templates {
    } // End of template mw_cpsIndWithBtpParameters

    /**
      * @desc    Send template for CPS Message (CpsPort Primitive)
      * @desc    Send template for CPS Message (CpmPort Primitive)
      * @param   p_cpsMsg CPS Message to be received
      */    
    template (value) CpsReq m_cpsReq(
    template (value) CpmReq m_cpsReq(
                                     in template (value) CollectivePerceptionMessage p_cpsMsg
                                     ) := { 
      msgOut := p_cpsMsg 
+2 −2
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ module LibItsCps_TypesAndValues {
            /**
             * @desc FA1 CPS Indication Primitive 
             */
            type record CpsInd {
            type record CpmInd {
              CollectivePerceptionMessage msgIn,
              UInt64                      recvTime,
              UInt8                       gnNextHeader optional,
@@ -81,7 +81,7 @@ module LibItsCps_TypesAndValues {
            /**
             * @desc FA1 CPS Request Primitive 
             */
            type record CpsReq {
            type record CpmReq {
              CollectivePerceptionMessage msgOut
            } with {
              encode (msgOut) "PER"
Loading