Correct use of vc_testSystemRole

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent de92eb8e
......@@ -822,7 +822,7 @@ module OneM2M_Functions {
v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]);
}
v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false)));
v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i], vc_testSystemRole)));
mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
......@@ -2628,11 +2628,7 @@ module OneM2M_Functions {
if(p_resourceType == int16) {
p_request.from_ := PX_CSE1_ID;
} else {
if(vc_testSystemRole == e_ae) {
p_request.from_ := f_getOriginator(p_parentIndex);
} else {//vc_testSystemRole == e_cse
p_request.from_ := f_getOriginator(p_parentIndex, false);
}
p_request.from_ := f_getOriginator(p_parentIndex, vc_testSystemRole);
}
}
......@@ -2921,16 +2917,16 @@ module OneM2M_Functions {
/**
* @desc Resolution of the originator field (from) for a given resource
* @param p_targetResourceIndex Internal resource index of the given resource
* @param p_testSystemRole True if TS acting as an AE, False if TS acting as a CSE
* @param p_testSystemRole TS acting as an AE or a CSE
* @return Originator for a given resource
* @verdict
*/
function f_getOriginator(integer p_targetResourceIndex := -1, boolean p_testSystemRole := true) runs on Tester return XSD.AnyURI {
function f_getOriginator(integer p_targetResourceIndex := -1, TestSystemRole p_testSystemRole := e_ae) runs on Tester return XSD.AnyURI {
if(p_targetResourceIndex == -1) {
if(p_testSystemRole) {
if(p_testSystemRole == e_ae) {
return PX_SUPER_AE_ID;
} else {
} else if (p_testSystemRole == e_cse) {
return PX_SUPER_CSE_ID;
}
}
......
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