diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index a1cba152d0d0f5d8125f7df8dff9e9c799bac41a..67734f0b6ae0b6a852cb3f994a02193bb0f3a6cb 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -42,6 +42,7 @@ module OneM2M_Functions { map(self:mcaPort, system:mcaPort) param (vc_aeSimuDesc.mcaPort); map(self:mcaPortIn, system:mcaPortIn) param (vc_aeSimuDesc.mcaPortIn); map(self:acPort, system:acPort); + connect(self:infoPort, mtc:infoPort); f_setProtocolBinding(vc_aeSimuDesc.mcaPort, vc_aeSimuDesc.mcaPortIn, v_binding, v_host, v_binding_in); @@ -904,7 +905,8 @@ module OneM2M_Functions { */ function f_connectInfoPort(in Tester p_tester) runs on Tester { // Connect - connect(self:infoPort, p_tester:infoPort); + connect(self:infoPort, p_tester:infoPort); + log(__SCOPE__&": INFO: infoPort connected"); } /** @@ -913,7 +915,8 @@ module OneM2M_Functions { */ function f_disconnectInfoPort(in Tester p_tester) runs on Tester { // Disconnect - disconnect(self:infoPort, p_tester:infoPort); + disconnect(self:infoPort, p_tester:infoPort); + log(__SCOPE__&": INFO: infoPort disconnected"); } group getFunctions { @@ -947,8 +950,6 @@ module OneM2M_Functions { function f_getRequestPrimitive(in Tester p_component) runs on Tester return RequestPrimitive { var RequestPrimitive v_request; - f_connectInfoPort(p_component); - p_component.start(f_sendRequestPrimitive()); alt { []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request { @@ -957,8 +958,6 @@ module OneM2M_Functions { p_component.done; - f_disconnectInfoPort(p_component); - return v_request; } @@ -2568,8 +2567,6 @@ module OneM2M_Functions { v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - tc_ac.start; - repeat; } [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationBase))) -> value vc_request { tc_ac.stop; @@ -2580,8 +2577,9 @@ module OneM2M_Functions { v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - tc_ac.start; - repeat; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ":ERROR: No notification received"); } } @@ -2804,7 +2802,15 @@ module OneM2M_Functions { alt { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, Non expected notification received"); + setverdict(fail, __SCOPE__ & ": ERROR: Non expected notification received"); + //Send response in any case + v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); + v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; + f_send(e_mcaPortIn, m_response(v_responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationBase))) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ":ERROR: Non expected notification received"); //Send response in any case v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; @@ -2812,14 +2818,14 @@ module OneM2M_Functions { } [] mcaPortIn.receive(mw_request(mw_notifyResponsePrimitive(?))) -> value vc_request { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, Non expected notification received"); + setverdict(fail, __SCOPE__ & ": ERROR: Non expected notification received"); //Send response in any case v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; f_send(e_mcaPortIn, m_response(v_responsePrimitive)); } [] tc_ac.timeout { - setverdict(pass, __SCOPE__ & ": No notification received"); + setverdict(pass, __SCOPE__ & ":INFO: No notification received"); } } @@ -5602,9 +5608,9 @@ module OneM2M_Functions { } } //creator - if(match(valueof(p_request.primitiveContent.crossResourceSubscription.creator), "NotInitialized" )){ - p_request.primitiveContent.crossResourceSubscription.creator := valueof(p_request.from_); - } + //if(match(valueof(p_request.primitiveContent.crossResourceSubscription.creator), "NotInitialized" )){ + // p_request.primitiveContent.crossResourceSubscription.creator := valueof(p_request.from_); + //} } return valueof(p_request); @@ -5778,6 +5784,9 @@ module OneM2M_Functions { if(ischosen(p_contentResource.semanticMashupJobProfile)) { return p_contentResource.semanticMashupJobProfile.resourceID; } + if(ischosen(p_contentResource.crossResourceSubscription)) { + return p_contentResource.crossResourceSubscription.resourceID; + } //Announced resources if(ischosen(p_contentResource.accessControlPolicyAnnc)) { return f_resourceIdCleaner(p_contentResource.accessControlPolicyAnnc.resourceID); @@ -5899,6 +5908,9 @@ module OneM2M_Functions { if(ischosen(p_contentResource.semanticMashupJobProfile)) { return p_contentResource.semanticMashupJobProfile.resourceName; } + if(ischosen(p_contentResource.crossResourceSubscription)) { + return p_contentResource.crossResourceSubscription.resourceID; + } //Announced resources if(ischosen(p_contentResource.accessControlPolicyAnnc)) { return p_contentResource.accessControlPolicyAnnc.resourceName; @@ -7150,6 +7162,13 @@ module OneM2M_Functions { log(__SCOPE__ & ":INFO: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.group_.resourceName) } } + case (int48) { + if (isvalue(p_response.primitiveContent.crossResourceSubscription) and + not(ispresent(p_response.primitiveContent.crossResourceSubscription.resourceName))) { + p_response.primitiveContent.crossResourceSubscription.resourceName := p_request.primitiveContent.crossResourceSubscription.resourceName; + log(__SCOPE__ & ":INFO: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.subscription.resourceName) + } + } case (int61) { // TBD softwareCampaign - implemented similar to exisitng resources if (isvalue(p_response.primitiveContent.softwareCampaign) and not(ispresent(p_response.primitiveContent.softwareCampaign.resourceName))) { diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index cd184c4fbf186992474ed386d93097824ed6e826..018c47a96ff6b299a9f3df267ddc30c91be0c688 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -2796,11 +2796,11 @@ module OneM2M_Templates { };*/ template (value) RequestPrimitive m_createCrossResourceSubscription(XSD.ID p_parentResourceAddress, in template (omit) ResourceName p_name := c_defaultCrossResourceSubscriptionResourceName, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}, - in template (omit) TimeWindowType p_timeWindowType, in template (value) XSD.Duration p_timeWindowSize, in template (value) XSD.ID p_creator) modifies m_create := { + in template (omit) TimeWindowType p_timeWindowType, in template (value) XSD.Duration p_timeWindowSize) modifies m_create := { to_ := p_parentResourceAddress, requestIdentifier := testcasename() & "-m_createCrossResourceSubscription", resourceType := int48, - primitiveContent := {crossResourceSubscription := m_contentCreateCrossResourceSubscription (p_notificationURI, p_name, p_timeWindowType, p_timeWindowSize, p_creator)} + primitiveContent := {crossResourceSubscription := m_contentCreateCrossResourceSubscription (p_notificationURI, p_name, p_timeWindowType, p_timeWindowSize)} }; }//end group Create @@ -7219,8 +7219,7 @@ module OneM2M_Templates { template (value) CrossResourceSubscription_optional m_contentCreateCrossResourceSubscription (in template (value) ListOfURIs p_notificationURI, in template (omit) ResourceName p_name := c_defaultSubscriptionResourceName, in template (omit) TimeWindowType p_timeWindowType := int1, - in template (value) XSD.Duration p_timeWindowSize, - in template (value) XSD.ID p_creator) := { + in template (value) XSD.Duration p_timeWindowSize) := { resourceName := p_name,//O resourceType := omit,//NP resourceID := omit,//NP @@ -7232,7 +7231,7 @@ module OneM2M_Templates { expirationTime := omit,//NP dynamicAuthorizationConsultationIDs := omit,//O custodian := omit,//O - creator := p_creator,//M + creator := omit,//O regularResourcesAsTarget := omit,//O subscriptionResourcesAsTarget := omit,//O timeWindowType := p_timeWindowType,//M @@ -9761,7 +9760,7 @@ module OneM2M_Templates { notificationEvent := *,//O verificationRequest := *,//O subscriptionDeletion := *,//O - subscriptionReference := *,//M //TODO Put it back to ? subscriptionReference is mandatory + subscriptionReference := ?,//M creator := *,//O notificationForwardingURI := *,//O notificationTarget := *, diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index aad4253661fae6e81dfab7afdc0070a867efa00c..78af0e1e2fb5e26231a1914926c18c169d9048d1 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -10726,8 +10726,7 @@ module OneM2M_PermutationFunctions { var Labels v_labels_1:= {"VALUE_1"}; var Labels v_labels_2:= {"VALUE_2"}; var RequestPrimitive v_notificationRequest; - var XSD.Duration v_myAbsRelTimestamp; - v_myAbsRelTimestamp := "PT2S"; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; // Test control @@ -10741,7 +10740,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 - v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp, "NotInitialized"); + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp); v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1, e_nonHierarchical, e_cseRelative), f_getResourceAddress(v_resourceIndex_2, e_nonHierarchical, e_cseRelative)}; v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration @@ -10750,16 +10749,12 @@ module OneM2M_PermutationFunctions { f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - if(vc_ae2.running) { - vc_ae2.stop; - }; - // Test Body vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); - v_updateRequest_1.filterCriteria.labels := v_labels_1; + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 - v_updateRequest_2.filterCriteria.labels := v_labels_2; + v_updateRequest_2.primitiveContent.container.labels := v_labels_2; f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -10788,15 +10783,14 @@ module OneM2M_PermutationFunctions { var integer v_resourceIndex := -1; var integer v_resourceIndex_1 := -1; var integer v_resourceIndex_2 := -1; - var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_createRequest := m_createContainer_noResourceName; const ResourceType c_containerResourceType := int3; var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; var Labels v_labels_2:= {"VALUE_2"}; var RequestPrimitive v_notificationRequest; - var XSD.Duration v_myAbsRelTimestamp; - v_myAbsRelTimestamp := "PT2S"; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; timer t_notificationTimer := PX_TAC; var float v_elapsedTime; @@ -10812,7 +10806,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 - v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp, "NullValue"); + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp); v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration @@ -10820,25 +10814,22 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - - if(vc_ae2.running) { - vc_ae2.stop; - }; - + // Test Body vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); - t_notificationTimer.start; - v_updateRequest_1.filterCriteria.labels := v_labels_1; + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + t_notificationTimer.start; v_elapsedTime := t_notificationTimer.read; - while (v_elapsedTime < str2float(v_myAbsRelTimestamp)){ // Wait until window size expires + //v_myAbsRelTimestamp = 2.0 seconds + while (v_elapsedTime < 2.0){ // Wait until window size expires v_elapsedTime := t_notificationTimer.read; } t_notificationTimer.stop; - v_updateRequest_2.filterCriteria.labels := v_labels_2; + v_updateRequest_2.primitiveContent.container.labels := v_labels_2; f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -10859,15 +10850,14 @@ module OneM2M_PermutationFunctions { var integer v_resourceIndex := -1; var integer v_resourceIndex_1 := -1; var integer v_resourceIndex_2 := -1; - var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_createRequest := m_createContainer_noResourceName; const ResourceType c_containerResourceType := int3; var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; var Labels v_labels_2:= {"VALUE_2"}; var RequestPrimitive v_notificationRequest; - var XSD.Duration v_myAbsRelTimestamp; - v_myAbsRelTimestamp := "PT2S"; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; // Test control @@ -10881,7 +10871,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 - v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp, "NullValue"); + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp); v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int2})}; // Delete_of_Resource f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration @@ -10889,18 +10879,14 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - - if(vc_ae2.running) { - vc_ae2.stop; - }; - + // Test Body vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); - v_updateRequest_1.filterCriteria.labels := v_labels_1; + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 - v_updateRequest_2.filterCriteria.labels := v_labels_2; + v_updateRequest_2.primitiveContent.container.labels := v_labels_2; f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -10923,15 +10909,14 @@ module OneM2M_PermutationFunctions { var integer v_resourceIndex_2 := -1; var integer v_childResourceIndex_1 := -1; var integer v_childResourceIndex_2 := -1; - var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_createRequest := m_createContainer_noResourceName; const ResourceType c_containerResourceType := int3; var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; var Labels v_labels_2:= {"VALUE_2"}; var RequestPrimitive v_notificationRequest; - var XSD.Duration v_myAbsRelTimestamp; - v_myAbsRelTimestamp := "PT2S"; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; // Test control @@ -10941,16 +10926,16 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex_1 := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 v_createRequest := m_createSubscriptionBase; v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_1);//Subscription_1 - v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 + v_childResourceIndex_2 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 - v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp, "NullValue"); - v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_childResourceIndex_1), f_getResourceAddress(v_childResourceIndex_2)}; v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration @@ -10958,16 +10943,12 @@ module OneM2M_PermutationFunctions { f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - if(vc_ae2.running) { - vc_ae2.stop; - }; - // Test Body vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); - v_updateRequest_1.filterCriteria.labels := v_labels_1; + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 - v_updateRequest_2.filterCriteria.labels := v_labels_2; + v_updateRequest_2.primitiveContent.container.labels := v_labels_2; f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -10998,15 +10979,14 @@ module OneM2M_PermutationFunctions { var integer v_resourceIndex_2 := -1; var integer v_childResourceIndex_1 := -1; var integer v_childResourceIndex_2 := -1; - var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_createRequest := m_createContainer_noResourceName; const ResourceType c_containerResourceType := int3; var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; var Labels v_labels_1:= {"VALUE_1"}; var Labels v_labels_2:= {"VALUE_2"}; var RequestPrimitive v_notificationRequest; - var XSD.Duration v_myAbsRelTimestamp; - v_myAbsRelTimestamp := "PT2S"; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; timer t_notificationTimer := PX_TAC; var float v_elapsedTime; @@ -11018,16 +10998,16 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex_1 := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 v_createRequest := m_createSubscriptionBase; v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_1);//Subscription_1 - v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 + v_childResourceIndex_2 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 - v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp, "NullValue"); - v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_childResourceIndex_1), f_getResourceAddress(v_childResourceIndex_2)}; v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration @@ -11035,24 +11015,21 @@ module OneM2M_PermutationFunctions { f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - if(vc_ae2.running) { - vc_ae2.stop; - }; - // Test Body vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); - t_notificationTimer.start; - v_updateRequest_1.filterCriteria.labels := v_labels_1; + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + t_notificationTimer.start; v_elapsedTime := t_notificationTimer.read; - while (v_elapsedTime < str2float(v_myAbsRelTimestamp)){ // Wait until window size expires + //v_myAbsRelTimestamp = 2.0 seconds + while (v_elapsedTime < 2.0){ // Wait until window size expires v_elapsedTime := t_notificationTimer.read; } t_notificationTimer.stop; - v_updateRequest_2.filterCriteria.labels := v_labels_2; + v_updateRequest_2.primitiveContent.container.labels := v_labels_2; f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);