Commit f0c97691 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Adaptation of the subscription related functions to the use of AE1 and AE2 as PTCs


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent cc0ebe2e
......@@ -364,15 +364,15 @@ module OneM2M_Functions {
}
function f_cse_preamble_subscriptionVerification(out AeSimu p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu {
function f_cse_preamble_subscriptionVerification(out AeSimu p_ae2,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu {
if(p_resourceType == int23){
p_notifyHandler := AeSimu.create("NotifyHandler") alive;
p_notifyHandler.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
p_ae2Index := f_getResource(p_notifyHandler);
p_ae2 := AeSimu.create("AE2") alive;
p_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnouncementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1)); // AE2 is registred
p_ae2Index := f_getResource(p_ae2);
if(ischosen(p_createRequestPrimitive.primitiveContent.subscription)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
p_createRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(p_ae2Index)};
}
p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(p_aeIndex, p_responseStatusCode));
p_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(p_aeIndex, p_responseStatusCode));
}
}
......@@ -462,11 +462,11 @@ module OneM2M_Functions {
}
function f_is_component_done(in Tester p_notifyHandler) runs on Tester {
function f_is_component_done(in Tester p_ae2) runs on Tester {
tc_ac.start(10.0);
alt {
[] p_notifyHandler.done {
[] p_ae2.done {
tc_ac.stop;
}
[] tc_ac.timeout {
......
This diff is collapsed.
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