Newer
Older
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
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
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
} // End of f_TC_AUTO_IOT_CAM_CRW_BV_02_eut
} // End of group g_TC_AUTO_IOT_CAM_CRW_BV_02
/**
* @desc Verify complete resolution of duplicate address conflict scenario based on GN messages
* <pre>
* Pics Selection:
* Config Id: CF-01
* Initial conditions:
* with {
* EUT1 and EUT2 being configured with the same GN address
* and EUT1 and EUT2 being off-link
* }
* Expected behaviour:
* ensure that {
* when {
* EUT1 and EUT2 become on-link
* }
* then {
* EUT1 changes its GN address
* and EUT2 changes its GN address
* }
* when {
* EUT1 sends CA messages
* containing cam
* containing camParameters
* containing basicContainer
* containing referencePosition
* }
* then {
* EUT2 indicates EUT1 as neighbour
* }
* when {
* EUT2 sends CA messages
* containing cam
* containing camParameters
* containing basicContainer
* containing referencePosition
* }
* then {
* EUT1 indicates EUT2 as neighbour
* }
* }
* </pre>
*
* @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_GN_DAD_BV_01
* @reference ETSI EN 302 636-4-1 [2] Clause 9.2.1.5
*/
testcase TC_AUTO_IOT_GN_DAD_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem {
// Local variables
var ItsAutoInteropGeonetworking v_eut1 := null;
var ItsAutoInteropGeonetworking v_eut2 := null;
// Test control
/*if (not PICS_GN_LS_FWD) {
log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***");
setverdict(inconc);
stop;
}*/
// Test component configuration
f_mtcCf02Up(v_eut1, v_eut2);
// Preamble
// Start components
v_eut1.start(f_TC_AUTO_IOT_GN_DAD_BV_01_eut(v_eut1, PX_EUT1_ID, PX_EUT2_ID));
v_eut2.start(f_TC_AUTO_IOT_GN_DAD_BV_01_eut(v_eut2, PX_EUT2_ID, PX_EUT1_ID));
// Synchronization
f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone});
// Cleanup
f_mtcCf02Down(v_eut1, v_eut2);
} // End of TC_AUTO_IOT_GN_DAD_BV_01
group g_TC_AUTO_IOT_GN_DAD_BV_01 {
/**
* @desc Behavior function for EUTs (TC_AUTO_IOT_GN_DAD_BV_01)
*/
function f_TC_AUTO_IOT_GN_DAD_BV_01_eut(
in ItsAutoInteropGeonetworking p_eut,
in integer p_eut_id,
in integer p_eut_id_neighbour
) runs on ItsAutoInteropGeonetworking {
// Local variables
var GeoNetworkingInd v_gnInd;
var GN_Address v_gnAddr;
var boolean v_getFirstCam := false;
var HmiNeighborEventInds v_hmiNeighborEventInds;
// Test component configuration
f_cfPtcUp(p_eut);
// Preamble
f_prDefault();
// EUT1 and EUT2 become on-link
ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true});
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[v_getFirstCam == false] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwShbPacketWithNextHeader_cam(
?,
?,
e_btpB,
mw_cam_stationId(
-,
PX_EUT_DESC[p_eut_id].stationId
))))) -> value v_gnInd { // Receive a CAM message
v_gnAddr := v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector.gnAddr;
v_getFirstCam := true;
// Re-send CAM message to the other EUTs
eutGeoNetworkingPort.send(
m_forward_geoNetworkingInd(
v_gnInd
));
repeat;
}
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwShbPacketWithNextHeader_cam(
mw_longPosVectorAny(
? /* FIXME complement(
v_gnAddr
)*/),
?,
e_btpB,
mw_cam_stationId(
-,
PX_EUT_DESC[p_eut_id].stationId
))))) -> value v_gnInd { // Receive a CAM message
// Re-send CA message to the other EUTs
eutGeoNetworkingPort.send(
m_forward_geoNetworkingInd(
v_gnInd
));
tc_wait.stop;
log("*** " & testcasename() & ": INFO: GN duplicated address conflict resolved ***");
hmiPort.clear;
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: GN duplicate address conflict scenario is incomplete ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
tc_ac.start;
alt { // Check neighbours
[] hmiPort.receive(
HmiNeighborEventInds:?
) -> value v_hmiNeighborEventInds {
var boolean v_found := false;
tc_ac.stop;
for (var integer v_i := 0; v_i < lengthof(v_hmiNeighborEventInds); v_i := v_i + 1) {
if (
(PX_EUT_DESC[p_eut_id_neighbour].mid == v_hmiNeighborEventInds[v_i].mid) and
(PX_EUT_DESC[p_eut_id_neighbour].stationId == v_hmiNeighborEventInds[v_i].stationId)
) {
v_found := true;
break; // Got it, leave the loop
} // else, continue
} // End of 'for' statement
if (v_found) {
log("*** " & testcasename() & ": PASS: GN duplicate address conflict scenario compeleted for EUT ", PX_EUT_DESC[p_eut_id].stationId, "***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: GN duplicate address conflict scenario is incomplete ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poDefault();
f_cfPtcDown(p_eut);
} // End of f_TC_AUTO_IOT_GN_DAD_BV_01_eut
} // End of group g_TC_AUTO_IOT_GN_DAD_BV_01
} // End of module AtsInterop_TestCases