Commit 5d4fd380 authored by Naum Spaseski's avatar Naum Spaseski

STF531: corrected CSE/REG/CRE/005 and minor bugfixes

Signed-off-by: 's avatarNaum Spaseski <naum.spaseski@gmail.com>
parent aa986c40
......@@ -103,6 +103,7 @@ module OneM2M_Functions {
function f_cf02UpCse1() runs on CseSimu {
// Variables
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02;
vc_testSystemRole := e_cse;
......@@ -114,6 +115,9 @@ module OneM2M_Functions {
activate(a_default());
activate(a_cse_cf02_cse1());
v_cSEBaseResource := f_cse_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
//Initialze the IUT
} // end f_cf02UpCse1
......@@ -124,7 +128,8 @@ module OneM2M_Functions {
function f_cf02UpCseSimuMaster() runs on CseSimu {
// Variables
vc_config := e_cf02;
var PrimitiveContent v_cSEBaseResource;
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_cse;
vc_ae1 := AeSimu.create("AE1") alive;
......@@ -136,6 +141,9 @@ module OneM2M_Functions {
activate(a_cse_cf02_cse1());
vc_ae1.start(f_cf02UpAe1());
vc_ae1.done;
v_cSEBaseResource := f_cse_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Connect
......@@ -149,7 +157,7 @@ module OneM2M_Functions {
function f_cf02UpAe1() runs on AeSimu {
// Variables
vc_config := e_cf02;
vc_config := e_cf02CseSimuMaster;
vc_testSystemRole := e_ae;
// Map
......@@ -1668,9 +1676,9 @@ module OneM2M_Functions {
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent.remoteCSE := vc_localResourcesList[v_localResourceIndex].resource.remoteCSE;
mccPort.send(m_response(v_response));
mccPortIn.send(m_response(v_response));
v_resourceIndex := f_setResource(v_request.primitive.responsePrimitive.primitiveContent, int16, -1);
v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1);
}
[] mccPortIn.receive {
tc_ac.stop;
......@@ -2278,6 +2286,10 @@ module OneM2M_Functions {
if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID);
}
if(ischosen(p_contentResource.remoteCSE)) {
return f_resourceIdCleaner(p_contentResource.remoteCSE.resourceID);
}
log(__SCOPE__&":WARNING: Primitive Content Kind not implemented");
return "resourceIDNotFound";
......
......@@ -547,7 +547,6 @@ module OneM2M_Templates {
* @param p_stemId
*/
template (value) RequestPrimitive m_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_create:= {
to_ := p_to,
from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier := testcasename() & "-m_createAEAnnc",
resourceType := int10002,
......
......@@ -5594,6 +5594,7 @@ group OtherTypes {
type enumerated Configurations {
e_cf01,
e_cf02,
e_cf02CseSimuMaster,
e_cf03,
e_cf04
};
......
......@@ -1054,15 +1054,15 @@ module OneM2M_Testcases_CSE {
//mcaPort.send(m_request(v_request));
tc_ac.start;
alt{
[]mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){
[]mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))){
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
}
[]mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){
[]mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))){
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
}
[] mccPort.receive {
[] mccPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE");
}
......
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