From 5c435334c48ad91b40fabef4e9bc68ecbc9f62ba Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Fri, 6 Apr 2018 12:23:15 +0200
Subject: [PATCH] Elements of the component type cannot be used as default
 value

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
---
 LibOneM2M/OneM2M_Functions.ttcn    |  2 +-
 OneM2M_PermutationFunctions.ttcn   | 20 ++++++++++----------
 OneM2M_Testcases_AE_Release_1.ttcn | 24 ++++++++++++------------
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index c051e7b..e4c593a 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -3205,7 +3205,7 @@ module OneM2M_Functions {
 		 * @return Internal resource index of the saved resource
 		 * @verdict 
 		 */
-		function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer  p_parentIndex := vc_cSEBaseIndex) runs on CseSimu return integer {
+		function f_setLocalResource(PrimitiveContent p_resource, ResourceType p_resourceType, integer  p_parentIndex) runs on CseSimu return integer {
 			var integer v_newIndex := -1;	
 			if(isbound(vc_localResourcesList)) {
 				vc_localResourcesList[lengthof(vc_localResourcesList)] := {p_parentIndex, p_resourceType, p_resource};
diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn
index 752c810..2bd0683 100644
--- a/OneM2M_PermutationFunctions.ttcn
+++ b/OneM2M_PermutationFunctions.ttcn
@@ -144,7 +144,7 @@ module OneM2M_PermutationFunctions {
 						
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope);
 						f_sendUtPrimitive(v_utRequest,v_action);
 						
@@ -189,7 +189,7 @@ module OneM2M_PermutationFunctions {
 	
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope);
 						f_sendUtPrimitive(v_utRequest,v_action);
 								
@@ -240,7 +240,7 @@ module OneM2M_PermutationFunctions {
 			
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope));
 						f_sendUtPrimitive(v_utRequestTemplate,v_action);
                         v_utRequest := valueof(v_utRequestTemplate);
@@ -287,7 +287,7 @@ module OneM2M_PermutationFunctions {
 
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope));
                         v_utRequest := valueof(v_utRequestTemplate);
 						f_sendUtPrimitive(v_utRequest,v_action);
@@ -338,7 +338,7 @@ module OneM2M_PermutationFunctions {
 			
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope);
 						f_sendUtPrimitive(v_utRequest,v_action);
 			
@@ -383,7 +383,7 @@ module OneM2M_PermutationFunctions {
 
 						//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope);
 						f_sendUtPrimitive(v_utRequest,v_action);
 				
@@ -482,7 +482,7 @@ module OneM2M_PermutationFunctions {
 	
 						//send triggering primitive to SUT
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_containerIndex := f_setLocalResource(v_localResource, int3);
+						v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -);
 						p_request.to_ := p_utRequest.requestPrimitive.to_;
 						f_sendUtPrimitive(p_utRequest,p_action);
@@ -576,7 +576,7 @@ module OneM2M_PermutationFunctions {
 						
 					   	//Send Trigger Message
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
-						v_auxInteger := f_setLocalResource(v_localResource, int2);
+						v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
 						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 					   	f_sendUtPrimitive(p_utRequest,p_action);
 	
@@ -617,7 +617,7 @@ module OneM2M_PermutationFunctions {
 
 						//send triggering primitive to SUT
 						v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-						v_auxInteger := f_setLocalResource(v_localResource, int3);
+						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 						f_sendUtPrimitive(p_utRequest,p_action);
 
@@ -669,7 +669,7 @@ module OneM2M_PermutationFunctions {
 		
 						//send triggering primitive to SUT
 						v_localResource := f_ae_generateLocalResource(valueof(p_primitiveContent), vc_cSEBaseIndex, p_resourceType);
-						v_auxInteger := f_setLocalResource(v_localResource, p_resourceType);
+						v_auxInteger := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
 						v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger));
 						f_sendUtPrimitive(v_utRequest,p_action);
 						
diff --git a/OneM2M_Testcases_AE_Release_1.ttcn b/OneM2M_Testcases_AE_Release_1.ttcn
index 52c814f..f3c3a86 100644
--- a/OneM2M_Testcases_AE_Release_1.ttcn
+++ b/OneM2M_Testcases_AE_Release_1.ttcn
@@ -678,7 +678,7 @@ module OneM2M_Testcases_AE_Release_1 {
 					f_cf03Up();
 	
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, -, -, omit))), vc_cSEBaseIndex, int2);
-					v_auxInteger := f_setLocalResource(v_localResource, int2);
+					v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, -, -);
 					f_sendUtPrimitive(v_utRequest,v_action);
 	
@@ -798,7 +798,7 @@ module OneM2M_Testcases_AE_Release_1 {
 	
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_containerIndex := f_setLocalResource(v_localResource, int3);
+					v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -);
 					v_requestPrimitive.to_ := v_utRequest.requestPrimitive.to_;
 					f_sendUtPrimitive(v_utRequest,v_action);
@@ -1308,7 +1308,7 @@ module OneM2M_Testcases_AE_Release_1 {
 	
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameOldest;
 					f_sendUtPrimitive(v_utRequest,v_action);
 	
@@ -1368,7 +1368,7 @@ module OneM2M_Testcases_AE_Release_1 {
 	
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameLatest;
 					f_sendUtPrimitive(v_utRequest,v_action);
 	
@@ -1428,7 +1428,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 					f_sendUtPrimitive(v_utRequest,v_action);
 	
@@ -1488,7 +1488,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
-					v_auxInteger := f_setLocalResource(v_localResource, int4);
+					v_auxInteger := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -1552,7 +1552,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameOldest;
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -1612,7 +1612,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger) & "/" & c_resourceShortNameLatest;
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -1672,7 +1672,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
-					v_auxInteger := f_setLocalResource(v_localResource, int3);
+					v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -1732,7 +1732,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//send triggering primitive to SUT
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
-					v_auxInteger := f_setLocalResource(v_localResource, int4);
+					v_auxInteger := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -1982,7 +1982,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//create Ae
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
-					v_auxInteger := f_setLocalResource(v_localResource, int2);
+					v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
 					f_sendUtPrimitive(v_utRequest,v_action);
 
@@ -2085,7 +2085,7 @@ module OneM2M_Testcases_AE_Release_1 {
 
 					//create Ae
 					v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
-					v_auxInteger := f_setLocalResource(v_localResource, int2);
+					v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
 					v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
 					f_sendUtPrimitive(v_utRequest,v_action);
 					tc_ac.start;
-- 
GitLab