Commit faf5e0e9 authored by garciay's avatar garciay
Browse files

Add AcSecPrimitive/AcSecResponse support for CAM & DENM

parent 692cf76e
......@@ -95,13 +95,13 @@ module LibItsCam_Functions {
tc_wait.stop;
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
//f_sleep(0.050); // 50 ms
repeat;
}
repeat;
}
}
}
......@@ -109,6 +109,34 @@ module LibItsCam_Functions {
group adapterControl {
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerSecEvent(template (value) AcSecPrimitive p_event) runs on ItsCam return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acSecResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
......@@ -302,9 +330,9 @@ module LibItsCam_Functions {
* @remark No specific actions specified in the base standard
*/
function f_prInitialState(
Scenario p_scenario := e_staticPosition,
boolean p_awaitInitialCAM := true,
template (value) UtInitialize p_init := m_camInitialize
Scenario p_scenario := e_staticPosition,
boolean p_awaitInitialCAM := true,
template (value) UtInitialize p_init := m_camInitialize
) runs on ItsCam {
f_utInitializeIut(p_init);
......
......@@ -31,9 +31,9 @@ module LibItsCam_TestSystem {
*/
type port AdapterControlPort message {
out
AcGnssPrimitive;
AcGnssPrimitive, AcSecPrimitive;
in
AcGnssResponse, AcGnssDistanceCovered;
AcGnssResponse, AcGnssDistanceCovered, AcSecResponse;
} // end AdapterControlPort
/**
......
......@@ -14,6 +14,15 @@ module LibItsCommon_Templates {
group taPrimitives {
template (value) AcSecResponse m_acSecResponseSuccess := true;
template (value) AcSecPrimitive m_setAtCertificate(
in charstring p_atCertifcate) := {
acSetAtCertificate := {
atCertificateName := p_atCertifcate
}
}
template AcGnssResponse m_acGnssResponseSuccess := true;
template AcGnssDistanceCovered m_acGnssDistanceCovered := true;
......
......@@ -85,6 +85,28 @@ module LibItsCommon_TypesAndValues {
group acPrimitives {
/**
* @desc TA primitives for security support
* @member acSetCertificate Set the AT certificate to be used by the TA
*/
type union AcSecPrimitive {
AcSetAtCertificate acSetAtCertificate
} // End of type AcSecPrimitive
/**
* @desc Describes the AT certificate to be used by the TA
* @member atCertificateName The AT certificate name
*/
type record AcSetAtCertificate {
charstring atCertificateName
} // End of type AcSetAtCertificate
/**
* @desc Primitive for receiving response from TA
*/
type boolean AcSecResponse;
/**
* @desc TA primitives for DENM
* @member loadScenario -
......
......@@ -210,6 +210,34 @@ module LibItsDenm_Functions {
group adapterControl {
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerSecEvent(template (value) AcSecPrimitive p_event) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acSecResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
......@@ -391,9 +419,10 @@ module LibItsDenm_Functions {
* @desc Brings the IUT into an initial state.
* @return FncRetCode
*/
function f_prInitialState(Scenario p_scenario := e_staticPosition,
template (value) UtInitialize p_denmInitialize := m_denmInitialize
) runs on ItsDenm return FncRetCode {
function f_prInitialState(
in Scenario p_scenario := e_staticPosition,
in template (value) UtInitialize p_denmInitialize := m_denmInitialize
) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
f_utInitializeIut(p_denmInitialize);
......
......@@ -31,9 +31,9 @@ module LibItsDenm_TestSystem {
*/
type port AdapterControlPort message {
out
AcGnssPrimitive;
AcGnssPrimitive, AcSecPrimitive;
in
AcGnssResponse, AcGnssDistanceCovered;
AcGnssResponse, AcGnssDistanceCovered, AcSecResponse;
} // end AdapterControlPort
/**
......
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