Commit 0824db85 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

Merge branch 'Test_architecture_improvement' of https://git.onem2m.org/TST/ATS...

Merge branch 'Test_architecture_improvement' of https://git.onem2m.org/TST/ATS into Test_architecture_improvement
parents 0adaf86c 5e832b5c
......@@ -417,6 +417,9 @@ module OneM2M_Functions {
function f_cse_preamble_subscriptionVerification(out AeSimu p_ae2,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu {
if(p_resourceType == int23){
p_ae2 := AeSimu.create("AE2") alive;
map(p_ae2:mcaPort, system:mcaPort);
map(p_ae2:mcaPortIn, system:mcaPortIn);
//TODO shall be unmapped?
p_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
p_ae2.done;
p_ae2Index := f_getResource(p_ae2);
......@@ -546,6 +549,43 @@ module OneM2M_Functions {
}
/**
@desc
*/
function f_getRequestPrimitive(in AeSimu p_ae) runs on Tester return RequestPrimitive {
var RequestPrimitive v_request;
f_connectInfoPort(p_ae);
p_ae.start(f_sendRequestPrimitive());
alt {
[]infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request {
}
}
f_disconnectInfoPort(p_ae);
return v_request;
}
function f_getRemoteCseRequestPrimitive(in CseSimu p_cse) runs on Tester return RequestPrimitive {
var RequestPrimitive v_request;
f_connectInfoPort(p_cse);
p_cse.start(f_sendRemoteCseRequestPrimitive());
alt {
[]infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request {
}
}
f_disconnectInfoPort(p_cse);
return v_request;
}
/**
@desc
......@@ -619,6 +659,18 @@ module OneM2M_Functions {
}
function f_sendRequestPrimitive() runs on AeSimu {
infoPort.send(vc_request.primitive.requestPrimitive);
}
function f_sendRemoteCseRequestPrimitive() runs on CseSimu {
infoPort.send(vc_request.primitive.requestPrimitive);
}
function f_sendPrimitiveContentRetrievedResource() runs on AeSimu {
infoPort.send(vc_primitiveContentRetrievedResource);
......@@ -1476,11 +1528,9 @@ module OneM2M_Functions {
*/
function f_cse_receiveCreateRequest(in template RequestPrimitive p_requestPrimitive := ?) runs on CseSimu {
var MsgIn v_request;
tc_ac.start;
alt {
[] mccPort.receive(mw_request(p_requestPrimitive)) -> value v_request {
[] mccPort.receive(mw_request(p_requestPrimitive)) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: CREATE Request received successfuly");
}
......
......@@ -125,6 +125,7 @@ module OneM2M_Pixits {
//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
modulepar boolean PX_IUT_IS_ASN_CSE := false; //default //set it to true when running Device-based location testcases
modulepar boolean PX_IUT_IS_MN_CSE := false; //default //set it to true when running Share-based location testcases
modulepar boolean PX_IUT_IS_IN_CSE := false; //default //set it to true when running Share-based location testcases
//constant parameters for LOC
modulepar XSD.Token PX_LOCATION_TARGET_ID := "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
......
......@@ -47,9 +47,9 @@ module OneM2M_Ports {
*/
type port InfoPort message {
in
ResponsePrimitive, PrimitiveContent, MyResource;
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource;
out
ResponsePrimitive, PrimitiveContent, MyResource;
RequestPrimitive, ResponsePrimitive, PrimitiveContent, MyResource;
}
}//end module
......@@ -3309,6 +3309,8 @@ module OneM2M_Templates {
template ResponsePrimitive mw_responsePrimitiveforInfoPort := ?;
template RequestPrimitive mw_requestPrimitiveforInfoPort := ?;
template ResponsePrimitive mw_responsePrimitive(in template (present) ResponseStatusCode p_statusCode, in template PrimitiveContent p_content := *) := {
responseStatusCode := p_statusCode,
requestIdentifier := ?,
......
......@@ -45,6 +45,7 @@ module OneM2M_TestControl {
execute(TC_CSE_REG_CRE_023());
execute(TC_CSE_REG_CRE_025());
execute(TC_CSE_REG_CRE_028());
execute(TC_CSE_REG_CRE_029());
execute(TC_CSE_REG_RET_001());
execute(TC_CSE_REG_RET_005());
execute(TC_CSE_REG_RET_008());
......
This diff is collapsed.
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