Commit 0928ab44 authored by garciay's avatar garciay
Browse files

Start validation of TD_AUTO_IOT_DENM_RWW_BV_01

parent b24ca1e2
......@@ -50,10 +50,32 @@ module ItsAutoInterop_Pics {
*/
modulepar UInt32 PICS_DENM_ITS_AID := 37;
/**
* @desc Z1-D1-EP/POS1
*/
modulepar ThreeDLocation PICS_Z1_D1_EP := {
latitude := 435525352, // Z1-D1-EP/latitude
longitude := 103003415 // Z1-D1-EP/longitude
}; // End of c_PICS_Z1_D1_EP
longitude := 103003415, // Z1-D1-EP/longitude
elevation := 0
}; // End of PICS_Z1_D1_EP
/**
* @desc Z1-D2-EP/POS2
*/
modulepar ThreeDLocation PICS_Z1_D2_EP := {
latitude := 435519107, // Z1-D2-EP/latitude
longitude := 102993930, // Z1-D2-EP/longitude
elevation := 0
}; // End of PICS_Z1_D2_EP
/**
* @desc Z1-D3-EP/POS3
*/
modulepar ThreeDLocation PICS_Z1_D3_EP := {
latitude := 435513421, // Z1-D3-EP/latitude
longitude := 102986038, // Z1-D3-EP/longitude
elevation := 0
}; // End of PICS_Z1_D3_EP
/**
* @desc Absolute coordinate for position 0
......
......@@ -12,21 +12,6 @@ module ItsAutoInterop_Pixits {
*/
modulepar charstring PX_CAPTURE_MODE := "on-link"; // TODO Change it into boolean
/**
* @desc The PCAP file name containing the ITS G5 captures
*/
modulepar charstring PX_PCAP_FILE_NAME := "g5capture.pcap";
/**
* @desc The PCAP filtering to apply
*/
modulepar charstring PX_PCAP_MIDs_FILTER := "00:00:00:00:00:01;00:00:00:00:00:02";
/**
* @desc The PCAP frame offsets to skip when starting to play the PCAP file
*/
modulepar UInt32 PX_PCAP_START_OFFSET := 0;
/**
* EUTs descriptions
*/
......
......@@ -94,53 +94,28 @@ module ItsAutoInterop_Templates {
} // End of template mw_denm_stationId
/**
* @desc Receive template for the destinationArea which indicates the TARGET_GEOAREA
* @param p_gnAddress GN_Address to be contained in the long position vector
* @desc Dummy template for long position vector
*/
template (present) LongPosVector mw_longPosVector_targetArea(
template (present) Int32 p_latitude := ?,
template (present) Int32 p_longitude := ?
) := {
latitude := p_latitude,
longitude := p_longitude
} // End of template mw_longPosVector_targetArea
template (present) LongPosVector mw_dummyLongPosVector := {
gnAddr := mw_gnAddressMid(?),
timestamp_ := ?,
latitude := ?,
longitude := ?,
pai := ?,
speed := ?,
heading := ?
}
/**
* @desc Receive template for GeoNetworking DENM Packet
* @param p_sourceLongPosVec Source position vector of destination
* @param p_hopLimit Sequence number of GeoUnicast packet
* @param p_nextHeader Expected next header
* @param p_denm Expected DEN message
* @desc Receive template for the destinationArea which indicates the TARGET_GEOAREA
* @param p_gnAddress GN_Address to be contained in the long position vector
*/
template (present) GnNonSecuredPacket mw_geoNwTsbPacketWithNextHeader_denm(
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_sourceLongPosVec := ?,
template (value) NextHeader p_nextHeader,
template (present) DENM p_denm := ?,
template (present) UInt8 p_hopLimit := ?
) modifies mw_geoNwTsbPacketWithNextHeader := {
commonHeader := mw_commonHeaderWithHopLimit(
p_nextHeader,
m_shbHeaderType,
p_hopLimit
),
payload := ?/*TODO Check DENM in TC{
decodedPayload := {
btpPacket := mw_btpB(
PICS_DENM_BTP_DESTINATION_PORT,
PICS_DENM_BTP_SOURCE_PORT,
{
decodedPayload := {
denmPacket := p_denm
},
rawPayload := ?
}
)
},
rawPayload := ?
}*/
} // End of template mw_geoNwTsbPacketWithNextHeader_denm
template (present) LongPosVector mw_longPosVector(
template (value) ThreeDLocation p_position
) modifies mw_dummyLongPosVector := { // TODO use mw_longPosVectorAny instead of mw_dummyLongPosVector
latitude := valueof(p_position.latitude),
longitude := valueof(p_position.longitude)
} // End of template mw_longPosVector
/**
* @desc Receive template for GeoNetworking CAM Packet
......
......@@ -132,6 +132,8 @@ module TestCodec_ChainOfCertificates {
} else {
setverdict(pass)
}
// TODO Create a chain of certificates
// TODO Add encryption support
......@@ -232,6 +234,8 @@ module TestCodec_ChainOfCertificates {
setverdict(pass)
}
// TODO Create a chain of certificates
// TODO Add encryption support
} // End of testcase tc_full_check_certificate_2
......@@ -325,7 +329,7 @@ module TestCodec_ChainOfCertificates {
var bitstring v_enc_msg := ''B;
// Generate Private/Public keys
f_generate_key_pair_nistp256(p_ca_sec_info.private_key, p_ca_sec_info.public_key_x, p_ca_sec_info.public_key_y);
f_generate_key_pair_brainpoolp256(p_ca_sec_info.private_key, p_ca_sec_info.public_key_x, p_ca_sec_info.public_key_y);
// Store Private key in binary format
// Fill Certificate template with the public key
v_cert := m_etsiTs103097Certificate(
......@@ -451,7 +455,7 @@ module TestCodec_ChainOfCertificates {
var bitstring v_enc_msg := ''B;
// Generate Private/Public keys
f_generate_key_pair_nistp256(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y);
f_generate_key_pair_brainpoolp256(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y);
// Store Private key in binary format
// Fill Certificate template with the public key
v_cert := m_etsiTs103097Certificate(
......
......@@ -1038,12 +1038,13 @@ module TestCodec_GeoNetworking {
var AcGnResponse v_acGnResponse;
var GeoNetworkingReq v_gnReq;
var ExtendedHeader v_header;
var boolean v_got_beacon := false;
var boolean v_got_beacon := false; // Used with xxx_61_beacon pcap file
var boolean v_got_shb := false; // Used with xxx_61_cam pcap file
var LongPosVector v_longPosVectorIut;
var GeoNetworkingInd v_msg;
if (PX_GN_UPPER_LAYER != e_any) {
setverdict(inconc, "PX_GN_UPPER_LAYER shall be set to e_any");
if ((PX_GN_UPPER_LAYER != e_any) and (PX_GN_UPPER_LAYER != e_btpA)) {
setverdict(inconc, "PX_GN_UPPER_LAYER shall be set to e_any when using xxx_61_beacon or e_btpA when using xxx_61_cam");
stop;
}
......@@ -1076,7 +1077,7 @@ module TestCodec_GeoNetworking {
f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader));
v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast( // Not compliant with PX_GN_UPPER_LAYER, just for test
v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast(
m_geoNwPdu(
m_geoNwBroadcastPacket(
m_dummyLongPosVectorNodeB,
......@@ -1108,13 +1109,26 @@ module TestCodec_GeoNetworking {
)))));
repeat;
}
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwShbPacket(?)
)
)) -> value v_msg {
log("Receive SHB packet: ", v_msg.msgIn);
if (v_got_shb == false) {
v_got_shb := true;
setverdict(pass);
}
repeat;
}
[] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwBeaconPacket(?)
)
)) -> value v_msg {
log("Receive beacon: ", v_msg.msgIn);
log("Receive beacon packet: ", v_msg.msgIn);
if (v_got_beacon == false) {
v_got_beacon := true;
setverdict(pass);
......@@ -1125,11 +1139,11 @@ module TestCodec_GeoNetworking {
mw_geoNwInd(
?
)) -> value v_msg {
log("Receive beacon: ", v_msg.msgIn);
log("Receive unexpected GeoNetworking message: ", v_msg.msgIn);
setverdict(fail);
}
[] tc_ac.timeout {
if (v_got_beacon == false) {
if ((v_got_beacon == false) and (v_got_shb == false)) {
setverdict(inconc, "Expected messages not received");
}
}
......
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