Commit 38fd5e05 authored by abbas ahmad's avatar abbas ahmad
Browse files

Correction of functtion f_cse_notifyProcedure_notify

+ Adding templates for poling Channel (Notify template for pch "m_notify_pch" )
+ Corection on f_CSE_DMR_RET_003 for polling channel
+ Update correction for Poling channel on function f_CSE_PCH_001
+
parent d2677b18
......@@ -1786,15 +1786,16 @@ module OneM2M_Functions {
* @param p_requestPrimitive Notify request to be used for the notification
* @verdict
*/
function f_cse_notifyProcedure_notify(template RequestPrimitive p_requestPrimitive) runs on CseSimu {
function f_cse_notifyProcedure_notify(template (value) RequestPrimitive p_requestPrimitive) runs on CseSimu {
// Local variables
var RequestPrimitive v_request;
//var RequestPrimitive v_request;
var ResponsePrimitive v_responsePrimitive;
var integer v_resourceIndex := -1;
v_request.from_ := PX_CSE1_ID;
p_requestPrimitive.from_ := PX_CSE1_ID;
mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
mccPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, mw_primitiveContentNotification(mw_contentNotification_any)))) -> value vc_response {
......@@ -3183,7 +3184,8 @@ module OneM2M_Functions {
}
if (p_resourceType == int15) {//pollingChannel
//TODO
//TODO
//p_request.from_ := "CnOTALLOWEDAEID";
}
if (p_resourceType == int23) {//subscription
......
......@@ -1482,6 +1482,37 @@ module OneM2M_Templates {
vendorInformation := omit
};
/*
* @desc Base NOTIFY request primitive For PolingChannel
*/
template RequestPrimitive m_notify_pch(XSD.ID p_resourceAddress) := {
operation := int5,
to_ := p_resourceAddress,
from_ := "NotInitialized",
requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := {notification := m_contentNotification_pch},
roleIDs := omit,
originatingTimestamp := omit,
requestExpirationTimestamp := omit,
resultExpirationTimestamp := omit,
operationExecutionTime := omit,
responseType := omit,
resultPersistence := omit,
resultContent := omit,
eventCategory := omit,
deliveryAggregation := omit,
groupRequestIdentifier := omit,
filterCriteria := omit,
discoveryResultType := omit,
tokens := omit,
tokenIDs := omit,
localTokenIDs := omit,
tokenRequestIndicator := omit,
releaseVersionIndicator := "2a",
vendorInformation := omit
};
/**
* @desc Base NOTIFY Aggregated request primitive
*/
......@@ -4359,6 +4390,20 @@ module OneM2M_Templates {
iPEDiscoveryRequest := omit
};
template Notification m_contentNotification_pch := {
notificationEvent:= omit,
verificationRequest := true,
subscriptionDeletion := omit,
subscriptionReference := omit,
creator :="AE_ID",
notificationForwardingURI := omit,
notificationTarget := omit,
targetRemovalRequest := omit,
targetRemovalAllowance := omit,
iPEDiscoveryRequest := omit
};
template Notification mw_contentNotification_any := {
notificationEvent := *,
verificationRequest := *,
......
......@@ -3081,14 +3081,18 @@ module OneM2M_PermutationFunctions {
}
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi;
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
// Test Body
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))));
if(p_resourceType == int15 ) {
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), "CnOT_ALLOWED_AEID"))));
} else {
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))));
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response {
......
......@@ -12543,14 +12543,18 @@ module OneM2M_Testcases_CSE_Release_2 {
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
vc_cse1.done;
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
vc_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -,-);
//v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, {f_getAnnouncementTargetPoA("HTTP", PX_AE1_ADDRESS, "")});//AE1 is registred;
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -);//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)));
v_request := valueof(m_retrievePollingRequest(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex)));
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
v_requestNotify := valueof(m_notify(f_getResourceAddress(v_aeIndex)));
v_requestNotify := valueof(m_notify_pch(f_getResourceAddress(v_aeIndex)));
vc_cse1.start(f_cse_notifyProcedure_notify(v_requestNotify));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment