Commit 7150fbf0 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of f_CSE_ANNC_CRE_008_CseSimu


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 09e869bc
......@@ -1986,6 +1986,9 @@ module OneM2M_Functions {
v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_;
mccPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
}
[] mccPortIn.receive(mw_request(?)) -> value v_request {
setverdict(fail, __SCOPE__ & ":ERROR: Request received with unexpected parameters");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
}
......
......@@ -7518,15 +7518,13 @@ module OneM2M_PermutationFunctions {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_create.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_create.primitiveContent.aE.announceTo := {PX_CSE1_ID};
// Test control
......@@ -7535,35 +7533,18 @@ module OneM2M_PermutationFunctions {
//Test adapter configuration
// Register the CSE
f_cse_registerRemoteCse(mw_createRemoteCSE);
f_cse_registerRemoteCse(m_createRemoteCSEBase);
v_ae1.start(f_cse_createResource(int2,v_create));
f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
v_aeIndex := f_getLatestResourceIndex(v_ae1);
v_aEAnncIndex := f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -));
v_ae1.done;
// Test Body
v_ae1.start(f_cse_sendCreateRequestPrimitive(p_resourceType,p_requestCreatePrimitive, v_parentIndex));
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE REQUEST received");
if(match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_hierarchical, e_spRelative)) or
match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_nonHierarchical, e_spRelative))) {
setverdict(pass, __SCOPE__ & ":matching ANNC_PARENT_RESOURCE_ADDRESS");
} else {
setverdict(fail, __SCOPE__ & ":mis-matching ANNC_PARENT_RESOURCE_ADDRESS");
}
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE REQUEST received");
}
}
v_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_aEAnncIndex);
v_ae1.done;
// Postamble
f_cse_postamble_deleteResourcesCSE();
......
......@@ -10772,10 +10772,11 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.done;
v_createRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.container.announcedAttribute := {"mbs"};
v_createRequestAnnc.primitiveContent.container.maxByteSize := ?;
v_cse1.start(f_CSE_ANNC_CRE_008_CseSimu(int3, v_createRequestAnnc, v_createRequest));//Container
v_cse1.done;
}
......@@ -10787,10 +10788,11 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createContentInstanceAnnc;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.done;
v_createRequest.primitiveContent.contentInstance.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"cnf"};
v_createRequestAnnc.primitiveContent.contentInstance.contentInfo:= ?;
v_cse1.start(f_CSE_ANNC_CRE_008_CseSimu(int4, v_createRequestAnnc, v_createRequest));//ContentInstance
v_cse1.done;
}
......@@ -10802,10 +10804,11 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.done;
v_createRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.group_.announcedAttribute := {"mt"};
v_createRequestAnnc.primitiveContent.group_.memberType:= ?;
v_cse1.start(f_CSE_ANNC_CRE_008_CseSimu(int9, v_createRequestAnnc, v_createRequest));//Group
v_cse1.done;
 
......@@ -10817,13 +10820,12 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequest := m_createTimeSeriesBase;
var template RequestPrimitive v_createRequestAnnc := mw_createTimeSeriesAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.done;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.timeSeries.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.timeSeries.announcedAttribute := {"mbs"};
v_createRequestAnnc.primitiveContent.timeSeries.maxByteSize := ?;
v_cse1.start(f_CSE_ANNC_CRE_008_CseSimu(int29, v_createRequestAnnc, v_createRequest));//TimeSeries
v_cse1.done;
}
......@@ -10834,11 +10836,12 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequest := m_createTimeSeriesInstanceBase;
var template RequestPrimitive v_createRequestAnnc := mw_createTimeSeriesInstanceAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.timeSeriesInstance.announcedAttribute := {"cs"};
v_createRequestAnnc.primitiveContent.timeSeriesInstance.contentSize := ?;
v_cse1.start(f_CSE_ANNC_CRE_008_CseSimu(int30, v_createRequestAnnc, v_createRequest));//TimeSeriesInstance
v_cse1.done;
}
......
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