Newer
Older
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
var float v_genCam_max;
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
t_genCam_measure.start;
log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble("error", e_timeout);
}
}
f_utTriggerEvent(m_changeSpeed(1000));
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
var float v_measured := t_genCam_measure.read;
tc_ac.stop;
v_genCam_min := v_measured * 0.9;
v_genCam_max := v_measured * 1.1;
log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdictPreamble("error", e_timeout);
}
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
t_genCam_min.start(v_genCam_min);
t_genCam_max.start(v_genCam_max);
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
if (t_genCam_min.running) {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
t_genCam_max.stop;
log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
}
[] t_genCam_min.timeout {
repeat;
}
[] t_genCam_max.timeout {
log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSD_GFQ_BV_07
} // end group camGenerationFrequency
} // end group camMessageDissemination
group camMessageProcessing {
/**
* @desc Check that content of received CAM is transmitted to
* applications and other facilities.
* <pre>
* Pics Selection: PICS_CANRECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a valid CAM
* }
* then {
* the IUT forwards the CAM content to upper layers
* and the IUT forwards the CAM content to other facilities
* }
* }
* </pre>
*
* @version 0.0.2
* @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSP/BV-01
* @reference ETSI EN 302 637-2 , clause 4.2.2
*/
testcase TC_CAM_MSP_BV_01() runs on ItsCam system ItsCamSystem {
// Local variables
var CamReq v_camReq;
// Test control
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_camReq := valueof(
m_camReq(
m_camMsg_vehicle(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
)
);
camPort.send( v_camReq ) ;
f_utCheckEvent(m_checkLdm(v_camReq.msgOut));
log("*** " & testcasename() & ": PASS: CAM message received at LDM ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
// Postamble
f_poDefault();
f_cfDown();
} // end TC_CAM_MSP_BV_01
} // end group camMessageProcessing
} // end ItsCam_TestCases