Commit 3db7a1b3 authored by schmitting's avatar schmitting
Browse files

Ut templates corrected

parent 26fa816b
Loading
Loading
Loading
Loading
+71 −29
Original line number Original line Diff line number Diff line
@@ -103,7 +103,6 @@ module LibItsDcc_Functions {
                    repeat; 
                    repeat; 
                }
                }
            }
            }
        
        }
        }
        
        
        /**
        /**
@@ -160,6 +159,37 @@ module LibItsDcc_Functions {
        
        
        } // End of function f_utCommandIndication
        } // End of function f_utCommandIndication
    
    
        /**
         * @desc Receive frames via the radio link and check that all frames are sent with
         *       the requested Tx power and inter-packet spacing on the chosen channel 
         * @param   p_testDuration         Overall test duration
         * @param   p_tOff                 Requested Toff value
         * @param   p_requestedTxPower     Requested Tx send power value
         * @param   p_dCCProfileIdentifier Requested DCC profile
         * @param   p_channel              Channel on which the frame has been sent
         */
        function f_ut_AllRequestedFramesSent(float   p_testDuration,
                                             float   p_tOff,
                                             ChannelState p_cch,
                                             ChannelState p_sch1,
                                             ChannelState p_sch2,
                                             ChannelState p_sch3, 
                                             ChannelState p_sch4,
                                             integer p_requestedTxPower,
                                             Channel p_channel) runs on UtComp {
            
            var integer v_frameReceivedCount := 0;
            
            timer tc_testDuration := p_testDuration;
            timer tc_tOff := p_tOff;
            
            // Initialize radio equipment
            f_utInitializeIut(m_utInitialize(m_utRadioInitialize));
            // Put channel(s) into defined state
            f_utTriggerEvent(m_utRadioEvent(p_cch, p_sch1, p_sch2, p_sch3, p_sch4));

            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        } // End of function f_ut_AllRequestedFramesSent
    } // End of group utFunctions
    } // End of group utFunctions


    /**
    /**
@@ -184,7 +214,8 @@ module LibItsDcc_Functions {
            
            
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var InSta v_inSta;
            var InSta v_inSta;
            var integer v_frameUnacknowledgedCount := 1;
            var integer v_frameRequestedCount := 1;
            var integer v_frameAcknowledgedCount := 0;
            
            
            timer tc_testDuration := p_testDuration;
            timer tc_testDuration := p_testDuration;
            timer tc_tOff := p_tOff;
            timer tc_tOff := p_tOff;
@@ -202,7 +233,7 @@ module LibItsDcc_Functions {
                                               p_channel,
                                               p_channel,
                                               true)) -> value v_inSta {
                                               true)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    if(v_inSta.achievedSendPower != p_requestedTxPower)
                    if(v_inSta.achievedSendPower != p_requestedTxPower)
                       {setverdict(fail)}
                       {setverdict(fail)}
                    tc_tOff.start;
                    tc_tOff.start;
@@ -214,12 +245,12 @@ module LibItsDcc_Functions {
                                PIXIT_REFERENCE_BURST,
                                PIXIT_REFERENCE_BURST,
                                p_requestedTxPower,
                                p_requestedTxPower,
                                p_dCCProfileIdentifier));
                                p_dCCProfileIdentifier));
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
                    v_frameRequestedCount := v_frameRequestedCount + 1;
                    repeat;
                    repeat;
                }
                }
                                               
                                               
                [] tc_testDuration.timeout {
                [] tc_testDuration.timeout {
                    if(v_frameUnacknowledgedCount == 0)
                    if(v_frameAcknowledgedCount == v_frameRequestedCount)
                       {setverdict(pass)}
                       {setverdict(pass)}
                    else
                    else
                      {tc_tOff.start;
                      {tc_tOff.start;
@@ -228,10 +259,12 @@ module LibItsDcc_Functions {
                                                         p_channel,
                                                         p_channel,
                                                         true)) -> value v_inSta {
                                                         true)) -> value v_inSta {
                              tc_tOff.stop;
                              tc_tOff.stop;
                              v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                              v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                              if((v_inSta.achievedSendPower != p_requestedTxPower)
                              if((v_inSta.achievedSendPower != p_requestedTxPower)
                                 or (v_frameUnacknowledgedCount != 0))
                                or (v_frameAcknowledgedCount != v_frameRequestedCount))
                                 {setverdict(fail)}
                                 {setverdict(fail)}
                              else
                                 {setverdict(pass)}
                          }
                          }
                          
                          
                          [] tc_tOff.timeout {
                          [] tc_tOff.timeout {
@@ -262,7 +295,8 @@ module LibItsDcc_Functions {
            
            
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var InSta v_inSta;
            var InSta v_inSta;
            var integer v_frameUnacknowledgedCount := 1;
            var integer v_frameRequestedCount := 1;
            var integer v_frameAcknowledgedCount := 0;
            
            
            timer tc_testDuration := p_testDuration;
            timer tc_testDuration := p_testDuration;
            timer tc_tOff := p_tOff;
            timer tc_tOff := p_tOff;
@@ -280,7 +314,7 @@ module LibItsDcc_Functions {
                                               p_channel,
                                               p_channel,
                                               true)) -> value v_inSta {
                                               true)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    if(v_inSta.achievedSendPower >= p_maxTxPower)
                    if(v_inSta.achievedSendPower >= p_maxTxPower)
                       {setverdict(fail)}
                       {setverdict(fail)}
                    tc_tOff.start;
                    tc_tOff.start;
@@ -292,12 +326,12 @@ module LibItsDcc_Functions {
                                PIXIT_REFERENCE_BURST,
                                PIXIT_REFERENCE_BURST,
                                p_requestedTxPower,
                                p_requestedTxPower,
                                p_dCCProfileIdentifier));
                                p_dCCProfileIdentifier));
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
                    v_frameRequestedCount := v_frameRequestedCount + 1;
                    repeat;
                    repeat;
                }
                }
                                               
                                               
                [] tc_testDuration.timeout {
                [] tc_testDuration.timeout {
                    if(v_frameUnacknowledgedCount == 0)
                    if(v_frameAcknowledgedCount == v_frameRequestedCount)
                       {setverdict(pass)}
                       {setverdict(pass)}
                    else
                    else
                      {tc_tOff.start;
                      {tc_tOff.start;
@@ -306,10 +340,12 @@ module LibItsDcc_Functions {
                                                         p_channel,
                                                         p_channel,
                                                         true)) -> value v_inSta {
                                                         true)) -> value v_inSta {
                              tc_tOff.stop;
                              tc_tOff.stop;
                              v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                              v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                              if((v_inSta.achievedSendPower >= p_maxTxPower)
                              if((v_inSta.achievedSendPower >= p_maxTxPower)
                                 or (v_frameUnacknowledgedCount != 0))
                                 or (v_frameAcknowledgedCount != v_frameRequestedCount))
                                 {setverdict(fail)}
                                 {setverdict(fail)}
                              else
                                 {setverdict(pass)}
                          }
                          }
                          
                          
                          [] tc_tOff.timeout {
                          [] tc_tOff.timeout {
@@ -390,7 +426,8 @@ module LibItsDcc_Functions {
            
            
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var InSta v_inSta;
            var InSta v_inSta;
            var integer v_frameUnacknowledgedCount := 1;
            var integer v_frameRequestedCount := 1;
            var integer v_frameAcknowledgedCount := 0;
            var boolean v_frameSent, v_frameDropped := false;
            var boolean v_frameSent, v_frameDropped := false;
            
            
            timer tc_testDuration := p_testDuration;
            timer tc_testDuration := p_testDuration;
@@ -409,7 +446,7 @@ module LibItsDcc_Functions {
                                               p_channel,
                                               p_channel,
                                               true)) -> value v_inSta {
                                               true)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    v_frameSent := true;
                    v_frameSent := true;
                    tc_tOff.start;
                    tc_tOff.start;
                    repeat;
                    repeat;
@@ -419,7 +456,7 @@ module LibItsDcc_Functions {
                                               p_channel,
                                               p_channel,
                                               false)) -> value v_inSta {
                                               false)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    v_frameDropped := true;
                    v_frameDropped := true;
                    tc_tOff.start;
                    tc_tOff.start;
                    repeat;
                    repeat;
@@ -430,14 +467,14 @@ module LibItsDcc_Functions {
                                PIXIT_REFERENCE_BURST,
                                PIXIT_REFERENCE_BURST,
                                p_requestedTxPower,
                                p_requestedTxPower,
                                p_dCCProfileIdentifier));
                                p_dCCProfileIdentifier));
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
                    v_frameRequestedCount := v_frameRequestedCount + 1;
                    repeat;
                    repeat;
                }
                }
                                               
                                               
                [] tc_testDuration.timeout {
                [] tc_testDuration.timeout {
                    if(not v_frameSent and v_frameDropped)
                    if(not v_frameSent and v_frameDropped)
                       {setverdict(fail)}
                       {setverdict(fail)}
                    if(v_frameUnacknowledgedCount == 0)
                    if(v_frameAcknowledgedCount == v_frameRequestedCount)
                       {setverdict(pass)}
                       {setverdict(pass)}
                    else
                    else
                      {tc_tOff.start;
                      {tc_tOff.start;
@@ -446,9 +483,11 @@ module LibItsDcc_Functions {
                                                         p_channel,
                                                         p_channel,
                                                         ?)) -> value v_inSta {
                                                         ?)) -> value v_inSta {
                              tc_tOff.stop;
                              tc_tOff.stop;
                              v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                              v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                              if(v_frameUnacknowledgedCount != 0)
                              if(v_frameAcknowledgedCount != v_frameRequestedCount)
                                 {setverdict(fail)}
                                 {setverdict(fail)}
                              else
                                 {setverdict(pass)}
                          }
                          }
                          
                          
                          [] tc_tOff.timeout {
                          [] tc_tOff.timeout {
@@ -479,7 +518,8 @@ module LibItsDcc_Functions {
            
            
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
            var InSta v_inSta;
            var InSta v_inSta;
            var integer v_frameUnacknowledgedCount := 1;
            var integer v_frameRequestedCount := 1;
            var integer v_frameAcknowledgedCount := 0;
            var boolean v_channel_1, v_channel_2 := false;
            var boolean v_channel_1, v_channel_2 := false;
            
            
            timer tc_testDuration := p_testDuration;
            timer tc_testDuration := p_testDuration;
@@ -498,7 +538,7 @@ module LibItsDcc_Functions {
                                               p_channel_1,
                                               p_channel_1,
                                               true)) -> value v_inSta {
                                               true)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    v_channel_1 := true;
                    v_channel_1 := true;
                    tc_tOff.start;
                    tc_tOff.start;
                    repeat;
                    repeat;
@@ -508,7 +548,7 @@ module LibItsDcc_Functions {
                                               p_channel_2,
                                               p_channel_2,
                                               true)) -> value v_inSta {
                                               true)) -> value v_inSta {
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                    v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                    v_channel_2 := true;
                    v_channel_2 := true;
                    tc_tOff.start;
                    tc_tOff.start;
                    repeat;
                    repeat;
@@ -519,14 +559,14 @@ module LibItsDcc_Functions {
                                PIXIT_REFERENCE_BURST,
                                PIXIT_REFERENCE_BURST,
                                p_requestedTxPower,
                                p_requestedTxPower,
                                p_dCCProfileIdentifier));
                                p_dCCProfileIdentifier));
                    v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
                    v_frameRequestedCount := v_frameRequestedCount + 1;
                    repeat;
                    repeat;
                }
                }
                                               
                                               
                [] tc_testDuration.timeout {
                [] tc_testDuration.timeout {
                    if(not v_channel_1 and v_channel_2)
                    if(not v_channel_1 and v_channel_2)
                       {setverdict(fail)}
                       {setverdict(fail)}
                    if(v_frameUnacknowledgedCount == 0)
                    if(v_frameAcknowledgedCount == v_frameRequestedCount)
                       {setverdict(pass)}
                       {setverdict(pass)}
                    else
                    else
                      {tc_tOff.start;
                      {tc_tOff.start;
@@ -535,9 +575,11 @@ module LibItsDcc_Functions {
                                                         ?,
                                                         ?,
                                                         true)) -> value v_inSta {
                                                         true)) -> value v_inSta {
                              tc_tOff.stop;
                              tc_tOff.stop;
                              v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
                              v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
                              if(v_frameUnacknowledgedCount != 0)
                              if(v_frameAcknowledgedCount != v_frameRequestedCount)
                                 {setverdict(fail)}
                                 {setverdict(fail)}
                              else
                                 {setverdict(pass)}
                          }
                          }
                          
                          
                          [] tc_tOff.timeout {
                          [] tc_tOff.timeout {
@@ -546,8 +588,8 @@ module LibItsDcc_Functions {
                      }     
                      }     
                }
                }
             }
             }
            f_selfOrClientSyncAndVerdict(c_prDone, e_success);
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        } // End of function f_iN_AllRequestedFramesSentOn2Channels
            
            
        } // End of function f_iN_AllRequestedFramesSentOn2Channels
    } // End of group inFunctions
    } // End of group inFunctions
} // End of module LibItsDcc_Functions
} // End of module LibItsDcc_Functions
 No newline at end of file
+21 −13
Original line number Original line Diff line number Diff line
@@ -11,12 +11,20 @@ module LibItsDcc_Templates {
    
    
    // LibIts
    // LibIts
    import from LibItsDcc_TypesAndValues all;
    import from LibItsDcc_TypesAndValues all;
    
    import from LibItsDcc_TestSystem all;
    /**
    /**
     * @desc Templates used to trigger actions at the Upper Tester
     * @desc Templates used to trigger actions at the Upper Tester
     * and to capture indication message sent by the IUT on the radio interface
     * and to capture indication message sent by the IUT on the radio interface
     */
     */
    group utPrimitives {
    group utPrimitives {
        /**
         * @desc Ut Initialize Primitive template
         */
        template UtInitialize m_utInitialize(template UtRadioInitialize p_utRadioInitialize) :=
           {
               utRadioInitialize := p_utRadioInitialize
           }// End m_utRadioInitialize
        
        /**
        /**
         * @desc UtRadioInitialize Primitive template
         * @desc UtRadioInitialize Primitive template
         */
         */
@@ -27,17 +35,17 @@ module LibItsDcc_Templates {
        /**
        /**
         * @desc UtRadioEvent Primitive template
         * @desc UtRadioEvent Primitive template
         */
         */
        template UtRadioEvent m_utRadioEvent(template ChannelState p_cch,
        template (value) UtTrigger m_utRadioEvent(template (omit) ChannelState p_cch,
                                             template ChannelState p_sch1,
                                                  template (omit) ChannelState p_sch1 := omit,
                                             template ChannelState p_sch2,
                                                  template (omit) ChannelState p_sch2 := omit,
                                             template ChannelState p_sch3, 
                                                  template (omit) ChannelState p_sch3 := omit, 
                                             template ChannelState p_sch4) := 
                                                  template (omit) ChannelState p_sch4 := omit) := 
           {cchChannelState  := p_cch,
           {utRadioEvent:= {cchChannelState  := p_cch,
                            sch1ChannelState := p_sch1,
                            sch1ChannelState := p_sch1,
                            sch2ChannelState := p_sch2,
                            sch2ChannelState := p_sch2,
                            sch3ChannelState := p_sch3,
                            sch3ChannelState := p_sch3,
                            sch4ChannelState := p_sch4
                            sch4ChannelState := p_sch4
           }// End m_utRadioEvent
           }}// End m_utRadioEvent
        
        
        /**
        /**
         * @desc UtRadioCommandIndication Primitive template
         * @desc UtRadioCommandIndication Primitive template