From 9b9ba3579926ac3bb2fa91840aeaef9ec61b7aff Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Wed, 28 Sep 2022 10:46:33 +0200 Subject: [PATCH] New crossResourceSubscription test cases according to TDE-2022-0044R01 Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- LibOneM2M/OneM2M_Functions.ttcn | 10 +- LibOneM2M/OneM2M_Pixits.ttcn | 14 +- LibOneM2M/OneM2M_Templates.ttcn | 54 +- OneM2M_PermutationFunctions.ttcn | 198 +++++ OneM2M_Testcases_CSE_Release_4.ttcn | 1097 +++++++++++++++++++++++++++ 5 files changed, 1361 insertions(+), 12 deletions(-) diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 67734f0..2db40e0 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -2758,7 +2758,7 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_aggregatedNotificationHandler /** - * @desc Handling message exchange for the notification procedure (deletion of subscription resource) + * @desc Handling message exchange for the notification procedure (deletion of subscription/crossResourceSubscription resource) * @param p_notification Expected notification * @verdict */ @@ -4267,6 +4267,12 @@ module OneM2M_Functions { if(ispresent(p_resource.subscription.dynamicAuthorizationConsultationIDs)) { vc_localResourcesList[p_localResourceIndex].resource.subscription.dynamicAuthorizationConsultationIDs := p_resource.subscription.dynamicAuthorizationConsultationIDs; } + if(ispresent(p_resource.subscription.notificationURI)) { + vc_localResourcesList[p_localResourceIndex].resource.subscription.notificationURI := p_resource.subscription.notificationURI; + } + if(ispresent(p_resource.subscription.associatedCrossResourceSub)) { + vc_localResourcesList[p_localResourceIndex].resource.subscription.associatedCrossResourceSub := p_resource.subscription.associatedCrossResourceSub; + } } else if(ischosen(vc_localResourcesList[p_localResourceIndex].resource.pollingChannel) and (ischosen(p_resource.pollingChannel))) {//pollingChannel if(ispresent(p_resource.pollingChannel.expirationTime)) { vc_localResourcesList[p_localResourceIndex].resource.pollingChannel.expirationTime := p_resource.pollingChannel.expirationTime; @@ -5909,7 +5915,7 @@ module OneM2M_Functions { return p_contentResource.semanticMashupJobProfile.resourceName; } if(ischosen(p_contentResource.crossResourceSubscription)) { - return p_contentResource.crossResourceSubscription.resourceID; + return p_contentResource.crossResourceSubscription.resourceName; } //Announced resources if(ischosen(p_contentResource.accessControlPolicyAnnc)) { diff --git a/LibOneM2M/OneM2M_Pixits.ttcn b/LibOneM2M/OneM2M_Pixits.ttcn index f3f79f0..1ac4693 100644 --- a/LibOneM2M/OneM2M_Pixits.ttcn +++ b/LibOneM2M/OneM2M_Pixits.ttcn @@ -38,37 +38,37 @@ module OneM2M_Pixits { /** * @desc IUT Upper Tester interface support */ - modulepar boolean PX_UT_IMPLEMENTED := true; + modulepar boolean PX_UT_IMPLEMENTED := false; /** * @desc IUT CSE Name */ - modulepar XSD.ID PX_CSE_NAME := "cse-in"; + modulepar XSD.ID PX_CSE_NAME := "CSE-NAME"; /** * @desc IUT CSE-ID with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1 */ - modulepar XSD.ID PX_CSE_ID := "/id-in"; + modulepar XSD.ID PX_CSE_ID := "/CSE-ID"; /** * @desc IUT CSE resource ID with Unstructured-CSE-relative-Resource-ID (relative) format according to TS-0001-7.2-1 */ - modulepar XSD.ID PX_CSE_RESOURCE_ID := "id-in"; + modulepar XSD.ID PX_CSE_RESOURCE_ID := "CSE-ID"; /** * @desc IUT M2M-SP-ID with M2M-SP-ID format (absolute) according to TS-0001-7.2-1 Unstructured-CSE-relative -Resource-ID */ - modulepar XSD.ID PX_SP_ID := "//acme.example.com"; + modulepar XSD.ID PX_SP_ID := "//CSE-SP-ID"; /** * @desc AE-ID with privileges to CREATE at the IUT CSEBase with AE-ID-Stem format (relative) according to TS-0001-7.2-1 */ - modulepar XSD.ID PX_SUPER_AE_ID := "CAdmin"; + modulepar XSD.ID PX_SUPER_AE_ID := "admin:admin"; /** * @desc CSE-ID with privileges to CREATE at the IUT CSEBase with SP-relative-CSE-ID format (relative) according to TS-0001-7.2-1 */ - modulepar XSD.ID PX_SUPER_CSE_ID := "CAdmin"; + modulepar XSD.ID PX_SUPER_CSE_ID := "admin:admin"; /** * @desc Allowed AE-IDs starting with C diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 2928f36..5cdfd6e 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -722,6 +722,15 @@ module OneM2M_Templates { primitiveContent:= {accessControlPolicy := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)} }; + /** + * @desc Base UPDATE request primitive for CrossResourceSubscription resource + */ + template (value) RequestPrimitive m_updateCrossResourceSubscriptionBase modifies m_update := { + requestIdentifier := "m_updateCrossResourceSubscription", + primitiveContent:= {crossResourceSubscription := m_contentUpdateCrossResourceSubscription} + }; + + /** * @desc Base UPDATE request primitive for GenericInterworkingService resource */ @@ -778,6 +787,13 @@ module OneM2M_Templates { primitiveContent:= {subscription := m_contentUpdateSubscription} }; + /** + * @desc Base Reception template for update Subscription + */ + template RequestPrimitive mw_updateSubscription(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := { + primitiveContent := {subscription := ?} + }; + template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) modifies m_update := { to_ := p_locResourceAddress, requestIdentifier := "m_updateLocationPolicy", @@ -2796,7 +2812,7 @@ 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) modifies m_create := { + in template (omit) TimeWindowType p_timeWindowType := int1, in template (value) XSD.Duration p_timeWindowSize) modifies m_create := { to_ := p_parentResourceAddress, requestIdentifier := testcasename() & "-m_createCrossResourceSubscription", resourceType := int48, @@ -7329,6 +7345,38 @@ module OneM2M_Templates { choice := omit //NP }; + /** + * @desc Base primitiveContent for UPDATE operation for CrossResourceSubscription resource + */ + template (value) CrossResourceSubscription_optional m_contentUpdateCrossResourceSubscription := { + resourceName := omit,//NP + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + accessControlPolicyIDs := omit,//O + expirationTime := omit,//O + dynamicAuthorizationConsultationIDs := omit, //O + custodian := omit,//O + creator := omit,//NP + regularResourcesAsTarget := omit, //NP + subscriptionResourcesAsTarget := omit, //NP + regularResourcesAsTargetSubscriptions := omit,//NP + timeWindowType := omit, //O + timeWindowSize := omit, //O + eventNotificationCriteriaSet := omit, //NP + notificationEventCat := omit, //O + expirationCounter := omit, //O + notificationURI := omit, //O + subscriberURI := omit, //NP + notificationStatsEnable := omit, //O + notificationStatsInfo := omit, //NP + choice := omit//NP + }; + + template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) modifies m_contentUpdateAcp := { privileges := p_privileges,//O selfPrivileges := p_selfPrivileges//O @@ -8813,7 +8861,7 @@ module OneM2M_Templates { choice := *//O }; - template Group_optional mw_contentGroupBase := { + template Group_optional mw_contentGroupBase := { resourceName := ?,//M resourceType := ?,//M resourceID := ?,//M @@ -10456,7 +10504,7 @@ module OneM2M_Templates { expirationTime := *,//O dynamicAuthorizationConsultationIDs := *,//O custodian := *,//O - creator := ?,//M + creator := *,//O regularResourcesAsTarget := *,//O subscriptionResourcesAsTarget := *,//O regularResourcesAsTargetSubscriptions := *,//O diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 78af0e1..37dbdb1 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -11041,6 +11041,204 @@ module OneM2M_PermutationFunctions { f_cf01Down(); } // end f_CSE_SUB_NTF_016 + + function f_CSE_SUB_NTF_xx2(template (omit) EventNotificationCriteriaSet p_eventNotificationCriteriaSet) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var template RequestPrimitive v_createRequest := m_createContainer_noResourceName; + const ResourceType c_containerResourceType := int3; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + 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_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1, e_nonHierarchical, e_cseRelative)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet := p_eventNotificationCriteriaSet; + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + // Test Body + v_createRequest := f_getCreateRequestPrimitive(int48, v_createRequest, v_aeIndex_1); + f_send(e_mcaPort, m_request(valueof(v_createRequest))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CrossResourceSubscription CREATE request rejected because neither regularResourcesAsTarget nor subscriptionResourcesAsTarget attribute are present"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": CrossResourceSubscription CREATE request accepted without having regularResourcesAsTarget nor subscriptionResourcesAsTarget attributes"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_xx2 + + function f_CSE_SUB_NTF_xx7(template RequestPrimitive p_updateRequest) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var template RequestPrimitive v_createRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), -)); + v_crossResourceSubscriptionIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + // Test Body + p_updateRequest := f_getUpdateRequestPrimitive(int48, v_crossResourceSubscriptionIndex, p_updateRequest); + f_send(e_mcaPort, m_request(valueof(p_updateRequest))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CrossResourceSubscription UPDATE request rejected because NP attribute is present"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": CrossResourceSubscription UPDATE request accepted with NP attribute being present"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription UPDATE request"); + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + } // end f_CSE_SUB_NTF_xx7 + + function f_CSE_SUB_NTF_xx8(template RequestPrimitive p_updateRequest) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + 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 := "PT5S"; + var float v_elapsedTime; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//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_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, -, 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 + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + + v_updateRequest_1.primitiveContent.container.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + + //Update crossResourceSubscription resource (twt or tws) so that time window is restarted + f_cse_updateResource(int48, v_resourceIndex, p_updateRequest); + + // Giving enough time to restart the time window + f_sleep(2.0); + + //Update of second container should be taken as the only notification received within the new time window + 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); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_xx8 }//end group Notify diff --git a/OneM2M_Testcases_CSE_Release_4.ttcn b/OneM2M_Testcases_CSE_Release_4.ttcn index 6d2f1e6..1916b82 100644 --- a/OneM2M_Testcases_CSE_Release_4.ttcn +++ b/OneM2M_Testcases_CSE_Release_4.ttcn @@ -2687,6 +2687,1103 @@ module OneM2M_Testcases_CSE_Release_4 { } // end TC_CSE_SUB_NTF_023 + /** @desc Check that the IUT rejects a crossResourceSubscription CREATE request if neither regularResourcesAsTarget nor subscriptionResourcesAsTarget attributes are present + * + */ + testcase TC_CSE_SUB_NTF_xx1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_xx1()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_xx1() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var template RequestPrimitive v_createRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}, -);//c_CRUDNDi); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, -, v_myAbsRelTimestamp); + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + // Test Body + v_createRequest := f_getCreateRequestPrimitive(int48, v_createRequest, v_aeIndex_1); + f_send(e_mcaPort, m_request(valueof(v_createRequest))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CrossResourceSubscription CREATE request rejected because neither regularResourcesAsTarget nor subscriptionResourcesAsTarget attribute are present"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": CrossResourceSubscription CREATE request accepted without having regularResourcesAsTarget nor subscriptionResourcesAsTarget attributes"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_xx1 + + group g_CSE_SUB_NTF_xx2 { + + /** + * @desc Check that the IUT rejects a crossResourceSubscription CREATE request if the eventNotificationCriteriaSet attribute is set to EVENT_NOTIFICATION_CRITERIA_SET and regularResourcesAsTarget attribute is set + * + */ + testcase TC_CSE_SUB_NTF_xx2_ENCS_NP() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_xx2(omit)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_xx2_ENCS_IV() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template EventNotificationCriteriaSet v_eventNotificationCriteriaSet; + var template EventNotificationCriteria v_eventNotificationCriteria_1 := m_eventNotificationCriteria ( {int1}, -); + var template EventNotificationCriteria v_eventNotificationCriteria_2 := m_eventNotificationCriteria ( {int2}, -); + + v_eventNotificationCriteriaSet := {eventNotificationCriteriaEntry_list := {v_eventNotificationCriteria_1, v_eventNotificationCriteria_2}} + + v_ae1.start(f_CSE_SUB_NTF_xx2(valueof(v_eventNotificationCriteriaSet))); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_xx2 + + /** @desc Check that the IUT sends a subscription CREATE request to the target resource indicated in the regularResourcesAsTarget attribute of a crossResourceSubscription CREATE request + * + */ + testcase TC_CSE_SUB_NTF_xx3() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_SUB_NTF_xx3()); + + v_cse1.done; + + } + + function f_CSE_SUB_NTF_xx3() runs on CseSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var template RequestPrimitive v_createRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource_cseSimu(int1, m_createAcpBase); // AE child resource + + f_cse_registerRemoteCse(m_createRemoteCSE_poa(vc_cseSimuDesc.cseId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()})); + + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_TS_AE1.appId, -, -, -, { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }))); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_aeIndex := f_getLatestResourceIndex(vc_ae1); + + v_originatorResourceAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + + v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_targetResourceAddress := f_getLocalResourceAddress(v_targetResourceIndex, PX_ADDRESSING_METHOD, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + + // Test Body + vc_ae1.start(f_cse_createResource(int48, v_createRequest, v_aeIndex)); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress))) -> value vc_request { + setverdict(pass, __SCOPE__ & ": Subscription CREATE Request primitive received successfully"); + f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mccPortIn.receive(mw_request(mw_create(v_originatorResourceAddress, v_targetResourceAddress))) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong CREATE request received"); + f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier))); + } + [] mccPortIn.receive(mw_request(?)) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong request received"); + f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + //Tear down + f_cf02DownCseSimuMaster(); + + } // end f_CSE_SUB_NTF_xx3 + + /** @desc Check that the IUT rejects a crossResourceSubscription CREATE request if any subscription for a target resource indicated in the regularResourcesAsTarget attribute is not successfully created + * + */ + testcase TC_CSE_SUB_NTF_xx4() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_xx4()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_xx4() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var template RequestPrimitive v_createRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + + // Test Body + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), int4000)); + v_createRequest := f_getCreateRequestPrimitive(int48, v_createRequest, v_aeIndex); + f_send(e_mcaPort, m_request(valueof(v_createRequest))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5221))) -> value vc_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": CrossResourceSubscription CREATE request rejected because Subscription could not be created at target resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": CrossResourceSubscription CREATE request accepted without having successfully created Subscription resource at target resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + } // end f_CSE_SUB_NTF_xx4 + + /** @desc Check that the IUT sends a subscription UPDATE request to the subscription resource indicated in the subscriptionResourcesAsTarget attribute of a crossResourceSubscription CREATE request + * + */ + testcase TC_CSE_SUB_NTF_xx5() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_SUB_NTF_xx5()); + + v_cse1.done; + + } + + function f_CSE_SUB_NTF_xx5() runs on CseSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var template RequestPrimitive v_createRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource_cseSimu(int1, m_createAcpBase); // AE child resource + + f_cse_registerRemoteCse(m_createRemoteCSE_poa(vc_cseSimuDesc.cseId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()})); + + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_TS_AE1.appId, -, -, -, { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }))); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_aeIndex := f_getLatestResourceIndex(vc_ae1); + + v_originatorResourceAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + + v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentSubscription(m_contentCreateSubscription({"WhateverTarget"}))), vc_cSEBaseIndex, int23); + v_targetResourceAddress := f_getLocalResourceAddress(v_targetResourceIndex, PX_ADDRESSING_METHOD, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {v_targetResourceAddress}; + + // Test Body + vc_ae1.start(f_cse_createResource(int48, v_createRequest, v_aeIndex)); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_updateSubscription(v_originatorResourceAddress, v_targetResourceAddress))) -> value vc_request { + setverdict(pass, __SCOPE__ & ": Subscription UPDATE Request primitive received successfully"); + f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive); + f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mccPortIn.receive(mw_request(mw_update(v_originatorResourceAddress, v_targetResourceAddress))) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong UPDATE request received"); + f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + //Tear down + f_cf02DownCseSimuMaster(); + + } // end f_CSE_SUB_NTF_xx5 + + /** @desc Check that the IUT records notification statistics in the notificationStatsInfo attribute of the crossResourceSubscription resource if the notificationStatsEnable attribute of the crossResourceSubscription CREATE request is set to TRUE + * + */ + testcase TC_CSE_SUB_NTF_xx6() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_xx6()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_xx6() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var integer v_subscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + var template PrimitiveContent v_retrieveContentResponse; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var template Notification v_notification; + v_retrieveContentResponse.crossResourceSubscription := mw_contentCrossResourceSubscriptionBase; + + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + //v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_targetResourceIndex := f_getLatestLocalResource(vc_cse1); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + v_createRequest.primitiveContent.crossResourceSubscription.notificationStatsEnable := true; + + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), -)); + v_crossResourceSubscriptionIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_subscriptionIndex := f_getLatestLocalResource(vc_cse1); + //Simulating update of the target resource and sending a notification from CSE1 + v_notification := m_contentNotificationEmpty; + v_notification.subscriptionReference := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative); + v_notification.notificationEvent.notificationEventType := int1; + v_notification.notificationEvent.operationMonitor := omit; + v_notification.notificationEvent.representation.resource := vc_resourcesList[v_targetResourceIndex].resource; + + vc_cse1.start(f_cse_notifyProcedure_notify(valueof(m_notifyNotification(vc_resourcesList[v_subscriptionIndex].resource.subscription.notificationURI[0], valueof(v_notification), -)))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + f_cse_notifyProcedure_defaultHandler(); + + // Test Body + f_sleep(5.0); + v_retrieveRequest := valueof(m_retrieve(f_getResourceAddress(v_crossResourceSubscriptionIndex), f_getOriginator(v_aeIndex))); + f_send(e_mcaPort, m_request(valueof(v_retrieveRequest))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response { + tc_ac.stop; + if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) { + if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){ + setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly"); + } + else{ + setverdict(fail, __SCOPE__ & ": ERROR: Notifications not recorded properly"); + } + } else { + setverdict(fail, __SCOPE__ & ": ERROR: Notifications not recorded"); + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + } // end f_CSE_SUB_NTF_xx6 + + group g_CSE_SUB_NTF_xx7 { + + /** @desc Check that the IUT rejects a crossResourceSubscription UPDATE request if ATTRIBUTE attribute is present + * + */ + testcase TC_CSE_SUB_NTF_xx7_RRAT() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_updateRequest := m_updateCrossResourceSubscriptionBase; + + v_updateRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {"WhateverResourceTarget"} ; + + v_ae1.start(f_CSE_SUB_NTF_xx7(v_updateRequest)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_xx7_SRAT() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_updateRequest := m_updateCrossResourceSubscriptionBase; + + v_updateRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {"WhateverResourceTarget"} ; + + v_ae1.start(f_CSE_SUB_NTF_xx7(v_updateRequest)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_xx7_ENCS() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_updateRequest := m_updateCrossResourceSubscriptionBase; + var template EventNotificationCriteria v_eventNotificationCriteria_1 := m_eventNotificationCriteria ( {int1}, -); + + v_updateRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet := {eventNotificationCriteriaEntry_list := {v_eventNotificationCriteria_1}}; + + v_ae1.start(f_CSE_SUB_NTF_xx7(v_updateRequest)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_xx7 + + group g_CSE_SUB_NTF_xx8 { + + /** @desc Check that the IUT restarts the time window for a crossResourceSubscription resource if ATTRIBUTE is properly updated + * + */ + testcase TC_CSE_SUB_NTF_xx8_TWT() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_updateRequest := m_updateCrossResourceSubscriptionBase; + + v_updateRequest.primitiveContent.crossResourceSubscription.timeWindowType := int2 ; + + v_ae1.start(f_CSE_SUB_NTF_xx8(v_updateRequest)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_xx8_TWS() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var template RequestPrimitive v_updateRequest := m_updateCrossResourceSubscriptionBase; + + v_updateRequest.primitiveContent.crossResourceSubscription.timeWindowSize := "PT10S"; + + v_ae1.start(f_CSE_SUB_NTF_xx8(v_updateRequest)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_xx8 + + /** @desc Check that the IUT restarts recording notification statistics in the notificationStatsInfo attribute of the crossResourceSubscription resource if the notificationStatsEnable attribute of the crossResourceSubscription UPDATE request is set to TRUE + * + */ + testcase TC_CSE_SUB_NTF_xx9() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_xx9()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_xx9() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var integer v_subscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + var template PrimitiveContent v_retrieveContentResponse; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var template Notification v_notification; + v_retrieveContentResponse.crossResourceSubscription := mw_contentCrossResourceSubscriptionBase; + + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + //v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_targetResourceIndex := f_getLatestLocalResource(vc_cse1); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + v_createRequest.primitiveContent.crossResourceSubscription.notificationStatsEnable := true; + + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), -)); + v_crossResourceSubscriptionIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_subscriptionIndex := f_getLatestLocalResource(vc_cse1); + //Simulating update of the target resource and sending a notification from CSE1 + v_notification := m_contentNotificationEmpty; + v_notification.subscriptionReference := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative); + v_notification.notificationEvent.notificationEventType := int1; + v_notification.notificationEvent.operationMonitor := omit; + v_notification.notificationEvent.representation.resource := vc_resourcesList[v_targetResourceIndex].resource; + + vc_cse1.start(f_cse_notifyProcedure_notify(valueof(m_notifyNotification(vc_resourcesList[v_subscriptionIndex].resource.subscription.notificationURI[0], valueof(v_notification), -)))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + f_cse_notifyProcedure_defaultHandler(); + + //Update crossResourceSubscription notificationStatsEnable to True + v_updateRequest.primitiveContent.crossResourceSubscription.notificationStatsEnable := true; + f_cse_updateResource(int48, v_crossResourceSubscriptionIndex, v_updateRequest); + + //Simulating second update of the target resource and sending another notification from CSE1 + vc_cse1.start(f_cse_notifyProcedure_notify(valueof(m_notifyNotification(vc_resourcesList[v_subscriptionIndex].resource.subscription.notificationURI[0], valueof(v_notification), -)))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + f_cse_notifyProcedure_defaultHandler(); + + // Test Body + f_sleep(5.0); + v_retrieveRequest := valueof(m_retrieve(f_getResourceAddress(v_crossResourceSubscriptionIndex), f_getOriginator(v_aeIndex))); + f_send(e_mcaPort, m_request(valueof(v_retrieveRequest))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response { + tc_ac.stop; + if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) { + if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){ + setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly"); + } + else{ + setverdict(fail, __SCOPE__ & ": ERROR: Notifications not recorded properly"); + } + } else { + setverdict(fail, __SCOPE__ & ": ERROR: Notifications not recorded"); + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + } // end f_CSE_SUB_NTF_xx9 + + /** @desc Check that the IUT stops recording notification statistics in the notificationStatsInfo attribute of the crossResourceSubscription resource if the notificationStatsEnable attribute of the crossResourceSubscription UPDATE request is set to FALSE and keeps the current value of the notificationStatsInfo + * + */ + testcase TC_CSE_SUB_NTF_x10() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_x10()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_x10() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var integer v_subscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + var template PrimitiveContent v_retrieveContentResponse; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var template Notification v_notification; + v_retrieveContentResponse.crossResourceSubscription := mw_contentCrossResourceSubscriptionBase; + + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + //v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_targetResourceIndex := f_getLatestLocalResource(vc_cse1); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + v_createRequest.primitiveContent.crossResourceSubscription.notificationStatsEnable := true; + + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), -)); + v_crossResourceSubscriptionIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_subscriptionIndex := f_getLatestLocalResource(vc_cse1); + //Simulating update of the target resource and sending a notification from CSE1 + v_notification := m_contentNotificationEmpty; + v_notification.subscriptionReference := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative); + v_notification.notificationEvent.notificationEventType := int1; + v_notification.notificationEvent.operationMonitor := omit; + v_notification.notificationEvent.representation.resource := vc_resourcesList[v_targetResourceIndex].resource; + + vc_cse1.start(f_cse_notifyProcedure_notify(valueof(m_notifyNotification(vc_resourcesList[v_subscriptionIndex].resource.subscription.notificationURI[0], valueof(v_notification), -)))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + f_cse_notifyProcedure_defaultHandler(); + + //Update crossResourceSubscription notificationStatsEnable to False + v_updateRequest.primitiveContent.crossResourceSubscription.notificationStatsEnable := false; + f_cse_updateResource(int48, v_crossResourceSubscriptionIndex, v_updateRequest); + + //Simulating second update of the target resource and sending another notification from CSE1 + vc_cse1.start(f_cse_notifyProcedure_notify(valueof(m_notifyNotification(vc_resourcesList[v_subscriptionIndex].resource.subscription.notificationURI[0], valueof(v_notification), -)))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + f_cse_notifyProcedure_defaultHandler(); + + // Test Body + f_sleep(5.0); + v_retrieveRequest := valueof(m_retrieve(f_getResourceAddress(v_crossResourceSubscriptionIndex), f_getOriginator(v_aeIndex))); + f_send(e_mcaPort, m_request(valueof(v_retrieveRequest))); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response { + tc_ac.stop; + if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) { + if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){ + setverdict(pass, __SCOPE__ & ": INFO: notifications recording stopped and kept correctly"); + } + else{ + setverdict(fail, __SCOPE__ & ": ERROR: Notifications not stopped properly"); + } + } else { + setverdict(fail, __SCOPE__ & ": ERROR: Notifications recording stopped and current value not kept"); + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + } // end f_CSE_SUB_NTF_x10 + + /** @desc Check that the IUT sends a Notify request to the subscriberURI attribute when the crossResourceSubscription resource is deleted + * + */ + testcase TC_CSE_SUB_NTF_x11() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_x11()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_x11() runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var integer v_subscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_originatorResourceAddress, v_targetResourceAddress; + var MsgIn v_response; + var RequestPrimitive v_deleteRequest; + var template Notification v_notification; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); // AE child resource + + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + //v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + + vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), -, int3)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, PX_ADDRESSING_METHOD, e_spRelative); + + v_targetResourceIndex := f_getLatestLocalResource(vc_cse1); + + v_originatorResourceAddress := f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_originatorResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + v_createRequest.primitiveContent.crossResourceSubscription.subscriberURI := v_originatorResourceAddress; + + vc_cse1.start(f_cse_createResourceHandler(mw_createSubscription(v_originatorResourceAddress, v_targetResourceAddress), -)); + v_crossResourceSubscriptionIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_subscriptionIndex := f_getLatestLocalResourceIndex(vc_cse1); + + v_deleteRequest := valueof(m_delete(f_getResourceAddress(v_crossResourceSubscriptionIndex), f_getOriginator(v_crossResourceSubscriptionIndex))); // CrossResourceSubscription resource deletion request + + vc_cse1.start(f_cse_deleteResourceHandler(v_subscriptionIndex)); // Handling deletion of subscription resource + + // Test Body + f_send(e_mcaPort, m_request(v_deleteRequest)); + + v_notification.subscriptionReference := ?; + v_notification.notificationEvent := omit; + f_cse_notifyProcedure_subscriptionDeletionHandler(v_notification); // check that crossResourceSubscription notification deletion is received + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Subscription resource deleted successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource type int23 (Subscription)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type int23 (Subscription)"); + } + } + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + if(f_compareURIs(v_crossResourceSubscriptionIndex, vc_request.primitive.requestPrimitive.primitiveContent.notification.subscriptionReference)) { + setverdict(pass, __SCOPE__ & ": SubscriptionReference set to crossResourceSubscription resource identifier"); + } else { + setverdict(fail, __SCOPE__ & ": SubscriptionReference not set to crossResourceSubscription resource identifier"); + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf02Down(); + + + } // end f_CSE_SUB_NTF_x11 + + /** @desc Check that the IUT deletes the subscription resoruces created during the crossResourceSubscription creation when the crossResourceSubscription resource is deleted + * + */ + testcase TC_CSE_SUB_NTF_x12() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_SUB_NTF_x12()); + + v_cse1.done; + + } + + function f_CSE_SUB_NTF_x12() runs on CseSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var integer v_subscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_aeResourceAddress, v_targetResourceAddress, v_crossResourceSubscriptionAddress; + var MsgIn v_response; + var RequestPrimitive v_deleteRequest; + var template Notification v_notification; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource_cseSimu(int1, m_createAcpBase); // CSEBase child resource + + f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()})); + + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_TS_AE1.appId, -, -, -, { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }))); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_aeIndex := f_getLatestResourceIndex(vc_ae1); + v_aeResourceAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + + v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + + v_targetResourceAddress := f_getLocalResourceAddress(v_targetResourceIndex, PX_ADDRESSING_METHOD, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_aeResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + + vc_ae1.start(f_cse_createResource(int48, v_createRequest, v_aeIndex)); + v_subscriptionIndex := f_cse_createResourceHandler(mw_createSubscription(v_aeResourceAddress, v_targetResourceAddress), -); + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_crossResourceSubscriptionAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + v_crossResourceSubscriptionIndex := f_getLatestResourceIndex(vc_ae1); + + vc_ae1.start(f_cse_deleteResource(v_crossResourceSubscriptionIndex)); // Handling deletion of subscription resource + + // Test Body + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(mw_delete)) -> value vc_request { + tc_ac.stop; + v_targetResourceIndex := f_processDeleteRequestPrimitive(vc_request.primitive.requestPrimitive, -, -); + if(v_targetResourceIndex == v_subscriptionIndex) { + setverdict(pass, __SCOPE__&":INFO: Resource deleted successfuly"); + } else { + setverdict(fail, __SCOPE__&":INFO: Unexpected resource delete"); + } + f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); + + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__&":INFO: No answer while retrieving resource"); + } + } + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + //Tear down + f_cf02DownCseSimuMaster(); + + + } // end f_CSE_SUB_NTF_x12 + + /** @desc Check that the IUT updates the subscription resoruces indicated in the subscriptionResourcesAsTarget attribute to remove the resource identifier of the crossResourceSubscription from the subscription's associatedCrossResourceSub and notificationURI attributes when the crossResourceSubscription resource is deleted' when the crossResourceSubscription resource is deleted + * + */ + testcase TC_CSE_SUB_NTF_x13() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_SUB_NTF_x13()); + + v_cse1.done; + + } + + function f_CSE_SUB_NTF_x13() runs on CseSimu system CseSystem { + + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_targetResourceIndex := -1; + var integer v_crossResourceSubscriptionIndex := -1; + var template RequestPrimitive v_createRequest, v_retrieveRequest; + var XSD.Duration v_myAbsRelTimestamp := "PT2S"; + var XSD.ID v_aeResourceAddress, v_targetResourceAddress, v_crossResourceSubscriptionAddress; + var MsgIn v_response; + var RequestPrimitive v_deleteRequest; + var template RequestPrimitive v_updateRequest; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource_cseSimu(int1, m_createAcpBase); // CSEBase child resource + + f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -, -, -, {f_getLocalPoA()})); + + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_TS_AE1.appId, -, -, -, { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }))); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_aeIndex := f_getLatestResourceIndex(vc_ae1); + v_aeResourceAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + + v_targetResourceIndex := f_generateAndSetLocalResource(valueof(m_primitiveContentSubscription(m_contentCreateSubscription({"WhateverTarget"}))), vc_cSEBaseIndex, int23); + v_targetResourceAddress := f_getLocalResourceAddress(v_targetResourceIndex, PX_ADDRESSING_METHOD, e_spRelative); + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {v_aeResourceAddress}, -, v_myAbsRelTimestamp); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {v_targetResourceAddress}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria ( {int1}, -)}; + + vc_ae1.start(f_cse_createResource(int48, v_createRequest, v_aeIndex)); + f_cse_updateResourceHandler(v_targetResourceIndex, mw_updateSubscription(v_aeResourceAddress, v_targetResourceAddress), -); + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + v_crossResourceSubscriptionAddress := f_getLatestResourceAddress(vc_ae1, e_nonHierarchical, e_spRelative); + v_crossResourceSubscriptionIndex := f_getLatestResourceIndex(vc_ae1); + + vc_ae1.start(f_cse_deleteResource(v_crossResourceSubscriptionIndex)); // Handling deletion of subscription resource + + // Test Body + v_updateRequest := mw_updateSubscription(v_aeResourceAddress, v_targetResourceAddress); + v_updateRequest.primitiveContent.subscription.notificationURI := {"WhateverTarget"}; + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(v_updateRequest, {"associatedCrossResourceSub"})) -> value vc_request { + setverdict(pass, __SCOPE__ & ": Subscription UPDATE Request primitive received successfully"); + f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive); + f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mccPortIn.receive(mw_request(mw_update(v_aeResourceAddress, v_targetResourceAddress))) -> value vc_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong UPDATE request received"); + f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a CrossResourceSubscription CREATE request"); + } + } + + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + //Tear down + f_cf02DownCseSimuMaster(); + + } // end f_CSE_SUB_NTF_x13 }//end group Notify -- GitLab