Some corrections for REG/RET testcases

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 53d2c341
......@@ -1648,7 +1648,6 @@ module OneM2M_Functions {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_localResourceIndex := -1;
var PrimitiveContent v_remoteCSEResource;
v_request := f_getCreateRequestPrimitive(int16, p_requestPrimitive, -1);
......@@ -1662,7 +1661,7 @@ module OneM2M_Functions {
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
v_remoteCSEResource := f_cse_generateLocalResource(v_response.primitive.responsePrimitive.primitiveContent, vc_cSEBaseIndex, int16);
v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
vc_localRemoteCseIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
......@@ -1693,7 +1692,6 @@ module OneM2M_Functions {
var MsgIn v_request;
var ResponsePrimitive v_response;
var PrimitiveContent v_remoteCSEResource;
var integer v_localResourceIndex := -1;
var integer v_resourceIndex := -1;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, send a CSE registration request";
......@@ -1707,12 +1705,12 @@ module OneM2M_Functions {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
v_remoteCSEResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_
v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
vc_localRemoteCseIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent.remoteCSE := vc_localResourcesList[v_localResourceIndex].resource.remoteCSE;
v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE;
mccPortIn.send(m_response(v_response));
v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1);
......
......@@ -63,6 +63,7 @@ module OneM2M_TestSystem {
var MyResourcesList vc_localResourcesList := {};
var AeSimu vc_ae1;//For CF02 when CseSimu is master
var integer vc_remoteCseIndex;
var integer vc_localRemoteCseIndex;
var integer vc_cSEBaseIndex; //Index of the CSEBase resource of the Tester inside vc_localResourcesList
};
......
......@@ -2802,7 +2802,7 @@ module OneM2M_Testcases_CSE {
// Preamble
v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1);
mcaPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
mcaPort.send(m_request(m_retrieve(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
......@@ -2922,7 +2922,7 @@ module OneM2M_Testcases_CSE {
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
mccPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
mccPort.send(m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
......@@ -2951,7 +2951,7 @@ module OneM2M_Testcases_CSE {
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
mccPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
mccPort.send(m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
......@@ -3067,7 +3067,7 @@ module OneM2M_Testcases_CSE {
// Preamble
if(PICS_IN_CSE){
vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive);
mccPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
mccPort.send(m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
......@@ -3092,7 +3092,7 @@ module OneM2M_Testcases_CSE {
}
} else if (PICS_MN_CSE){
vc_remoteCseIndex := f_cse_registrationRemoteCse(p_createRequestPrimitive);
mccPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
mccPort.send(m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
......@@ -3224,7 +3224,7 @@ module OneM2M_Testcases_CSE {
vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
//Send Trigger Message
v_utRequest := m_utRetrieveResource(f_getLocalResourceAddress(vc_remoteCseIndex), PX_CSE_ID);
v_utRequest := m_utRetrieveResource(f_getLocalResourceAddress(vc_localRemoteCseIndex), PX_CSE_ID);
v_utRequest.from_ := "UNINITIALIZED";
f_sendUtPrimitive(v_utRequest, v_action);
......@@ -3274,7 +3274,7 @@ module OneM2M_Testcases_CSE {
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
mccPort.send(m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
mccPort.send(m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
......
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