Commit 97cca237 authored by tepelmann's avatar tepelmann
Browse files

Updated TC_G5B_SCH3_07.

Added TC_G5B_SCH3_12.

Updated channel check and log f_iN_AllRequestedFramesSentOn2Channels.
Added f_rRX_ExpectedFramesSentOn2Channels.
parent 821ab361
......@@ -86,15 +86,15 @@ module LibItsDcc_Functions {
alt {
[] utPort.receive(UtResult:true) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
log("*** " & __SCOPE__ & ": INFO: IUT initialized ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT could not be initialized ***");
log("*** " & __SCOPE__ & ": INFO: IUT could not be initialized ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
log("*** " & __SCOPE__ & ": INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
......@@ -113,15 +113,15 @@ module LibItsDcc_Functions {
alt {
[] utPort.receive(UtResult:true) {
tc_wait.stop;
log("*** f_utTriggerEvent: INFO: Event sccessfully triggered ***");
log("*** " & __SCOPE__ & ": INFO: Event sccessfully triggered ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utTriggerEvent: INFO: Event could not be triggered ***");
log("*** " & __SCOPE__ & ": INFO: Event could not be triggered ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utTriggerEvent: INFO: Event could not be triggered in time ***");
log("*** " & __SCOPE__ & ": INFO: Event could not be triggered in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
......@@ -133,6 +133,7 @@ module LibItsDcc_Functions {
} // End of group utFunctions
group rrxFunctions {
/**
* @desc Receive frames via the radio link and check that all expected frames are sent with
* the requested Tx power and inter-packet spacing on the chosen channel
......@@ -162,17 +163,17 @@ module LibItsDcc_Functions {
[] rrxPort.receive(m_rrxInd(p_channel, ?)) -> value v_rrxInd {
v_frameReceivedCount := v_frameReceivedCount + 1;
if(match(v_rrxInd.measuredPower, m_expectedPowerWithDelta) and p_checkPower)
{ log("*** function f_rRX_AllRequestedFramesSent: FAIL: The measured Tx power is different to the requested Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The measured Tx power is different to the requested Tx power. ***");
setverdict(fail)}
tc_tOffCheck.start;
alt {
[] rrxPort.receive(m_rrxInd(p_channel, ?)) -> value v_rrxInd {
v_frameReceivedCount := v_frameReceivedCount + 1;
if(match(v_rrxInd.measuredPower, m_expectedPowerWithDelta) and p_checkPower)
{ log("*** function f_rRX_AllRequestedFramesSent: FAIL: The measured Tx power is different to the requested Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The measured Tx power is different to the requested Tx power. ***");
setverdict(fail)}
if(tc_tOffCheck.read < p_tOff)
{ log("*** function f_rRX_AllRequestedFramesSent: FAIL: The inter-packet spacing time interval is smaller than the minimum allowed. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The inter-packet spacing time interval is smaller than the minimum allowed. ***");
setverdict(fail)}
tc_tOffCheck.start;
repeat;
......@@ -186,7 +187,96 @@ module LibItsDcc_Functions {
}
}
[] tc_testDuration.timeout {
log("*** function f_rRX_AllRequestedFramesSent: FAIL: No packet received on the radio interface. ***");
log("*** function " & __SCOPE__ & ": FAIL: No packet received on the radio interface. ***");
setverdict(fail)
}
}
checkPort.send(v_frameReceivedCount);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_rRX_ExpectedFramesSent
/**
* @desc Receive frames via the radio link and check that all expected frames are sent with
* the requested Tx power and inter-packet spacing on the chosen channels
* @param p_tOff Requested Toff value
* @param p_expectedTxPower Expected Tx send power value
* @param p_channel_1 Channel on which the frame has been sent
* @param p_channel_2 Channel on which the frame has been sent
* @param p_checkPower If true, the power of the received signal will be checked
*/
function f_rRX_ExpectedFramesSentOn2Channels(float p_tOff,
integer p_expectedTxPower,
Channel p_channel_1,
Channel p_channel_2,
boolean p_checkPower := true) runs on ItsRrxDcc {
var RrxInd v_rrxInd;
var integer v_frameReceivedCount := 0;
var boolean v_channel_1, v_channel_2 := false;
template integer m_expectedPowerWithDelta := ((p_expectedTxPower - PIXIT_POWER_DELTA) .. (p_expectedTxPower + PIXIT_POWER_DELTA));
timer tc_testDuration := f_getTestDuration(p_tOff) + p_tOff;
timer tc_tOffCheck := 2.0 * p_tOff;
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
tc_testDuration.start;
alt {
[] rrxPort.receive(m_rrxInd((p_channel_1, p_channel_2), ?)) -> value v_rrxInd {
v_frameReceivedCount := v_frameReceivedCount + 1;
select (v_rrxInd.channel) {
case (p_channel_1) {
v_channel_1 := true;
}
case (p_channel_2) {
v_channel_2 := true;
}
}
if(match(v_rrxInd.measuredPower, m_expectedPowerWithDelta) and p_checkPower)
{ log("*** function " & __SCOPE__ & ": FAIL: The measured Tx power is different to the requested Tx power. ***");
setverdict(fail)}
tc_tOffCheck.start;
alt {
[] rrxPort.receive(m_rrxInd((p_channel_1, p_channel_2), ?)) -> value v_rrxInd {
v_frameReceivedCount := v_frameReceivedCount + 1;
select (v_rrxInd.channel) {
case (p_channel_1) {
v_channel_1 := true;
}
case (p_channel_2) {
v_channel_2 := true;
}
}
if(match(v_rrxInd.measuredPower, m_expectedPowerWithDelta) and p_checkPower)
{ log("*** function " & __SCOPE__ & ": FAIL: The measured Tx power is different to the requested Tx power. ***");
setverdict(fail)}
if(tc_tOffCheck.read < p_tOff)
{ log("*** function " & __SCOPE__ & ": FAIL: The inter-packet spacing time interval is smaller than the minimum allowed. ***");
setverdict(fail)}
tc_tOffCheck.start;
repeat;
}
[] tc_tOffCheck.timeout {
tc_tOffCheck.start;
repeat;
}
[] tc_testDuration.timeout {
if(not v_channel_1 and not v_channel_2) {
log("*** function " & __SCOPE__ & ": FAIL: All frames have been sent via the two channel. ***");
setverdict(fail);
}
else {
setverdict(pass);
}
}
}
}
[] tc_testDuration.timeout {
log("*** function " & __SCOPE__ & ": FAIL: No packet received on the radio interface. ***");
setverdict(fail)
}
}
......@@ -210,7 +300,7 @@ module LibItsDcc_Functions {
alt {
[] rrxPort.receive(m_rrxInd(?, ?)) {
log("*** function f_rRX_NoFramesSent: FAIL: A radio frame was received when none was expected. ***");
log("*** function " & __SCOPE__ & ": FAIL: A radio frame was received when none was expected. ***");
setverdict(fail)
}
[] tc_testDuration.timeout {
......@@ -264,7 +354,7 @@ module LibItsDcc_Functions {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower != p_requestedTxPower)
{ log("*** function f_iN_AllRequestedFramesSent: FAIL: The achieved Tx power is different to the requested Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The achieved Tx power is different to the requested Tx power. ***");
setverdict(fail)}
tc_tOff.start;
repeat;
......@@ -291,17 +381,17 @@ module LibItsDcc_Functions {
tc_tOff.stop;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower != p_requestedTxPower)
{ log("*** function f_iN_AllRequestedFramesSent: FAIL: The achieved Tx power is different to the requested Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The achieved Tx power is different to the requested Tx power. ***");
setverdict(fail)}
else if(v_frameAcknowledgedCount != v_frameRequestedCount)
{ log("*** function f_iN_AllRequestedFramesSent: FAIL: Not all requested frames have been acknowledged. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
log("*** function f_iN_AllRequestedFramesSent: FAIL: Not all requested frames have been acknowledged. ***");
log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)
}
}
......@@ -351,7 +441,7 @@ module LibItsDcc_Functions {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower >= p_maxTxPower)
{ log("*** function f_iN_FramesSentTxPowerReduction: FAIL: The achieved Tx power is higher than the maximum allowed Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The achieved Tx power is higher than the maximum allowed Tx power. ***");
setverdict(fail)}
tc_tOff.start;
repeat;
......@@ -378,17 +468,17 @@ module LibItsDcc_Functions {
tc_tOff.stop;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_inSta.achievedSendPower >= p_maxTxPower)
{ log("*** function f_iN_FramesSentTxPowerReduction: FAIL: The achieved Tx power is higher than the maximum allowed Tx power. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: The achieved Tx power is higher than the maximum allowed Tx power. ***");
setverdict(fail)}
else if(v_frameAcknowledgedCount != v_frameRequestedCount)
{ log("*** function f_iN_FramesSentTxPowerReduction: FAIL: Not all requested frames have been acknowledged. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
log("*** function f_iN_FramesSentTxPowerReduction: FAIL: Not all requested frames have been acknowledged. ***");
log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)
}
}
......@@ -430,7 +520,7 @@ module LibItsDcc_Functions {
?)) -> value v_inSta {
v_commandReference := (v_commandReference + 1) mod c_maxCommandReference;
if(v_inSta.transmissionSuccessStatus)
{ log("*** function f_iN_AllRequestedFramesDropped: FAIL: A frame that should have been dropped is achnowledged as successfully sent. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: A frame that should have been dropped is achnowledged as successfully sent. ***");
setverdict(fail)}
tc_tOff.start;
repeat;
......@@ -516,7 +606,7 @@ module LibItsDcc_Functions {
[] tc_testDuration.timeout {
if(not v_frameSent and v_frameDropped)
{ log("*** function f_iN_SomeRequestedFramesSent: FAIL: There are either no sent frames or no dropped frames acknowledged. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: There are either no sent frames or no dropped frames acknowledged. ***");
setverdict(fail)}
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
......@@ -531,14 +621,14 @@ module LibItsDcc_Functions {
if(v_inSta.transmissionSuccessStatus)
{ v_frameSentCount := v_frameSentCount + 1;}
if(v_frameAcknowledgedCount != v_frameRequestedCount)
{ log("*** function f_iN_SomeRequestedFramesSent: FAIL: Not all requested frames have been acknowledged. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
log("*** function f_iN_SomeRequestedFramesSent: FAIL: Not all requested frames have been acknowledged. ***");
log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)
}
}
......@@ -613,8 +703,8 @@ module LibItsDcc_Functions {
}
[] tc_testDuration.timeout {
if(not v_channel_1 and v_channel_2)
{ log("*** function f_iN_AllRequestedFramesSentOn2Channels: FAIL: All frames have been sent via the same channel. ***");
if(not v_channel_1 and not v_channel_2)
{ log("*** function " & __SCOPE__ & ": FAIL: All frames have been sent via the two channel. ***");
setverdict(fail)}
if(v_frameAcknowledgedCount == v_frameRequestedCount)
{setverdict(pass)}
......@@ -627,14 +717,14 @@ module LibItsDcc_Functions {
tc_tOff.stop;
v_frameAcknowledgedCount := v_frameAcknowledgedCount + 1;
if(v_frameAcknowledgedCount != v_frameRequestedCount)
{ log("*** function f_iN_AllRequestedFramesSentOn2Channels: FAIL: Not all requested frames have been acknowledged. ***");
{ log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)}
else
{setverdict(pass)}
}
[] tc_tOff.timeout {
log("*** function f_iN_AllRequestedFramesSentOn2Channels: FAIL: Not all requested frames have been acknowledged. ***");
log("*** function " & __SCOPE__ & ": FAIL: Not all requested frames have been acknowledged. ***");
setverdict(fail)
}
}
......
......@@ -474,16 +474,26 @@ module LibItsDcc_Pixits {
}
/**
* @desc Give the content of Table 30.
* @desc Give the content of Table 30 (without SCH4 channel state).
* @see ETSI TS 102 917-2 Table 30
*/
//TODO SCH4!!!
modulepar ProfileTimeAspects PIXIT_TABLE_30_TC_G5B_SCH3_05_07 := {
{ 17, 5.0, 0.200 },
{ 18, 5.0, 0.200 },
{ 19, 2.0, 0.500 }
}
/**
* @desc Give the content of Table 30 (only SCH4 channel state).
* @remark All values have to be seen in the context together with PIXIT_TABLE_30_TC_G5B_SCH3_05_07.
* @see ETSI TS 102 917-2 Table 30
*/
modulepar ChannelStates PIXIT_TABLE_30_TC_G5B_SCH3_05_07_SCH4 := {
relaxed,
active,
restrictive
}
/**
* @desc Give the content of Table 31.
* @see ETSI TS 102 917-2 Table 31
......@@ -501,13 +511,23 @@ module LibItsDcc_Pixits {
* @desc Give the content of Table 32.
* @see ETSI TS 102 917-2 Table 32
*/
//TODO SCH4!!!
modulepar ProfileTimeAspects PIXIT_TABLE_32_TC_G5B_SCH3_10_12 := {
{ 17, 5.0, 0.200 },
{ 18, 5.0, 0.200 },
{ 19, 2.0, 0.500 }
}
/**
* @desc Give the content of Table 32 (only SCH4 channel state).
* @remark All values have to be seen in the context together with PIXIT_TABLE_30_TC_G5B_SCH3_05_07.
* @see ETSI TS 102 917-2 Table 32
*/
modulepar ChannelStates PIXIT_TABLE_32_TC_G5B_SCH3_10_12_SCH4 := {
relaxed,
active,
restrictive
}
/**
* @desc Give the content of Table 33.
* @see ETSI TS 102 917-2 Table 33
......
......@@ -168,6 +168,7 @@ module LibItsDcc_TypesAndValues {
type record of ChannelProfileAspect ChannelProfileAspects;
type record of ChannelState ChannelStates;
}
group Constants {
......
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