Newer
Older
// instruct adapter to use p_certName to sign message
if(e_success != f_acTriggerSecEvent(m_acEnableSecurity(p_certName))) {
log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***");
stop;
}
f_sleep(1.0);
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
v_referenceTime2 := f_getCurrentTime();
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, v_referenceTime2
),
p_situation2,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was treated as valid and was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was treated as invalid and was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_09_XX
function f_DEN_MSRV_BO_09_01 () runs on ItsDenm {
f_DEN_MSRV_BO_09_XX(
m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_unavailable_),
m_situation(CauseCodeType_trafficCondition_, TrafficConditionSubCauseCode_trafficJamIncreasing_)
);
}
function f_DEN_MSRV_BO_09_02 () runs on ItsDenm {
f_DEN_MSRV_BO_09_XX(
m_situation(CauseCodeType_accident_, AccidentSubCauseCode_unavailable_),
m_situation(CauseCodeType_accident_, AccidentSubCauseCode_multiVehicleAccident_)
);
/**
* @desc TP Function for TC_DEN_MSRV_BV_10
*/
function f_DEN_MSRV_BV_10() runs on ItsDenm {
//Local constants
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage (
m_denm ( m_denmMgmtCon ( m_tsActionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConImpactReduction ) );
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ), v_situation, mw_anyDenmLocation,
mw_alacarteConImpactReduction ) ) ) ) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM with correct alacarte container ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ) ) ) ) ) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM with incorrect containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM not rreceived ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_10
} // end denMessageReception
// 5.2.3
group denKeepAliveForwarding {
/**
* @desc TP Function for TC_DEN_KAFW_BV_01
*/
function f_DEN_KAFW_BV_01() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_forwarding.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
if(t_forwarding.running) {
t_forwarding.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] t_forwarding.timeout {
tc_ac.start;
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_01
/**
* @desc TP Function for TC_DEN_KAFW_BV_02
*/
function f_DEN_KAFW_BV_02() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
var ActionID v_actionId;
// Local timers
timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
v_referenceTime1
),
v_situation,
m_denmLocation_zeroDelta
)
);
// start KAF timer here, as 2nd DENM shall be ignored
t_forwarding.start;
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
v_referenceTime2
),
v_situation,
m_denmLocation_zeroDelta
)
);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, -, v_referenceTime1)
)
)
)
) {
if(t_forwarding.running) {
t_forwarding.stop;
log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
t_forwarding.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_forwarding.timeout {
tc_ac.start;
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_02
/**
* @desc TP Function for TC_DEN_KAFW_TI_03
*/
function f_DEN_KAFW_TI_03() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0;
timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15 /* from the spec */ + 0.1 /* processing time */;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_forwardingMin.start;
t_forwardingMax.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
t_forwardingMax.stop;
if(t_forwardingMin.running) {
t_forwardingMin.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] t_forwardingMin.timeout {
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] t_forwardingMax.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_TI_03
/**
* @desc TP Function for TC_DEN_KAFW_BV_04
*/
function f_DEN_KAFW_BV_04() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
),
f_getIutStationId()
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
),
mw_anyStationId
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_04
/**
* @desc TP Function for TC_DEN_KAFW_BV_05
*/
function f_DEN_KAFW_BV_05() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(mw_anyActionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_05
/**
* @desc TP Function for TC_DEN_KAFW_BV_06
*/
function f_DEN_KAFW_BV_06() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
v_referenceTime1
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, -, v_referenceTime1)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_06
/**
* @desc TP Function for TC_DEN_KAFW_BV_07
*/
function f_DEN_KAFW_BV_07() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
-,
-,
isNegation
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon ( v_actionId, - )
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon ( v_actionId, - )
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_07
/**
* @desc TP Function for TC_DEN_KAFW_BV_08
*/
function f_DEN_KAFW_BV_08() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 3 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta,
m_alacarteConLaneCount
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId),
v_situation,
m_denmLocation_zeroDelta,
m_alacarteConLaneCount
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_08
/**
* @desc TP Function for TC_DEN_KAFW_BV_09
*/
function f_DEN_KAFW_BV_09() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 3 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_validity.start;
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
if(t_validity.running) {
log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***");
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
repeat;
}
else {
log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
if(t_validity.running) {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
else {
log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
}
}
[] t_validity.timeout {
log("*** " & testcasename() & ": INFO: End of validity period ***");
repeat;
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_09
/**
* @desc TP Function for TC_DEN_KAFW_BV_10
*/
function f_DEN_KAFW_BV_10() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var boolean v_positionChanged := false;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 5 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
if(v_positionChanged == false) {
log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***");
f_utChangePosition(m_utChangePosition(1000, 0));
v_positionChanged := true;
tc_ac.start;
repeat;
}
else {
log("*** " & testcasename() & ": FAIL: DENM was re-forwarded ***");
f_utChangePosition(m_utChangePosition(-1000, 0));
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
if(v_positionChanged == false) {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
else {
log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***");
f_utChangePosition(m_utChangePosition(-1000, 0));