diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 7fdd51e3cccbb2bc7778eb5c615d649be2d70e8a..72ccb87620c5b3f8227a4a81df87cf0b6149f6f9 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1653,6 +1653,42 @@ module OneM2M_Functions { } //end f_cse_notifyProcedure_noNotification Handler + /** + * @desc Message exchange for notification + * @param p_requestPrimitive Notify request to be used for the notification + * @verdict + */ + function f_cse_notifyProcedure_notify(template RequestPrimitive p_requestPrimitive) runs on CseSimu { + // Local variables + var RequestPrimitive v_request; + var ResponsePrimitive v_responsePrimitive; + var integer v_resourceIndex := -1; + + v_request.from_ := PX_CSE1_ID; + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, mw_primitiveContentNotification(mw_contentNotification_any)))) -> value vc_response { + tc_ac.stop; + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Error while performing notification"); + } + [] mccPort.receive { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification"); + } + } + + f_checkCseSimuStatus(); + + } //end f_cse_notifyProcedure_notify + /** * @desc Checking of notification primitiveContent * @param p_requestPrimitive Received Notification request diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 9185cada325dec6f054833f8b6402343cc289a7b..1602d4af6ebc98c83fda1ee26633f5c36ed086e3 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -376,6 +376,16 @@ module OneM2M_Templates { } }; + /** + * @desc RETRIEVE request primtive for polling request + * @param p_targetResourceAddress Target resource address + * @param p_filterCriteria FilterCriteria + * @param p_originator Originator (from) + */ + template (value) RequestPrimitive m_retrievePollingRequest(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := { + to_ := p_targetResourceAddress & "/pcu" + }; + /** * @desc FilterCriteria empty template */ @@ -1298,6 +1308,14 @@ module OneM2M_Templates { vendorInformation := * }; + /** + * @desc Base UPDATE request primitive for PollingChannel resource + */ + template (value) RequestPrimitive m_deletePollingChannelBase(XSD.ID p_resourceAddress, in XSD.ID p_originator := PX_SUPER_AE_ID) modifies m_delete := { + requestIdentifier := "m_deletePollingChannel", + primitiveContent:= {pollingChannel := m_contentDeletePollingChannel} + }; + }//end group Delete group Notify { @@ -1305,13 +1323,13 @@ module OneM2M_Templates { /** * @desc Base NOTIFY request primitive */ - template RequestPrimitive m_notify := { + template RequestPrimitive m_notify(XSD.ID p_resourceAddress) := { operation := int5, - to_ := "NotInitialized", - from_ := omit, + to_ := p_resourceAddress, + from_ := "NotInitialized", requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000), resourceType := omit, - primitiveContent := {notification := m_contentCreateNotification_allOmit}, + primitiveContent := {notification := m_contentNotification_allOmit}, roleIDs := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -1342,7 +1360,7 @@ module OneM2M_Templates { from_ := omit, requestIdentifier := testcasename() & "-m_notifyAggregatedNotification" & f_rnd(1, 1000000), resourceType := omit, - primitiveContent := {aggregatedNotification := {notification_list := {m_contentCreateNotification_allOmit,m_contentCreateNotification_allOmit}}}, + primitiveContent := {aggregatedNotification := {notification_list := {m_contentNotification_allOmit,m_contentNotification_allOmit}}}, roleIDs := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -1439,6 +1457,10 @@ module OneM2M_Templates { } template PrimitiveContent mw_primitiveContent := ?; + + template PrimitiveContent mw_primitiveContentNotification (template Notification p_notification) := { + notification := p_notification + }; /** * @desc Base primitiveContent for CREATE operation for AEAnnc resource @@ -2292,25 +2314,6 @@ module OneM2M_Templates { iPEDiscoveryRequest := omit }; - template (value) Notification m_contentCreateNotification_allOmit := { - notificationEvent := { - representation := omit, - operationMonitor := { - operation := omit, - originator := omit - }, - notificationEventType := omit - }, - verificationRequest := omit, - subscriptionDeletion := omit, - subscriptionReference := omit, - creator := omit, - notificationForwardingURI := omit, - notificationTarget := omit, - targetRemovalRequest := omit, - targetRemovalAllowance := omit, - iPEDiscoveryRequest := omit - }; /** * @desc Base primitiveContent for CREATE operation for SemanticDescriptor resource */ @@ -2819,6 +2822,40 @@ module OneM2M_Templates { }//end group ContentUpdate + + group ContentRetrieve { + /** + * @desc Base primitiveContent for DELETE operation for PollingChannel resource + */ + template (value) PollingChannel_optional m_contentRetrievePollingChannel := { + resourceName := omit,//NP + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + expirationTime := omit//O + }; + } + + group ContentDelete { + + /** + * @desc Base primitiveContent for DELETE operation for PollingChannel resource + */ + template (value) PollingChannel_optional m_contentDeletePollingChannel := { + resourceName := omit,//NP + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + expirationTime := omit//O + }; + + } //end group ContentDelete group RequestContent { @@ -4216,6 +4253,23 @@ module OneM2M_Templates { vendorInformation := * }; + template ResponsePrimitive mw_responsePollingResponse (template RequestPrimitive p_requestPrimitive := ?) := { + responseStatusCode := int2000, + requestIdentifier := ?, + primitiveContent := {requestPrimitive := p_requestPrimitive}, + to_ := *, + from_ := *, + originatingTimestamp := *, + resultExpirationTimestamp := *, + eventCategory := *, + contentStatus := *, + contentOffset := *, + assignedTokenIdentifiers := *, + tokenRequestInformation := *, + releaseVersionIndicator := ?, + vendorInformation := * + }; + template ResponsePrimitive mw_responseDiscovery (template URIList p_uriList := ?) := { responseStatusCode := int2000, requestIdentifier := ?, @@ -4249,6 +4303,8 @@ module OneM2M_Templates { releaseVersionIndicator := "2a", vendorInformation := omit }; + + group InfoPortTemplates { @@ -4331,6 +4387,14 @@ module OneM2M_Templates { } } + template (value) UtTriggerPrimitive m_utCreatePollingChannel modifies m_utCreate := { + requestPrimitive := { + requestIdentifier := testcasename() & "-m_utCreatePollingChannel" & f_rnd(1, 1000000), + resourceType := int15, + primitiveContent := {pollingChannel := m_contentPollingChannel_allOmit} + } + } + template (value) UtTriggerPrimitive m_utRetrieve(XSD.ID p_targetResourceAddress) := { requestPrimitive := { operation := int2, @@ -4362,6 +4426,14 @@ module OneM2M_Templates { forcedFields := omit }; + template (value) UtTriggerPrimitive m_utRetrievePollingChannel(XSD.ID p_targetResourceAddress) modifies m_utRetrieve := { + requestPrimitive := { + requestIdentifier := testcasename() & "-m_utRetrievePollingChannel" & f_rnd(1, 1000000), + resourceType := int15, + primitiveContent := {pollingChannel := m_contentRetrievePollingChannel} + } + } + template (value) UtTriggerPrimitive m_utUpdate := { requestPrimitive := { operation := int3, diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 099a05bfb707f60c20b943edeb5013abfaee4db6..62010691dce9a2821d50b1b9efad86faab929eb7 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -1730,6 +1730,7 @@ type union PrimitiveContent { ResourceRefList resourceRefList, AggregatedResponse aggregatedResponse, URI uRI, + RequestPrimitive requestPrimitive, DebugInfo debugInfo, //Invalid types AE_update_invalid aE_update_invalid, diff --git a/OneM2M_Testcases_AE_Release_1.ttcn b/OneM2M_Testcases_AE_Release_1.ttcn index f3c3a86f3ec741b163fbc8acc1b57dbd17c5ec87..1d435e6fcef35896871e73d5937c765f86698a6c 100644 --- a/OneM2M_Testcases_AE_Release_1.ttcn +++ b/OneM2M_Testcases_AE_Release_1.ttcn @@ -2037,7 +2037,7 @@ module OneM2M_Testcases_AE_Release_1 { //Test behavior - mcaPortIn.send(m_request(m_notify)); + mcaPortIn.send(m_request(m_notify(f_getLocalResourceAddress(v_auxInteger)))); tc_ac.start; alt{ diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index 02f298feb6135e36e42a3368c416b9d61f45d762..f9f4085039c1556bac2ed92b85301983f96358c6 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -8587,6 +8587,500 @@ module OneM2M_Testcases_CSE_Release_2 { }//end group Delete }//end group Announcement + + group PollingChannel { + + /** + * @desc Check that the IUT which hosts <pollingChannel> resource forwards a Notify request successfully to a target AE, once the IUT receives a polling request from AE (retrieve request to <pollingChannelURI> resource) + * + */ + testcase TC_CSE_PCH_001() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_PCH_001()); + + v_ae1.done; + + } + + function f_CSE_PCH_001() runs on AeSimu { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); + vc_cse1.done; + + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); + + v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + mcaPort.send(m_request(v_request)); + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex))); + + vc_cse1.start(f_cse_notifyProcedure_notify(v_requestNotify)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_requestNotify))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Polling response received"); + } + [] mcaPort.receive(mw_response(mw_responsePollingResponse)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Content not carrying request targeting AE1"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + 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_cf01Down(); + } // end TC_CSE_PCH_001 + + /** + * @desc Check that the IUT which hosts <pollingChannel> resource forwards a Notify request successfully to a target AE, once the IUT receives a polling request from AE + * + */ + testcase TC_CSE_PCH_002() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_PCH_002()); + + v_ae1.done; + + } + + function f_CSE_PCH_002() runs on AeSimu { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); + vc_cse1.done; + + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex))); + + vc_cse1.start(f_cse_notifyProcedure_notify(v_requestNotify)); + + v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + mcaPort.send(m_request(v_request)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_requestNotify))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Polling response received"); + } + [] mcaPort.receive(mw_response(mw_responsePollingResponse)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Content not carrying request targeting AE1"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + 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_cf01Down(); + } // end TC_CSE_PCH_002 + + testcase TC_CSE_PCH_003() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_PCH_003()); + + v_ae1.done; + + } + + function f_CSE_PCH_003() runs on AeSimu { + //Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase)); + vc_cse1.done; + + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); + + v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + mcaPort.send(m_request(v_request)); + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex))); + vc_cse1.start(f_cse_notifyProcedure_notify(v_requestNotify)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_requestNotify))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Polling response received"); + } + [] mcaPort.receive(mw_response(mw_responsePollingResponse)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Content not carrying request targeting AE1"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + mcaPort.send(m_request(v_requestNotify)); + + //Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf02Down(); + } + + testcase TC_CSE_PCH_004() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_PCH_004()); + + v_cse1.done; + } + + function f_CSE_PCH_004() runs on CseSimu { + //Local variables + var integer v_cseIndex := -1; + var integer v_resourceIndex := -1; + var MsgIn v_request; + var ResponsePrimitive v_response; + var template UtTriggerPrimitive v_utRequest1 := m_utCreatePollingChannel; + var template UtTriggerPrimitive v_utRequest2; + var charstring v_action1 := "Please, send a Polling Channel request"; + var charstring v_action2 := "Please, send a Retrieve Polling Channel request"; + var RequestPrimitive v_requestNotify; + + //Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest1,v_action1); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(m_createPollingChannelBase)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Resource type Polling Channel created successfuly"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type Polling Channel"); + } + } + + v_utRequest2 := m_utRetrievePollingChannel(f_getResourceAddress(v_cseIndex)); + //send triggering primitive to SUT + f_sendUtPrimitive(v_utRequest2,v_action2); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(m_retrievePollingRequest(f_getResourceAddress(v_cseIndex), f_getOriginator(v_cseIndex)))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Resource type Polling Channel retrieved successfuly"); + v_response := valueof(m_responsePrimitive(int2000,v_request.primitive.requestPrimitive.requestIdentifier)); + v_response.from_ := PX_CSE1_ID; + v_response.to_ := v_request.primitive.requestPrimitive.from_; + mccPortIn.send(m_response(v_response)); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type Polling Channel"); + } + } + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_cseIndex))); + + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(v_requestNotify)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": NOTIFY request received"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while expecting NOTIFY request"); + } + } + + //Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf02DownCseSimuMaster(); + } + + group g_CSE_PCH_005 { + + testcase TC_CSE_PCH_005_CRE() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var RequestPrimitive v_request; + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var template RequestPrimitive v_createRequest := m_createPollingChannelBase; + + + v_request := f_getCreateRequestPrimitive(int15, v_createRequest, v_aeIndex1); + v_request.to_ := f_getResourceAddress(v_aeIndex2); + + v_ae1.start(f_CSE_PCH_005(v_aeIndex1, v_aeIndex2, v_request)); + v_ae1.done; + + } + + testcase TC_CSE_PCH_005_RET() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + var RequestPrimitive v_request; + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var template RequestPrimitive v_createRequest := m_createPollingChannelBase; + + + v_request := f_getCreateRequestPrimitive(int15, v_createRequest, v_aeIndex1); + + v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_aeIndex1), f_getOriginator(v_aeIndex1))); + v_request.to_ := f_getResourceAddress(v_aeIndex2); + + v_ae1.start(f_CSE_PCH_005(v_aeIndex1, v_aeIndex2, v_request)); + v_ae1.done; + } + + testcase TC_CSE_PCH_005_UPD() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var RequestPrimitive v_request; + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var template RequestPrimitive v_createRequest := m_createPollingChannelBase; + + + v_request := f_getCreateRequestPrimitive(int15, v_createRequest, v_aeIndex1); + + + v_request := valueof(m_updatePollingChannelBase); + v_request.to_ := f_getResourceAddress(v_aeIndex2); + + v_ae1.start(f_CSE_PCH_005(v_aeIndex1, v_aeIndex2, v_request)); + v_ae1.done; + + } + + testcase TC_CSE_PCH_005_DEL() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var RequestPrimitive v_request; + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var template RequestPrimitive v_createRequest := m_createPollingChannelBase; + + + v_request := f_getCreateRequestPrimitive(int15, v_createRequest, v_aeIndex1); + + + v_request := valueof(m_deletePollingChannelBase(f_getResourceAddress(v_aeIndex1))); + v_request.to_ := f_getResourceAddress(v_aeIndex2); + + v_ae1.start(f_CSE_PCH_005(v_aeIndex1, v_aeIndex2, v_request)); + v_ae1.done; + + } + + function f_CSE_PCH_005(inout integer p_aeIndex1, inout integer p_aeIndex2, RequestPrimitive p_requestprimitive) runs on AeSimu { + + //Local variables + var integer v_aeIndex1 := -1; + var integer v_aeIndex2 := -1; + var integer v_resourceIndex := -1; + var integer v_acpAuxIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);//c_CUDNDi) + + p_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); + + p_aeIndex2 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi); + + //v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex); + mcaPort.send(m_request(p_requestprimitive)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Polling Resource type not created as originator has no privilege"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while creating polling resource type"); + } + } + + + } + } //end group g_CSE_PCH_005 + + /** + * @desc Check that the IUT sends the response with a status to the CSE1 when the request expires according to its Request Expiration Timestamp + * + */ + testcase TC_CSE_PCH_006() runs on Tester system CseSystem { + + var CseSimu v_cse1 := CseSimu.create("CSE1") alive; + + v_cse1.start(f_CSE_PCH_006()); + + v_cse1.done; + + } + + function f_CSE_PCH_006() runs on CseSimu { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var MsgIn v_response; + var RequestPrimitive v_requestNotify; + + // Test control + + // Test component configuration + f_cf02UpCseSimuMaster(); + + // Test adapter configuration + + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + + vc_ae1.start(f_cse_preamble_registerAe());//AE1 is registred; + vc_ae1.done; + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + v_aeIndex := f_getResource(vc_ae1); + + vc_ae1.start(f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex));//PollingChannel is created; + vc_ae1.done; + + v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex))); + v_request.from_ := PX_CSE1_ID; + + mccPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int4108))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":Response status code set to 4108 (REQUEST_TIMEOUT)"); + } + [] mccPort.receive(mw_response()) { + tc_ac.stop; + setverdict(inconc, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(inconc, __SCOPE__&":INFO: No answer while performing notification"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf02DownCseSimuMaster(); + } // end f_CSE_PCH_006 + + }//end group PollingChannel }//end group CSE