Commit 1a88482d authored by tepelmann's avatar tepelmann
Browse files

Added initial state trigger handling.

parent 07f20d56
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
         */
        function f_prInitialState() {
            
            // TODO: any specific action ?
            f_utInitialzeIUT();
            
            setverdict(pass);
        }
@@ -31,6 +31,30 @@

    group upperTester {
        
        /**
         * @desc    Requests to bring the IUT in an initial state
         * @return 
         */
        function f_utInitialzeIUT() runs on ItsNt {
            
            utPort.send(UtBtpInitialize:{});
            tc_ac.start;
            alt {
                [] utPort.receive(UtBtpResult:true) {
                    setverdict (pass, "IUT initialized");
                }
                [] utPort.receive {
                    setverdict (inconc, "IUT could not be initialized");
                    stop;
                }
                [] tc_ac.timeout {
                    setverdict (inconc, "IUT could not be initialized in time");
                    stop;
                }
            }
            
        }
        
        /**
         * @desc    Triggers event from the application layer
         * @param   p_event The event to trigger.
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ module LibItsBtp_TypesAndValues {

    group utPrimitives {
        
        type record UtBtpInitialize {
        }
        
        type record UtBtpTrigger {
            UtBtpEvent utEvent
        }
+28 −2
Original line number Diff line number Diff line
@@ -53,12 +53,14 @@ module LibItsCam_Functions {
         * @desc    Initialize the IUT
         * @remark  No specific actions specified in the base standard
         */    
        function f_initialState() runs on ItsFa {
        function f_prInitialState() runs on ItsFa {
            
            // basic default altstep
            activate(a_basicDefault());
                      
        } // end f_initialState
            f_utInitialzeIUT();
            
        } // end f_prInitialState
    
    } // end of preambles

@@ -102,6 +104,30 @@ module LibItsCam_Functions {

    group upperTester {
    
        /**
         * @desc    Requests to bring the IUT in an initial state
         * @return 
         */
        function f_utInitialzeIUT() runs on ItsNt {
            
            utPort.send(UtCamInitialize:{});
            tc_ac.start;
            alt {
                [] utPort.receive(UtCamResult:true) {
                    setverdict (pass, "IUT initialized");
                }
                [] utPort.receive {
                    setverdict (inconc, "IUT could not be initialized");
                    stop;
                }
                [] tc_ac.timeout {
                    setverdict (inconc, "IUT could not be initialized in time");
                    stop;
                }
            }
            
        }
        
        /**
         * @desc    Triggers event from the application layer
         * @param   p_event The event to trigger.
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ module LibItsCam_TypesAndValues {

    group utPrimitives {
        
        type record UtCamInitialize {
        }
        
        type record UtCamTrigger {
            UtCamEvent utEvent
        }
+27 −3
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ module LibItsDenm_Functions {
            
            f_prDefault();
            
            //TODO raise action or send message via port
            f_utInitialzeIUT();
            
            f_setVerdictPreOrPostamble(v_ret);
            
@@ -150,7 +150,31 @@ module LibItsDenm_Functions {
        
    } // end group postambles
    
    group eventFunctions {
    group upperTester {
        
        /**
         * @desc    Requests to bring the IUT in an initial state
         * @return 
         */
        function f_utInitialzeIUT() runs on ItsNt {
            
            utPort.send(UtDenmInitialize:{});
            tc_ac.start;
            alt {
                [] utPort.receive(UtDenmResult:true) {
                    setverdict (pass, "IUT initialized");
                }
                [] utPort.receive {
                    setverdict (inconc, "IUT could not be initialized");
                    stop;
                }
                [] tc_ac.timeout {
                    setverdict (inconc, "IUT could not be initialized in time");
                    stop;
                }
            }
            
        }
        
        /**
         * @desc Triggers event from the application layer
@@ -195,7 +219,7 @@ module LibItsDenm_Functions {
            return v_ret;
        }
        
    } // end group eventFunctions
    } // end group upperTester
    
    group sendFunctions {
        
Loading