diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 036dfa531afa3b0594fcf1ce81dc22009e8dc71f..79ebd546b8ed88e5dd6e7819f2e7060d089d63b2 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -5325,12 +5325,14 @@ module OneM2M_Functions { var integer v_numberOfAggregatedNotification; if (ischosen(p_primitiveContent.aE)){ - log("Representation contains AE resource representation"); + if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE)) { + log("Representation contains AE resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE); - log("Expected primitiveContent"); } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE)) { + log("Request contains a response primitive as content"); v_matchResult :=match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE); } else if (isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list)) { @@ -5352,21 +5354,34 @@ module OneM2M_Functions { if (ischosen(p_primitiveContent.container)){ if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container)) { + log("Representation contains container resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container, p_primitiveContent.container) } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container)) { + log("Request contains a response primitive as content"); v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container, p_primitiveContent.container) } } if (ischosen(p_primitiveContent.timeSeries)){ if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries)) { + log("Representation contains timeSeries resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries, p_primitiveContent.timeSeries) } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries)) { + log("Request contains a response primitive as content"); v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries) } } + + if (ischosen(p_primitiveContent.uRI)){ + if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.uRI)) { + log("Representation contains URI element"); + v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.uRI, p_primitiveContent.uRI) + } + } return v_matchResult; diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 2e97194770bc4f8d085281ea4829af5ecd2d32da..9bc28a5787ec1db937922ca08031c082fc4c1330 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -5191,7 +5191,7 @@ with { //FIXME To replace Representation type by this type union Representation { Resource_2 resource, - XSD.AnyURI uRI + URI uRI } with { variant "name as 'representation'"; diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index ffccedd1ac8fddfb1958d65b699cb19db561aeb9..091fbe9995cdb1989287736c85ca7879786a0870 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -3157,9 +3157,7 @@ module OneM2M_Testcases_CSE_Release_2 { var integer v_ae2Index := -1; v_updateRequest.primitiveContent.aE.labels := v_labels_1; - v_contentResponse.uRI := ?; - // Test control // Test component configuration @@ -3169,6 +3167,7 @@ module OneM2M_Testcases_CSE_Release_2 { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_contentResponse.uRI := f_getAeId(v_aeIndex); f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23);