Commit 075d89e1 authored by garciay's avatar garciay
Browse files

Add AcSecPrimitive/AcSecResponse support for CAM & DENM

parent 4c3c7dfe
......@@ -19,15 +19,17 @@ module ItsCam_TpFunctions {
// LibItsCommon
import from LibItsCommon_Pixits all;
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
// LibItsCAM
import from LibItsCam_TestSystem all;
import from LibItsCam_Functions all;
import from LibItsCam_Templates all;
import from LibItsCam_TypesAndValues all;
import from LibItsCam_Pics {modulepar all;}
import from LibItsCam_Pics {modulepar all;}
import from LibItsCam_Pixits {modulepar all;}
// ASN.1
import from ITS_Container language "ASN.1:1997" all;
......@@ -56,8 +58,8 @@ module ItsCam_TpFunctions {
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
......@@ -2994,37 +2996,38 @@ module ItsCam_TpFunctions {
group camGenerationSSP{
function f_CAM_MSD_SSP_BO_XX(
in Oct8 p_certHashedId8,
in template(value) UtCamTrigger p_utEvent,
in template(present) CAM pmw_CamMsg
in Oct8 p_certHashedId8,
in template(value) UtCamTrigger p_utEvent,
in template(present) CAM pmw_CamMsg
) runs on ItsCam {
// Local variables
// Test control
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_CAM_GENERATION) {
log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
f_acTriggerSecEvent(m_setAtCertificate("")); // TODO Set constants for the certificate names
// Preamble
// TODO: initialize IUT with given certificate
f_prInitialState( e_staticPosition, true, {
hashedId8 := p_certHashedId8
});
hashedId8 := p_certHashedId8
});
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// execute UT Command
......@@ -3051,14 +3054,14 @@ module ItsCam_TpFunctions {
} // end f_CAM_MSD_SSP_BO_XX
function f_CAM_MSD_SSP_BO_01() runs on ItsCam {
// TODO: make template for tolling
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
function f_CAM_MSD_SSP_BO_01() runs on ItsCam {
// TODO: make template for tolling
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
stop;
} // end f_CAM_MSD_SSP_BO_01
} // end f_CAM_MSD_SSP_BO_01
function f_CAM_MSD_SSP_BO_02() runs on ItsCam {
......@@ -3067,24 +3070,24 @@ module ItsCam_TpFunctions {
& ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true");
}
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_02,
m_setVehicleRole(c_vehicleRole_publicTransport),
mw_camMsg_SVC ( mw_publicTransport_any )
);
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_02,
m_setVehicleRole(c_vehicleRole_publicTransport),
mw_camMsg_SVC ( mw_publicTransport_any )
);
} // end f_CAM_MSD_SSP_BO_02
function f_CAM_MSD_SSP_BO_03() runs on ItsCam {
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) {
testcase.stop(testcasename()
& ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true");
}
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_03,
m_setVehicleRole(c_vehicleRole_specialTransport),
mw_camMsg_SVC ( mw_specialTransport_any )
);
f_CAM_MSD_SSP_BO_XX(PX_CERT_IUT_CAM_03,
m_setVehicleRole(c_vehicleRole_specialTransport),
mw_camMsg_SVC ( mw_specialTransport_any )
);
} // end f_CAM_MSD_SSP_BO_03
}
......@@ -3149,15 +3152,15 @@ module ItsCam_TpFunctions {
} // end f_CAM_MSP_BV_01
group camProcessingSSP{
/**
* @desc TP Function for TC_CAM_MSP_SSP_BV_XX
* @param p_certName Certificate to be used to sign the CAM message
* @param p_camMsg CAM value template to be sent to IUT
*/
function f_CAM_MSP_SSP_BV_XX(
in charstring p_certName,
in template (value) CAM p_camMsg
in charstring p_certName,
in template (value) CAM p_camMsg
) runs on ItsCam {
// Local variables
......@@ -3165,11 +3168,11 @@ module ItsCam_TpFunctions {
var integer i;
// Test control
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_CAM_RECEPTION) {
log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
......@@ -3190,7 +3193,7 @@ module ItsCam_TpFunctions {
// Test Body
v_camReq := valueof(
m_camReq(
p_camMsg
p_camMsg
)
);
camPort.send( v_camReq ) ;
......@@ -3215,7 +3218,7 @@ module ItsCam_TpFunctions {
} // end f_CAM_MSP_SSP_BV_XX
function f_CAM_MSP_SSP_BV_01() runs on ItsCam {
// TODO: make template for tolling
log("*** " & testcasename() & ": This TC is not implemented yet ***");
setverdict(inconc);
......@@ -3224,23 +3227,23 @@ module ItsCam_TpFunctions {
function f_CAM_MSP_SSP_BV_02() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_02",
m_camMsg_publicTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_02",
m_camMsg_publicTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
function f_CAM_MSP_SSP_BV_03() runs on ItsCam {
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_03",
m_camMsg_specialTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
f_CAM_MSP_SSP_BV_XX("CERT_TS_CAM_03",
m_camMsg_specialTransport(
f_getTsStationId(),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
m_tsPosition
)
);
} // end f_CAM_MSP_SSP_BV_03
}// end group camProcessingSSP
......
......@@ -14,17 +14,22 @@ module ItsDenm_TpFunctions {
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from LibItsCommon_Functions all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
// LibIts
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
// LibItsDenm
import from LibItsDenm_TestSystem all;
import from LibItsDenm_Functions all;
import from LibItsDenm_Templates all;
import from LibItsDenm_TypesAndValues all;
import from LibItsDenm_Pics all;
import from LibItsDenm_Pixits all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
// 5.2.1
group denMessageTransmission {
......@@ -2319,6 +2324,7 @@ module ItsDenm_TpFunctions {
f_cfUp();
// Test adapter configuration
f_acTriggerSecEvent(m_setAtCertificate("")); // TODO Set constants for the certificate names
// Preamble
f_prInitialState(e_staticPosition, {
......
Markdown is supported
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