From 633d6551b7b15b36c29b436f0829039e1adc7247 Mon Sep 17 00:00:00 2001
From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
Date: Mon, 21 Aug 2017 14:25:31 +0200
Subject: [PATCH] Simplification of type ResourceWrapper

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
---
 LibOneM2M/OneM2M_Templates.ttcn | 14 +++++++-------
 LibOneM2M/OneM2M_Types.ttcn     | 29 +++++++++++++++--------------
 2 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index f1a9e08..a43d091 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     oneM2M
  *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
- *              $Id: OneM2M_Templates.ttcn 354 2017-08-17 15:06:38Z reinaortega $
+ *              $Id: OneM2M_Templates.ttcn 356 2017-08-21 12:25:14Z reinaortega $
  *  @desc       Module containing templates for oneM2M
  *
  */
@@ -2453,7 +2453,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentAcp_rc2 := ?;
 		
 		template Resource mw_contentAcp_rc3 := {
-			choice := {sg_announceableSubordinateResource := {accessControlPolicy := ?}},
+			choice := {accessControlPolicy := ?},
 			uRI := ? 	
 		}
 		
@@ -2574,7 +2574,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentGroup_rc2 := ?; 
 		
 		template Resource  mw_contentGroup_rc3 := {
-			choice := {sg_announceableResource := {group_ := ?}},
+			choice := {group_ := ?},
 			uRI := ?
 		}
 		
@@ -2682,7 +2682,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentPollingChannel_rc2 := ?; 
 		
 		template Resource  mw_contentPollingChannel_rc3 := {
-			choice := {sg_subordinateResource := {pollingChannel := ?}},
+			choice := {pollingChannel := ?},
 			uRI := ?
 		}
 		
@@ -2807,7 +2807,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentSchedule_rc2 := ?; 
 		
 		template Resource mw_contentSchedule_rc3 := {
-			choice := {sg_announceableSubordinateResource := {schedule := ?}},
+			choice := {schedule := ?},
 			uRI := ?
 		}
 		
@@ -2971,7 +2971,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentSubscription_rc2 := ?;  
 		
 		template Resource mw_contentSubscription_rc3 := {
-			choice := {sg_regularResource := {subscription := ?}},
+			choice := {subscription := ?},
 			uRI := ?
 		}
 		
@@ -3154,7 +3154,7 @@ module OneM2M_Templates {
 		template XSD.AnyURI mw_contentContainer_rc2 := ?;
 		
 		template Resource mw_contentContainer_rc3 := {
-			choice := {sg_announceableResource := {container := ?}},
+			choice := {container := ?},
 			uRI := ?
 		}
 		
diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn
index b2e68a8..0f44f3d 100644
--- a/LibOneM2M/OneM2M_Types.ttcn
+++ b/LibOneM2M/OneM2M_Types.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     oneM2M
  *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Types.ttcn $
- *              $Id: OneM2M_Types.ttcn 354 2017-08-17 15:06:38Z reinaortega $
+ *              $Id: OneM2M_Types.ttcn 356 2017-08-21 12:25:14Z reinaortega $
  *  @desc       OneM2M data types module 
  *
  */
@@ -5461,19 +5461,20 @@ with {
 
 type record ResourceWrapper
 {
-	union {
-		Sg_resource_group sg_resource,
-		Sg_regularResource_group sg_regularResource,
-		Sg_announcedResource_group sg_announcedResource,
-		Sg_announceableResource_group sg_announceableResource,
-		Sg_subordinateResource_group sg_subordinateResource,
-		Sg_announcedSubordinateResource_group sg_announcedSubordinateResource,
-		Sg_announceableSubordinateResource_group sg_announceableSubordinateResource,
-		Sg_mgmtResource_group sg_mgmtResource,
-		Sg_announcedMgmtResource_group sg_announcedMgmtResource,
-		Sg_flexContainerResource_group sg_flexContainerResource,
-		Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource
-	} choice,
+//	union {
+//		Sg_resource_group sg_resource,
+//		Sg_regularResource_group sg_regularResource,
+//		Sg_announcedResource_group sg_announcedResource,
+//		Sg_announceableResource_group sg_announceableResource,
+//		Sg_subordinateResource_group sg_subordinateResource,
+//		Sg_announcedSubordinateResource_group sg_announcedSubordinateResource,
+//		Sg_announceableSubordinateResource_group sg_announceableSubordinateResource,
+//		Sg_mgmtResource_group sg_mgmtResource,
+//		Sg_announcedMgmtResource_group sg_announcedMgmtResource,
+//		Sg_flexContainerResource_group sg_flexContainerResource,
+//		Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource
+//	} 
+	Resource_2 choice,//TODO Use Resource_2 type instead 
 	XSD.AnyURI uRI
 }
 with {
-- 
GitLab