From 8aea43a800aa1a58264148e1c4aebad29fc76be1 Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Tue, 14 Aug 2018 13:06:03 +0200
Subject: [PATCH] Representation data type should not include responsePrimitive
 as an alternative

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
---
 LibOneM2M/OneM2M_Functions.ttcn | 17 ++++++-----------
 LibOneM2M/OneM2M_Types.ttcn     |  1 -
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index 9e0ecdd..163acc7 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -2095,8 +2095,8 @@ module OneM2M_Functions {
 							v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE);
 							log("Expected primitiveContent");
 						}
-						else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE)) {
-							v_matchResult :=match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE);
+						else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE)) {
+							v_matchResult :=match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE);
 						}
 						else if (isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list)) {
 							v_matchResult := true;
@@ -2106,11 +2106,6 @@ module OneM2M_Functions {
 									if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.aE, p_primitiveContent.aE))){
 										v_matchResult := false;
 									}
-								}
-								else if(isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE)) {
-									if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE))){
-										v_matchResult := false;
-									}
 								}						
 							}
 							if (i == 0){
@@ -2124,8 +2119,8 @@ module OneM2M_Functions {
 						if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container)) {
 							v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container, p_primitiveContent.container)
 						}
-						else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container)) {
-							v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container, p_primitiveContent.container)
+						else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container)) {
+							v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container, p_primitiveContent.container)
 						}
 					}
 					
@@ -2133,8 +2128,8 @@ module OneM2M_Functions {
 						if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries)) {
 							v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries, p_primitiveContent.timeSeries)
 						}
-						else if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.timeSeries)) {
-							v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries)
+						else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries)) {
+							v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries)
 						}
 					}
     	
diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn
index 330f82e..b2d6d5c 100644
--- a/LibOneM2M/OneM2M_Types.ttcn
+++ b/LibOneM2M/OneM2M_Types.ttcn
@@ -5128,7 +5128,6 @@ with {
 //FIXME To replace Representation type by this
 type union Representation {
 	Resource_2 resource, 
-	ResponsePrimitive responsePrimitive, 
 	XSD.AnyURI uRI
 }
 with {
-- 
GitLab