Commit 858d5f2d authored by garciay's avatar garciay
Browse files

Start UpperTester changes

parent 3c7286f4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
         * @desc    Requests to bring the IUT in an initial state
         * @param   p_init The initialisation to trigger.
         */
        function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsBtp {
        function f_utInitializeIut(template (value) UtBtpInitialize p_init) runs on ItsBtp {
            
            //deactivate btpPort default alts
            vc_btpDefaultActive := false;
@@ -41,9 +41,7 @@
            utPort.send(p_init);
            tc_wait.start;
            alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
//                [] utPort.receive(UtInitializeResult:true) {
                [] utPort.receive(UtCommonResults:{utInitializeResult:=true}) {
                [] utPort.receive(UtBtpResults: { utBtpInitializeResult := true}) {
                    tc_wait.stop;
                    log("*** f_utInitializeIut: INFO: IUT initialized ***");
                }
@@ -74,7 +72,7 @@
            
            utPort.send(p_event);
            alt {
                [] utPort.receive(UtBtpTriggerResult:true) {
	      [] utPort.receive(UtBtpResults: { utBtpTriggerResult := true }) {
                    tc_wait.stop;
                }
                [] utPort.receive {
+2 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ module LibItsBtp_Templates {
            /**
             * @desc Initializes the BTP IUT. 
             */
            template (value) UtInitialize m_btpInitialize := {
            template (value) UtBtpInitialize m_btpInitialize := {
                hashedId8 := '0000000000000000'O
            }
            
+2 −4
Original line number Diff line number Diff line
@@ -27,11 +27,9 @@ module LibItsBtp_TestSystem {
         */
        type port UpperTesterPort message {
            out 
                UtInitialize, UtBtpTrigger;
                UtBtpInitialize, UtBtpTrigger;
            in 
//FIXME RGY!!! As discussed, list of booleans is changed by a top-level union type
//                UtInitializeResult, UtBtpTriggerResult, UtBtpEventInd;
                  UtCommonResults, UtBtpTriggerResult, UtBtpEventInd;
                UtBtpResults, UtBtpEventInd;
        } // end UpperTesterPort
        
    } // end portDefinitions
+139 −117
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ module LibItsBtp_TypesAndValues {

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;
  import from LibCommon_DataStrings all;
    
  type octetstring BtpRawPayload;
    
@@ -97,6 +98,28 @@ module LibItsBtp_TypesAndValues {
        
    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      -
@@ -105,20 +128,17 @@ module LibItsBtp_TypesAndValues {
      type union UtBtpTrigger {
	GenerateBtpA btpA,
	  GenerateBtpB btpB
      } with {
	  variant ""
	}
    
//FIXME RGY As discussed, boolean results are replaced by a union of the results
//            type boolean UtBtpTriggerResult;
            type union UtBtpResults {
              boolean utBtpTriggerResult
            }
            type UtBtpResults.utBtpTriggerResult UtBtpTriggerResult;
            
      /**
       * @desc Upper Tester message to request triggering of an BTPA message at IUT 
       */
      type record GenerateBtpA {
	BtpAHeader btpAHeader
      } with {
	variant "FIELDORDER(msb)"
	}
                    
      /**
@@ -126,6 +146,8 @@ module LibItsBtp_TypesAndValues {
       */
      type record GenerateBtpB {
	BtpBHeader btpBHeader
      } with {
	variant "FIELDORDER(msb)"
	}
            
      /**
@@ -133,6 +155,8 @@ module LibItsBtp_TypesAndValues {
       */    
      type record UtBtpEventInd {
	BtpRawPayload rawPayload
      } with {
	variant "FIELDORDER(msb)"
	}
            
      /**
@@ -140,13 +164,11 @@ module LibItsBtp_TypesAndValues {
       */    
      type record of UtBtpEventInd UtBtpEventIndList;
    }
//        with {
//            encode "LibItsCommon"
//        }
                
        
  } // end utPrimitives
  with {
    variant ""
    encode "UpperTester"
  }
    
+13 −15
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ module LibItsCam_Functions {
         * @desc    Requests to bring the IUT in an initial state
         * @param   p_init The initialisation to trigger.
         */
        function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsCam {
        function f_utInitializeIut(template (value) UtCamInitialize p_init) runs on ItsCam {
            
            //deactivate camPort default alts
            vc_camDefaultActive := false;
@@ -49,9 +49,7 @@ module LibItsCam_Functions {
            utPort.send(p_init);
            tc_wait.start;
            alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type
//                [] utPort.receive(UtInitializeResult:true) {
                [] utPort.receive(UtCommonResults:{utInitializeResult:=true}) {
                [] utPort.receive(UtCamResults: { utCamInitializeResult := true }) {
                    tc_wait.stop;
                    log("*** f_utInitializeIut: INFO: IUT initialized ***");
                }
@@ -83,9 +81,7 @@ module LibItsCam_Functions {
            utPort.send(p_event);
            tc_wait.start;
            alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type 
//                [] utPort.receive(UtCamTriggerResult:true) {
                [] utPort.receive(UpperTesterCamResults:{utCamTriggerResult:=true}) {
                [] utPort.receive(UtCamResults: { utCamTriggerResult := true }) {
                    tc_wait.stop;
                }
                [] utPort.receive {
@@ -104,20 +100,22 @@ module LibItsCam_Functions {
         * @desc    Changes the position of the IUT
         * @param   p_position
         */
        function f_utChangePosition(template (value) UtChangePosition p_position) runs on ItsCam {
        function f_utChangePosition(template (value) UtCamChangePosition p_position) runs on ItsCam {
            
            //deactivate camPort default alts
            vc_camDefaultActive := false;
            
            utPort.send(p_position);
            alt {
//FIXME RGY As discussed, port in type is changed to a top-level union type 
//                [] utPort.receive(UtChangePositionResult:?) {
                [] utPort.receive(UtCommonResults:{utChangePositionResult:=?}) {
                [] utPort.receive(UtCamResults: { utCamChangePositionResult := true}) {
                    tc_wait.stop;
                }
                [] utPort.receive {
		[] utPort.receive(UtCamResults: { utCamChangePositionResult := false }) {
		  tc_wait.stop;
		  log("*** f_utChangePosition: INFO: IUT position change was not successful ***");
		  f_selfOrClientSyncAndVerdict("error", e_error);
                }
                [] a_utDefault() {
                }
                [] tc_wait.timeout {
                    log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
@@ -391,7 +389,7 @@ module LibItsCam_Functions {
        function f_prInitialState(
                                  in Scenario p_scenario := e_staticPosition,
                                  in boolean p_awaitInitialCAM := true,
                                  in template (value) UtInitialize p_camInitialize := m_camInitialize 
                                  in template (value) UtCamInitialize p_camInitialize := m_camInitialize 
        ) runs on ItsCam {
            
            f_utInitializeIut(p_camInitialize);
Loading