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

Ut templates corrected

parent 26fa816b
......@@ -103,7 +103,6 @@ module LibItsDcc_Functions {
repeat;
}
}
}
/**
......@@ -160,6 +159,37 @@ module LibItsDcc_Functions {
} // 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
/**
......@@ -184,7 +214,8 @@ module LibItsDcc_Functions {
var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
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_tOff := p_tOff;
......@@ -202,7 +233,7 @@ module LibItsDcc_Functions {
p_channel,
true)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower != p_requestedTxPower)
{setverdict(fail)}
tc_tOff.start;
......@@ -214,12 +245,12 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST,
p_requestedTxPower,
p_dCCProfileIdentifier));
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
v_frameRequestedCount := v_frameRequestedCount + 1;
repeat;
}
[] tc_testDuration.timeout {
if(v_frameUnacknowledgedCount == 0)
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
else
{tc_tOff.start;
......@@ -228,10 +259,12 @@ module LibItsDcc_Functions {
p_channel,
true)) -> value v_inSta {
tc_tOff.stop;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if((v_inSta.achievedSendPower != p_requestedTxPower)
or (v_frameUnacknowledgedCount != 0))
or (v_frameAcknowledgedCount != v_frameRequestedCount))
{setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
......@@ -262,7 +295,8 @@ module LibItsDcc_Functions {
var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
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_tOff := p_tOff;
......@@ -280,7 +314,7 @@ module LibItsDcc_Functions {
p_channel,
true)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower >= p_maxTxPower)
{setverdict(fail)}
tc_tOff.start;
......@@ -292,12 +326,12 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST,
p_requestedTxPower,
p_dCCProfileIdentifier));
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
v_frameRequestedCount := v_frameRequestedCount + 1;
repeat;
}
[] tc_testDuration.timeout {
if(v_frameUnacknowledgedCount == 0)
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
else
{tc_tOff.start;
......@@ -306,10 +340,12 @@ module LibItsDcc_Functions {
p_channel,
true)) -> value v_inSta {
tc_tOff.stop;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if((v_inSta.achievedSendPower >= p_maxTxPower)
or (v_frameUnacknowledgedCount != 0))
or (v_frameAcknowledgedCount != v_frameRequestedCount))
{setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
......@@ -390,7 +426,8 @@ module LibItsDcc_Functions {
var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
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;
timer tc_testDuration := p_testDuration;
......@@ -409,7 +446,7 @@ module LibItsDcc_Functions {
p_channel,
true)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
v_frameSent := true;
tc_tOff.start;
repeat;
......@@ -419,7 +456,7 @@ module LibItsDcc_Functions {
p_channel,
false)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
v_frameDropped := true;
tc_tOff.start;
repeat;
......@@ -430,14 +467,14 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST,
p_requestedTxPower,
p_dCCProfileIdentifier));
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
v_frameRequestedCount := v_frameRequestedCount + 1;
repeat;
}
[] tc_testDuration.timeout {
if(not v_frameSent and v_frameDropped)
{setverdict(fail)}
if(v_frameUnacknowledgedCount == 0)
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
else
{tc_tOff.start;
......@@ -446,9 +483,11 @@ module LibItsDcc_Functions {
p_channel,
?)) -> value v_inSta {
tc_tOff.stop;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
if(v_frameUnacknowledgedCount != 0)
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_frameAcknowledgedCount != v_frameRequestedCount)
{setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
......@@ -479,7 +518,8 @@ module LibItsDcc_Functions {
var integer v_commandReference := float2int(int2float(c_maxCommandReference)*rnd());
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;
timer tc_testDuration := p_testDuration;
......@@ -498,7 +538,7 @@ module LibItsDcc_Functions {
p_channel_1,
true)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
v_channel_1 := true;
tc_tOff.start;
repeat;
......@@ -508,7 +548,7 @@ module LibItsDcc_Functions {
p_channel_2,
true)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
v_channel_2 := true;
tc_tOff.start;
repeat;
......@@ -519,14 +559,14 @@ module LibItsDcc_Functions {
PIXIT_REFERENCE_BURST,
p_requestedTxPower,
p_dCCProfileIdentifier));
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount + 1;
v_frameRequestedCount := v_frameRequestedCount + 1;
repeat;
}
[] tc_testDuration.timeout {
if(not v_channel_1 and v_channel_2)
{setverdict(fail)}
if(v_frameUnacknowledgedCount == 0)
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
else
{tc_tOff.start;
......@@ -535,9 +575,11 @@ module LibItsDcc_Functions {
?,
true)) -> value v_inSta {
tc_tOff.stop;
v_frameUnacknowledgedCount := v_frameUnacknowledgedCount - 1;
if(v_frameUnacknowledgedCount != 0)
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_frameAcknowledgedCount != v_frameRequestedCount)
{setverdict(fail)}
else
{setverdict(pass)}
}
[] 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 group inFunctions
} // End of module LibItsDcc_Functions
\ No newline at end of file
......@@ -11,33 +11,41 @@ module LibItsDcc_Templates {
// LibIts
import from LibItsDcc_TypesAndValues all;
import from LibItsDcc_TestSystem all;
/**
* @desc Templates used to trigger actions at the Upper Tester
* and to capture indication message sent by the IUT on the radio interface
*/
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
*/
template UtRadioInitialize m_utRadioInitialize :=
template UtRadioInitialize m_utRadioInitialize :=
{
}// End m_utRadioInitialize
/**
* @desc UtRadioEvent Primitive template
*/
template UtRadioEvent m_utRadioEvent(template ChannelState p_cch,
template ChannelState p_sch1,
template ChannelState p_sch2,
template ChannelState p_sch3,
template ChannelState p_sch4) :=
{cchChannelState := p_cch,
sch1ChannelState := p_sch1,
sch2ChannelState := p_sch2,
sch3ChannelState := p_sch3,
sch4ChannelState := p_sch4
}// End m_utRadioEvent
template (value) UtTrigger m_utRadioEvent(template (omit) ChannelState p_cch,
template (omit) ChannelState p_sch1 := omit,
template (omit) ChannelState p_sch2 := omit,
template (omit) ChannelState p_sch3 := omit,
template (omit) ChannelState p_sch4 := omit) :=
{utRadioEvent:= {cchChannelState := p_cch,
sch1ChannelState := p_sch1,
sch2ChannelState := p_sch2,
sch3ChannelState := p_sch3,
sch4ChannelState := p_sch4
}}// End m_utRadioEvent
/**
* @desc UtRadioCommandIndication Primitive template
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment