Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 1869 → Rev 1870

/branches/Security/ttcn/AtsCAM/ItsCam_TestCases.ttcn
3845,14 → 3845,13
// Test Body
t_genCam_Dcc.timeout;
v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue);
f_utTriggerEvent(
m_changePosition(
valueof(UtChangePosition: {
latitude := v_referencePosition.latitude,
longitude := v_referencePosition.longitude,
elevation := 0 // FIXME := v_referencePosition.altitude
}
)));
f_utChangePosition(
valueof(UtChangePosition: {
latitude := v_referencePosition.latitude,
longitude := v_referencePosition.longitude,
elevation := 0 // FIXME := v_referencePosition.altitude
}
));
t_genCam_Dcc.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){
4126,7 → 4125,7
);
camPort.send( v_camReq ) ;
f_utCheckEvent(m_checkLdm(v_camReq.msgOut));
// f_utCheckEvent(m_checkLdm(v_camReq.msgOut));
log("*** " & testcasename() & ": PASS: CAM message received at LDM ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
/branches/Security/ttcn/AtsDENM/ItsDenm_TestCases.ttcn
1444,7 → 1444,7
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration_10sec));
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec));
f_awaitDenMessage(
mw_denmInd(
mw_denmPdu(
1451,7 → 1451,7
mw_denm(
mw_denmMgmtCon(
mw_anyActionId, -, -, -,
c_validityDuration_2sec
c_duration_2sec
)
)
)
1471,10 → 1471,7
mw_denmPdu(
mw_denm (
mw_denmMgmtCon(
v_actionId,
-,
-,
true
v_actionId
)
)
)
1571,9 → 1568,7
mw_denmPdu(
mw_denm (
mw_denmMgmtCon(
v_actionId,
-,
true
v_actionId
)
)
)
1663,7 → 1658,10
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId, -, -, -, -, -,
m_tsActionId,
-,
-,
-,
v_referenceTime1
),
v_situation,
1676,7 → 1674,10
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId, -, -, -, -, -,
m_tsActionId,
-,
-,
-,
v_referenceTime2
),
v_situation,
1694,10 → 1695,14
mw_denmInd(
mw_denmPdu(
mw_denm (
mw_denmMgmtCon(
v_actionId,
v_referenceTime2,
true
m_denmMgmtConTermination(
v_actionId,
-,
-,
-,
-,
v_referenceTime2,
isNegation
)
)
)
1772,7 → 1777,7
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration_10sec));
f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec));
f_awaitDenMessage(
mw_denmInd(
mw_denmPdu(
1797,11 → 1802,10
mw_denmInd(
mw_denmPdu(
mw_denm (
mw_denmMgmtCon(
m_denmMgmtConTermination(
v_actionId,
-,
-,
true
-, -, -, -, -,
isCancellation
),
omit,
omit
1900,10 → 1904,10
mw_denmInd(
mw_denmPdu(
mw_denm (
mw_denmMgmtCon(
m_denmMgmtConTermination(
v_actionId,
-,
true
-, -, -, -, -,
isNegation
),
omit,
omit
2198,11 → 2202,11
testcase TC_DEN_EVRP_BV_01() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_1sec;
const float c_lowerTransmissionInterval := int2float(c_transmissionInterval)*0.95;
const float c_upperTransmissionInterval := int2float(c_transmissionInterval)*1.05;
const ValidityDuration c_repetitionDuration := c_validityDuration;
const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1
const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2
const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1
const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
2212,9 → 2216,7
mw_actionId,
-,
-,
-,
c_validityDuration,
c_transmissionInterval
c_validityDuration
)
)
)
2238,12 → 2240,12
v_situation,
m_denmLocation_zeroDelta,
c_validityDuration,
c_transmissionInterval,
c_repetitionDuration,
c_repetitionDuration
)
);
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_repetition.start(2.0 * int2float(c_transmissionInterval/1000));
t_repetition.start(2.0 * int2float(c_repetitionInterval/1000));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
2251,7 → 2253,7
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) {
if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
2313,11 → 2315,11
testcase TC_DEN_EVRP_BV_02() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_5sec;
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_5sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
const float c_lowerTransmissionInterval := int2float(c_transmissionInterval)*0.95;
const float c_upperTransmissionInterval := int2float(c_transmissionInterval)*1.05;
const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
2327,9 → 2329,7
mw_actionId,
-,
-,
-,
c_validityDuration,
c_transmissionInterval
c_validityDuration
)
)
)
2353,8 → 2353,8
v_situation,
m_denmLocation_zeroDelta,
c_validityDuration,
c_transmissionInterval,
c_repetitionDuration
c_repetitionDuration,
c_repetitionInterval
)
);
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
2367,13 → 2367,13
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
v_expectedDenmInd.msgIn.denm.situation := v_situation;
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_repetition.start(2.0 * int2float(c_transmissionInterval/1000));
t_repetition.start(2.0 * int2float(c_repetitionInterval/1000));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) {
if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
2436,8 → 2436,8
testcase TC_DEN_EVRP_BV_03() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_4sec;
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_4sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
2448,9 → 2448,7
mw_actionId,
-,
-,
-,
c_validityDuration,
c_transmissionInterval
c_validityDuration
)
)
)
2475,7 → 2473,7
v_situation,
m_denmLocation_zeroDelta,
c_validityDuration,
c_transmissionInterval,
c_repetitionDuration,
c_repetitionDuration
)
);
2484,7 → 2482,7
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
//await retransmitted DENM message based on the transmission interval in between the validity duration
for (i:=0; i<(c_validityDuration/(c_transmissionInterval/1000)); i:=i+1) {
for (i:=0; i<(c_validityDuration/(c_repetitionInterval/1000)); i:=i+1) {
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
2551,9 → 2549,9
testcase TC_DEN_EVRP_BV_04() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_2sec;
const ValidityDuration c_repetitionDuration := c_repetitionDuration_5sec;
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_2sec;
const ValidityDuration c_repetitionDuration := c_duration_5sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
2563,9 → 2561,7
mw_actionId,
-,
-,
-,
c_validityDuration,
c_transmissionInterval
c_validityDuration
)
)
)
2590,7 → 2586,7
v_situation,
m_denmLocation_zeroDelta,
c_validityDuration,
c_transmissionInterval,
c_repetitionDuration,
c_repetitionDuration
)
);
2599,7 → 2595,7
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
//await retransmitted DENM message based on the transmission interval in between the repetition duration
for (i:=0; i<(c_repetitionDuration/(c_transmissionInterval/1000)); i:=i+1) {
for (i:=0; i<(c_repetitionDuration/(c_repetitionInterval/1000)); i:=i+1) {
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
2662,7 → 2658,7
testcase TC_DEN_EVRP_BV_05() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const ValidityDuration c_validityDuration := c_duration_10sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
2769,8 → 2765,8
testcase TC_DEN_EVRP_BV_06() runs on ItsDenm system ItsDenmSystem {
// Local constants
const ValidityDuration c_validityDuration := c_validityDuration_10sec;
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_2sec;
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_2sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
2781,8 → 2777,7
-,
-,
-,
c_validityDuration,
c_transmissionInterval
c_validityDuration
)
)
)
3002,7 → 2997,7
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, -, -,
-, -, -,
v_referenceTime2
),
v_situation2,
3082,9 → 3077,7
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
true
m_tsActionId
),
v_situation,
m_denmLocation_zeroDelta
3163,8 → 3156,7
m_denmMgmtCon(
m_actionId(
f_increaseSequenceNumber(v_actionId.sequenceNumber)
),
true
)
),
v_situation,
m_denmLocation_zeroDelta
3250,7 → 3242,7
m_denm(
m_denmMgmtCon(
m_tsActionId,
-, -, -, -, -,
-, -, -, -,
v_referenceTime1
),
v_situation1,
3263,7 → 3255,7
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, -, -,
-, -, -,
v_referenceTime2
),
v_situation2,
3358,7 → 3350,7
v_denm := m_denm(
m_denmMgmtCon(
m_tsActionId,
-, - ,- ,-,
-, - ,-,
v_detectionTime1,
v_referenceTime1
),
3373,8 → 3365,8
m_denm(
m_denmMgmtCon(
v_actionId,
-, - ,- ,-,
v_detectionTime2,
-, - ,-,
v_detectionTime2,
v_referenceTime1
),
v_situation2,
3468,7 → 3460,7
v_denm := m_denm(
m_denmMgmtCon(
m_tsActionId,
-, - ,- ,-,
-, - ,-,
v_detectionTime1,
v_referenceTime1
),
3483,7 → 3475,7
m_denm(
m_denmMgmtCon(
v_actionId,
-, - ,- ,-,
-, - ,-,
v_detectionTime2,
v_referenceTime1
),
3554,7 → 3546,7
testcase TC_DEN_KAFW_BV_01() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
3578,7 → 3570,6
m_denmMgmtCon(
m_tsActionId,
-,
-,
c_transmissionInterval * 3,
c_transmissionInterval
),
3672,7 → 3663,7
testcase TC_DEN_KAFW_BV_02() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
3698,10 → 3689,8
m_denmMgmtCon(
m_tsActionId,
-,
-,
c_transmissionInterval * 3,
c_transmissionInterval,
-,
v_referenceTime1
),
v_situation,
3717,10 → 3706,8
m_denmMgmtCon(
m_tsActionId,
-,
-,
c_transmissionInterval * 3,
c_transmissionInterval,
-,
v_referenceTime2
),
v_situation,
3811,7 → 3798,7
testcase TC_DEN_KAFW_BV_03() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
3923,7 → 3910,7
testcase TC_DEN_KAFW_BV_04() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
4034,7 → 4021,7
testcase TC_DEN_KAFW_BV_05() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
4146,7 → 4133,7
testcase TC_DEN_KAFW_BV_06() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
4169,10 → 4156,8
m_denmMgmtCon(
m_tsActionId,
-,
-,
c_transmissionInterval * 3,
c_transmissionInterval,
-,
v_referenceTime1
),
v_situation,
4261,7 → 4246,7
testcase TC_DEN_KAFW_BV_07() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
4282,7 → 4267,6
m_denm(
m_denmMgmtCon(
m_tsActionId,
false,
-,
c_transmissionInterval * 3,
c_transmissionInterval
4298,7 → 4282,9
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, -, false)
mw_denmMgmtCon(
v_actionId
)
)
)
)
4311,7 → 4297,9
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, -, true)
mw_denmMgmtCon(
v_actionId
)
)
)
)
4379,7 → 4367,7
testcase TC_DEN_KAFW_BV_08() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
4489,7 → 4477,7
testcase TC_DEN_KAFW_BV_09() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;
4601,7 → 4589,7
testcase TC_DEN_KAFW_BV_10() runs on ItsDenm system ItsDenmSystem {
//Local constants
const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec;
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var ActionID v_actionId;