Commit 0d93fd26 authored by tepelmann's avatar tepelmann
Browse files

Introduced timeInScenario support.

parent 286b8490
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
@@ -219,6 +219,32 @@ module LibItsCam_Functions {
            }
            }
        } // end f_acChangeHeading
        } // end f_acChangeHeading
        
        
        function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsCam return FncRetCode {
            var FncRetCode v_ret := e_success;
            
            if (PICS_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
                f_acTriggerGnssEvent(m_timeInRunningScenario(p_time));
                
                tc_ac.start;
                alt {
                    [] acPort.receive(m_acGnssTimeReached) {
                        tc_ac.stop;
                    }
                    [] acPort.receive {
                        tc_ac.stop;
                        log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
                        f_selfOrClientSyncAndVerdict("error", e_error);
                    }
                    [] tc_ac.timeout {
                        log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***");
                        f_selfOrClientSyncAndVerdict("error", e_timeout);
                    }
                }
                
            }
            return v_ret;
        } // end f_acAwaitTimeInRunningScenario
        
    } // End of group adapterControl
    } // End of group adapterControl


    group camConfigurationFunctions {
    group camConfigurationFunctions {
+1 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ module LibItsCam_TestSystem {
            out
            out
                AcGnssPrimitive;
                AcGnssPrimitive;
            in
            in
                AcGnssResponse, AcGnssDistanceCovered;
                AcGnssResponse, AcGnssDistanceCovered, AcGnssTimeReached;
        } // end AdapterControlPort
        } // end AdapterControlPort
        
        
        /**
        /**
+11 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@ module LibItsCommon_Templates {
        
        
        template AcGnssDistanceCovered m_acGnssDistanceCovered := true;
        template AcGnssDistanceCovered m_acGnssDistanceCovered := true;
        
        
        template AcGnssTimeReached m_acGnssTimeReached := true;
        
        /**
        /**
         * @desc Testsystem will load GNSS scenario
         * @desc Testsystem will load GNSS scenario
         */
         */
@@ -70,6 +72,15 @@ module LibItsCommon_Templates {
            }
            }
        }
        }
        
        
        /**
         * @desc Testsystem will request indication if time was reached in running scenario
         */
        template AcGnssPrimitive m_timeInRunningScenario(integer p_time) := {
            timeInRunningScenario := {
                time := p_time
            }
        }
        
    } // end taPrimitives
    } // end taPrimitives
    
    
}
}
+14 −1
Original line number Original line Diff line number Diff line
@@ -98,7 +98,8 @@ module LibItsCommon_TypesAndValues {
            AcStopScenario stopScenario,
            AcStopScenario stopScenario,
            AcDistanceToCover distanceToCover,
            AcDistanceToCover distanceToCover,
            AcChangeSpeed changeSpeed,
            AcChangeSpeed changeSpeed,
            AcChangeHeading changeHeading
            AcChangeHeading changeHeading,
            AcTimeInRunningScenario timeInRunningScenario
        }
        }
        
        
        /**
        /**
@@ -111,6 +112,11 @@ module LibItsCommon_TypesAndValues {
         */
         */
        type boolean AcGnssDistanceCovered;
        type boolean AcGnssDistanceCovered;
        
        
        /**
         * @desc    Primitive for receiving an indication if requested time was reached from TA
         */
        type boolean AcGnssTimeReached;
        
        /**
        /**
         * @desc    Primitive for loading a scenario
         * @desc    Primitive for loading a scenario
         * @member  scenario   Scenario to load
         * @member  scenario   Scenario to load
@@ -159,6 +165,13 @@ module LibItsCommon_TypesAndValues {
            HeadingValue deltaHeading
            HeadingValue deltaHeading
        }
        }
        
        
        /**
         * @desc Primitive to inform when given time in the running scenario was reached
         */
        type record AcTimeInRunningScenario {
            integer time
        }
        
    } // end acPrimitives
    } // end acPrimitives
    with {
    with {
        encode "AdapterControl"
        encode "AdapterControl"
+30 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,10 @@ module LibItsDenm_Functions {
    // LibCommon
    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_Sync all;
    import from LibCommon_VerdictControl all;
    import from LibCommon_VerdictControl all;
    import from LibCommon_Time { modulepar PX_TNOAC ; function f_sleep };
    import from LibCommon_Time {
        modulepar PX_TNOAC;
        function f_sleep;
    }
    
    
    // LibItsCommon
    // LibItsCommon
    import from LibItsCommon_Templates all;
    import from LibItsCommon_Templates all;
@@ -313,6 +316,32 @@ module LibItsDenm_Functions {
            return v_ret;
            return v_ret;
        } // end f_acAwaitDistanceCovered
        } // end f_acAwaitDistanceCovered
        
        
        function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsDenm return FncRetCode {
            var FncRetCode v_ret := e_success;
            
            if (PICS_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
                f_acTriggerGnssEvent(m_timeInRunningScenario(p_time));
                
                tc_ac.start;
                alt {
                    [] acPort.receive(m_acGnssTimeReached) {
                        tc_ac.stop;
                    }
                    [] acPort.receive {
                        tc_ac.stop;
                        log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
                        f_selfOrClientSyncAndVerdict("error", e_error);
                    }
                    [] tc_ac.timeout {
                        log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***");
                        f_selfOrClientSyncAndVerdict("error", e_timeout);
                    }
                }
                
            }
            return v_ret;
        } // end f_acAwaitTimeInRunningScenario
        
    } // End of group adapterControl
    } // End of group adapterControl


    group denmConfigurationFunctions {
    group denmConfigurationFunctions {
Loading