Commit 05ad5fcc authored by Yann Garcia's avatar Yann Garcia
Browse files

Add PIXIT for timer factors

parent 0ea3ae36
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ module ItsCam_TpFunctions {
    import from LibItsCam_Templates all;
    import from LibItsCam_TypesAndValues all;
    import from LibItsCam_Pics all;
    import from LibItsCam_Pixits all;
    
    import from LibItsSecurity_Functions all;

@@ -141,7 +142,7 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_FMT_BV_03() runs on ItsCam {
                
                // Local variables
                timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.10;
                timer t_minTransInterval := c_lowFrequencyGenerationTime * PX_INC_TIMER_CONTROL_FACTOR;
                var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
                var integer v_cntSpeed, v_cntTime;
                var CamInd v_camInd;
@@ -287,7 +288,7 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_FMT_BV_05() runs on ItsCam {
                
                // Local variables
                timer t_minTransInterval := c_specialVehicleGenerationTime * 1.10;
                timer t_minTransInterval := c_specialVehicleGenerationTime * PX_INC_TIMER_CONTROL_FACTOR;
                var VehicleRole v_vehicleRole := roadWork;
                var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
                var integer v_cntSpeed, v_cntTime;
@@ -2192,7 +2193,7 @@ module ItsCam_TpFunctions {
                function f_CAM_MSD_GFQ_TI_01() runs on ItsCam {
                    
                    // Local variables
                    timer t_minTransInterval := PICS_T_GENCAMMIN * 0.90;
                    timer t_minTransInterval := PICS_T_GENCAMMIN * PX_DEC_TIMER_CONTROL_FACTOR;
                    var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s
                    var integer v_cntSpeed, v_cntTime;
                    var FncRetCode v_ret;
@@ -2286,7 +2287,7 @@ module ItsCam_TpFunctions {
                function f_CAM_MSD_GFQ_TI_02() runs on ItsCam {
                    
                    // Local variables
                    timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.10;
                    timer t_maxTransInterval := PICS_T_GENCAMMAX * PX_INC_TIMER_CONTROL_FACTOR;
                    var integer v_cntSpeed, v_cntTime;
                    var FncRetCode v_ret;
                    
@@ -2439,7 +2440,7 @@ module ItsCam_TpFunctions {
                                log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***");
                                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
                            }
                            else if (v_measured>v_interval_1_measured * 1.10) {
                            else if (v_measured>v_interval_1_measured * PX_INC_TIMER_CONTROL_FACTOR) {
                                log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received in time ***");
                                f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
                            }
@@ -2461,11 +2462,11 @@ module ItsCam_TpFunctions {
                    [] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camInd {
                        var float v_measured := int2float(v_camInd.recvTime) / 1000.0 - v_receiveTime;
                        log("*** " & testcasename() & ": DEBUG: v_measured=", v_measured, " ***");
                        if (v_measured<PICS_T_GENCAMMAX * 0.90) {
                        if (v_measured<PICS_T_GENCAMMAX * PX_DEC_TIMER_CONTROL_FACTOR) {
                            log("*** " & testcasename() & ": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
                        else if (v_measured>PICS_T_GENCAMMAX * 1.10) {
                        else if (v_measured>PICS_T_GENCAMMAX * PX_INC_TIMER_CONTROL_FACTOR) {
                            log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***");
                            f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                        }
@@ -2492,8 +2493,8 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_GFQ_BV_04() runs on ItsCam {
                
                // Local variables
                timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
                timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
                timer t_genCam_dcc := PICS_T_GENCAMDCC * PX_DEC_TIMER_CONTROL_FACTOR;
                timer t_genCam_min := PICS_T_GENCAMMIN * PX_INC_TIMER_CONTROL_FACTOR;
                var CamInd v_camPdu;
                var HeadingValue v_headingValue;
                var HeadingValue v_changeHeadingValue := 50; // 4° == 40
@@ -2556,7 +2557,7 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_GFQ_BV_05() runs on ItsCam {
                
                // Local variables
                timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
                timer t_genCam_dcc := PICS_T_GENCAMDCC * PX_DEC_TIMER_CONTROL_FACTOR;
                var CamInd v_camPdu;
                var ReferencePosition v_referencePosition, v_expectedReferencePosition;
                var float v_changePosValue := 8.0; // 8 >> 4m
@@ -2628,8 +2629,8 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_GFQ_BV_06() runs on ItsCam {
                
                // Local variables
                timer t_genCam_dcc := PICS_T_GENCAMDCC * 0.90;
                timer t_genCam_min := PICS_T_GENCAMMIN * 1.10;
                timer t_genCam_dcc := PICS_T_GENCAMDCC * PX_DEC_TIMER_CONTROL_FACTOR;
                timer t_genCam_min := PICS_T_GENCAMMIN * PX_INC_TIMER_CONTROL_FACTOR;
                var CamInd v_camPdu;
                var SpeedValue v_speedValue;
                var SpeedValue v_changeSpeedValue := 60; // 0,5 m/s << 0,6 m/s == 60 cm/s
@@ -2692,8 +2693,8 @@ module ItsCam_TpFunctions {
            function f_CAM_MSD_GFQ_TI_07() runs on ItsCam {
                
                // Local variables
                timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.90;
                timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.10;
                timer t_maxTransInterval_min := PICS_T_GENCAMMAX * PX_DEC_TIMER_CONTROL_FACTOR;
                timer t_maxTransInterval_max := PICS_T_GENCAMMAX * PX_INC_TIMER_CONTROL_FACTOR;
                timer t_genCam_measure := PX_TWAIT;
                timer t_genCam_min;
                timer t_genCam_max;
+30 −20
Original line number Diff line number Diff line
@@ -18,4 +18,14 @@ module LibItsCam_Pixits {
  // LibItsSecurity
  import from LibItsSecurity_TypesAndValues all;

  /**
   * @desc Multiply timer value by this control factor to increase it 
   */
  modulepar float PX_INC_TIMER_CONTROL_FACTOR := 1.10;

  /**
   * @desc Multiply timer value by this control factor to decrease it 
   */
  modulepar float PX_DEC_TIMER_CONTROL_FACTOR := 0.9;

} // End of module LibItsSecurity_Pixits
 No newline at end of file