diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index f1bde36b55deb4a4e651a4dc852bf835606c860f..e078e33b244f5de7c764b6e9d20bfa797cdecfb0 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -4826,10 +4826,6 @@ module OneM2M_Functions { } } } else if (p_resourceType == int4) {//contentInstance - //creator attribute - if(ispresent(p_request.primitiveContent.contentInstance.creator)) { - p_request.primitiveContent.contentInstance.creator := f_getCreator(p_parentIndex); - } } else if (p_resourceType == int9) {//group if(match(valueof(p_request.primitiveContent.group_.memberIDs), v_defaultListOfURIs )){ if (p_parentIndex == -1){ @@ -4869,7 +4865,7 @@ module OneM2M_Functions { if((match(valueof(p_request.primitiveContent.timeSeries.accessControlPolicyIDs), v_defaultAcpIDs )) and (isbound(vc_acpIndex))){ p_request.primitiveContent.timeSeries.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; } - } + } } else if(p_resourceType == int30){//timeSeriesInstance if(ispresent(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime)) { if((match(valueof(p_request.primitiveContent.timeSeriesInstance.dataGenerationTime), v_defaultAbsRelTimestamp))){ @@ -5218,26 +5214,6 @@ module OneM2M_Functions { } } - /** - * @desc Resolution of the creator attribute for a given resource - * @param p_targetResourceIndex Internal resource index of the given resource - * @return AE-ID or CSE-ID of the entity creating the given resource - * @verdict - */ - function f_getCreator(integer p_targetResourceIndex := -1) runs on Tester return XSD.ID { - - if(p_targetResourceIndex == -1) { - return PX_CSE_ID; - } - - if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE)) { - return vc_resourcesList[p_targetResourceIndex].resource.aE.aE_ID; - } else { - return f_getCreator(vc_resourcesList[p_targetResourceIndex].parentIndex); - } - - } - /** * @desc Return of a index of a specific attribute from an attributeList by attributeName * @param p_attributeList Target attributeList @@ -5313,18 +5289,6 @@ module OneM2M_Functions { return v_poa; } - function f_getPortAddress(in PortDesc p_portDesc) return charstring { - if (ischosen(p_portDesc.binding.httpBindingDesc)) { - return p_portDesc.binding.httpBindingDesc.bindingDesc.tsAddress; - } else if (ischosen(p_portDesc.binding.coapBindingDesc)) { - return p_portDesc.binding.coapBindingDesc.bindingDesc.tsAddress; - } else if (ischosen(p_portDesc.binding.mqttBindingDesc)) { - return p_portDesc.binding.mqttBindingDesc.bindingDesc.tsAddress; - } else { - return p_portDesc.binding.wsBindingDesc.bindingDesc.tsAddress; - } - } - /** * @desc Resolution of the local resource index for a given resource address (URI) * @param p_address Resource URI (can be structured/unstructured cseRelative/spRelative/absolute) @@ -5562,22 +5526,6 @@ module OneM2M_Functions { } - /** - * @desc Retrieve AE_ID for a given AE resource - * @param p_targetResourceIndex Internal resource index of the given resource - * @return AE_ID of the given resource - */ - function f_getAeId(integer p_targetResourceIndex := -1) runs on Tester return XSD.ID { - - if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE)) { - return vc_resourcesList[p_targetResourceIndex].resource.aE.aE_ID; - } - - log(__SCOPE__ & ":WARNING: p_targetResourceIndex does not refer to AE resource"); - return ""; - - } // end f_getAeId - /** * @desc Retrieve Announced Resource Type from the given resource type * @param p_targetResourceIndex Internal resource index of the given resource diff --git a/OneM2M_Testcases_AE_Release_3.ttcn b/OneM2M_Testcases_AE_Release_3.ttcn index 21298017e7e49679e6759ef6941c0ee2a33480a8..0754347b80a16aa450ad0a02296c1ee6af19d603 100644 --- a/OneM2M_Testcases_AE_Release_3.ttcn +++ b/OneM2M_Testcases_AE_Release_3.ttcn @@ -17,7 +17,6 @@ module OneM2M_Testcases_AE_Release_3 { import from OneM2M_Types_homeDevice all; import from OneM2M_TypesAndValues all; import from OneM2M_Pixits all; - import from LibCommon_Time all; import from OneM2M_Pics all; import from OneM2M_Functions all; import from OneM2M_PermutationFunctions all; @@ -1346,7 +1345,7 @@ module OneM2M_Testcases_AE_Release_3 { // Test Body var template UtTriggerPrimitive v_utRequest := m_utNotify; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid ESPrim object to " & f_getPortAddress(PX_TS_CSE1.mcaPortIn); // Test control + var universal charstring v_action := __SCOPE__ & ": Please, send a valid ESPrim object to " & f_getLocalResourceAddress(); // Test control v_utRequest.requestPrimitive.to_ := f_getResourceAddress(); f_ae_sendUtPrimitive(v_utRequest, v_action); @@ -1710,7 +1709,7 @@ module OneM2M_Testcases_AE_Release_3 { // Test Body var template UtTriggerPrimitive v_utRequest := m_utNotify; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid NOTIFY Request containing To set to " & f_getPortAddress(PX_TS_CSE1.mcaPortIn) & " and Content containing securityInfo object containing ESCertKe Message 1"; // Test control + var universal charstring v_action := __SCOPE__ & ": Please, send a valid NOTIFY Request containing To set to " & f_getLocalResourceAddress() & " and Content containing securityInfo object containing ESCertKe Message 1"; // Test control v_utRequest.requestPrimitive.to_ := f_getResourceAddress(); f_ae_sendUtPrimitive(v_utRequest, v_action); diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index c6d6943797c2b3a0eac942a34a2efd5a83c47e90..270d8327dd79c38225c8f066e5500dee8d5b148d 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -2587,7 +2587,7 @@ module OneM2M_Testcases_CSE_Release_2 { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_contentResponse.uRI := f_getAeId(v_aeIndex); + v_contentResponse.uRI := vc_resourcesList[v_aeIndex].resource.aE.aE_ID; f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23); diff --git a/OneM2M_Testcases_CSE_Release_3.ttcn b/OneM2M_Testcases_CSE_Release_3.ttcn index b950a1997d564966a50f2e5b463da53cf8c870b4..5e5d70f7e9c5defc917c2d3e4c98a30311e990f5 100644 --- a/OneM2M_Testcases_CSE_Release_3.ttcn +++ b/OneM2M_Testcases_CSE_Release_3.ttcn @@ -9031,7 +9031,7 @@ module OneM2M_Testcases_CSE_Release_3 { // Test Body var template UtTriggerPrimitive v_utRequest := m_utNotify; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid NOTIFY Request containing To set to " & f_getPortAddress(PX_TS_CSE1.mccPortIn) & " and Content containing securityInfo object containing ESCertKe Message 1"; // Test control + var universal charstring v_action := __SCOPE__ & ": Please, send a valid NOTIFY Request containing To set to " & f_getLocalResourceAddress() & " and Content containing securityInfo object containing ESCertKe Message 1"; // Test control v_utRequest.requestPrimitive.to_ := f_getResourceAddress(); f_cse_sendUtPrimitive_cseSimu(v_utRequest, v_action);