Commit 7e2d249d authored by berge's avatar berge
Browse files

Introduced new verdict management in BTP

parent b35be984
Loading
Loading
Loading
Loading
+36 −12
Original line number Original line Diff line number Diff line
@@ -8,10 +8,39 @@
 
 
 module LibItsBtp_Functions {
 module LibItsBtp_Functions {
     
     
    // LibCommon
    import from LibCommon_Sync all;
    import from LibCommon_VerdictControl all;
    
    // LibIts
    import from LibIts_Interface all;
    import from LibIts_Interface all;
    import from LibItsBtp_TypesAndValues all;    
    import from LibItsBtp_TypesAndValues all;    
    import from LibCommon_VerdictControl all;
     
     
    group configurationFunctions {
        
        /**
         * @desc    Setups default configuration   
         */
        function f_cfUp() runs on ItsNt {
            
            map(self:utPort, system:utPort);
            map(self:btpPort, system:btpPort);
            f_connect4SelfOrClientSync();
            
        } // end f_cfUp
        
        /**
         * @desc    Deletes default configuration 
         */
        function f_cfDown() runs on ItsNt {
            
            unmap(self:utPort, system:utPort);
            unmap(self:btpPort, system:btpPort);
            f_disconnect4SelfOrClientSync();
            
        } // end f_cfDown
        
    } // end configurationFunctions
    
    
    group preambles {
    group preambles {
        
        
@@ -22,7 +51,6 @@
            
            
            f_utInitializeIut();
            f_utInitializeIut();


            setverdict(pass);
        }
        }
        
        
    } // end of group preambles    
    } // end of group preambles    
@@ -39,15 +67,13 @@
            tc_ac.start;
            tc_ac.start;
            alt {
            alt {
                [] utPort.receive(UtBtpResult:true) {
                [] utPort.receive(UtBtpResult:true) {
                    setverdict (pass, "*** f_utInitializeIut: PASS: IUT initialized ***");
                    log("*** f_utInitializeIut: INFO: IUT initialized ***");
                }
                }
                [] utPort.receive {
                [] utPort.receive {
                    setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized ***");
                    f_selfOrClientSyncAndVerdict("error", e_error, "*** IUT could not be initialized ***");
                    stop;
                }
                }
                [] tc_ac.timeout {
                [] tc_ac.timeout {
                    setverdict (inconc, "*** f_utInitializeIut: INCONC: IUT could not be initialized in time ***");
                    f_selfOrClientSyncAndVerdict("error", e_timeout, "*** IUT could not be initialized in time ***");
                    stop;
                }
                }
            }
            }
            
            
@@ -80,16 +106,14 @@
            tc_ac.start;
            tc_ac.start;
            alt {
            alt {
                [] utPort.receive(UtBtpResult:true) {
                [] utPort.receive(UtBtpResult:true) {
                    setverdict (pass, "*** f_utCheckEvent: PASS: Event correctly indicated at application layer ***");
                    v_ret := e_success;
                    v_ret := e_success;
                }
                }
                [] utPort.receive {
                [] utPort.receive {
                    setverdict (fail, "*** f_utCheckEvent: FAIL: Event not correctly indicated at application layer ***");
                    v_ret := e_error;
                    v_ret := e_error;
                }
                }
                [] tc_ac.timeout {
                [] tc_ac.timeout {
                    setverdict (inconc, "*** f_utCheckEvent: INCONC: Timeout while waiting for event check result ***");
                    v_ret := e_timeout;
                    v_ret := e_timeout;
                    f_selfOrClientSyncAndVerdict("error", e_timeout, "*** Timeout while waiting for event check result ***");
                }
                }
            }
            }
            
            
+6 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,12 @@ module LibIts_Interface {
        
        
        group adapterComponent {
        group adapterComponent {
            
            
            type component ItsAdapterComponent extends ClientSyncComp {
            /**
             * @desc
             * @remark  SelfSyncComp extends ClientSyncComp. 
             *          We can self-sync in a single-component setup or server-sync in a multi-component setup
             */
            type component ItsAdapterComponent extends SelfSyncComp {
                
                
                // Adapter ports
                // Adapter ports
                port UpperTesterPort utPort;
                port UpperTesterPort utPort;