Commit 0d29721c authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Merge branch 'Test_architecture_improvement' of https://git.onem2m.org/TST/ATS...

Merge branch 'Test_architecture_improvement' of https://git.onem2m.org/TST/ATS into Test_architecture_improvement
parents a1222e32 a4d30057
...@@ -399,15 +399,15 @@ module OneM2M_Functions { ...@@ -399,15 +399,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){ if(p_resourceType == int23){
p_notifyHandler := AeSimu.create("NotifyHandler") alive; p_ae2 := AeSimu.create("AE2") 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_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_notifyHandler); 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 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_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));
} }
} }
...@@ -497,11 +497,11 @@ module OneM2M_Functions { ...@@ -497,11 +497,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); tc_ac.start(10.0);
alt { alt {
[] p_notifyHandler.done { [] p_ae2.done {
tc_ac.stop; tc_ac.stop;
} }
[] tc_ac.timeout { [] tc_ac.timeout {
......
...@@ -1946,10 +1946,9 @@ module OneM2M_Testcases { ...@@ -1946,10 +1946,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_createRequest := m_createContainerBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;//TODO useless but need to be initialized see if we can remove it
v_createRequest.primitiveContent.container.resourceName := omit; v_createRequest.primitiveContent.container.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, -, v_notifyHandler)); //Container v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, -)); //Container
v_ae1.done; v_ae1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1); if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
...@@ -1965,10 +1964,9 @@ module OneM2M_Testcases { ...@@ -1965,10 +1964,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_createRequest := m_createContainerBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.container.resourceName := omit; v_createRequest.primitiveContent.container.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit),v_notifyHandler));//Container v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit)));//Container
v_ae1.done; v_ae1.done;
...@@ -1986,11 +1984,10 @@ module OneM2M_Testcases { ...@@ -1986,11 +1984,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_createRequest := m_createContainerBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.container.resourceName := omit; v_createRequest.primitiveContent.container.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createContainerBase, v_notifyHandler));//Container v_ae1.start(f_CSE_DMR_CRE_001(int3, v_createRequest, m_createContainerBase));//Container
v_ae1.done; v_ae1.done;
...@@ -2008,11 +2005,10 @@ module OneM2M_Testcases { ...@@ -2008,11 +2005,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase; var template RequestPrimitive v_createRequest := m_createGroupBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.group_.resourceName := omit; v_createRequest.primitiveContent.group_.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, -, v_notifyHandler));//Group v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, -));//Group
v_ae1.done; v_ae1.done;
...@@ -2030,11 +2026,10 @@ module OneM2M_Testcases { ...@@ -2030,11 +2026,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase; var template RequestPrimitive v_createRequest := m_createGroupBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.group_.resourceName := omit; v_createRequest.primitiveContent.group_.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler));//Group v_ae1.start(f_CSE_DMR_CRE_001(int9, v_createRequest, m_createAeAux(omit,omit)));//Group
v_ae1.done; v_ae1.done;
...@@ -2052,11 +2047,10 @@ module OneM2M_Testcases { ...@@ -2052,11 +2047,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createAcpBase; var template RequestPrimitive v_createRequest := m_createAcpBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, -, v_notifyHandler));//AccessControlPolicy v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, -));//AccessControlPolicy
v_ae1.done; v_ae1.done;
...@@ -2074,11 +2068,10 @@ module OneM2M_Testcases { ...@@ -2074,11 +2068,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createAcpBase; var template RequestPrimitive v_createRequest := m_createAcpBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit; v_createRequest.primitiveContent.accessControlPolicy.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler));//AccessControlPolicy v_ae1.start(f_CSE_DMR_CRE_001(int1, v_createRequest, m_createAeAux(omit,omit)));//AccessControlPolicy
v_ae1.done; v_ae1.done;
...@@ -2096,10 +2089,9 @@ module OneM2M_Testcases { ...@@ -2096,10 +2089,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createScheduleBase; var template RequestPrimitive v_createRequest := m_createScheduleBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.schedule.resourceName := omit; v_createRequest.primitiveContent.schedule.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, -, v_notifyHandler));//Schedule v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, -));//Schedule
v_ae1.done; v_ae1.done;
...@@ -2117,10 +2109,9 @@ module OneM2M_Testcases { ...@@ -2117,10 +2109,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createScheduleBase; var template RequestPrimitive v_createRequest := m_createScheduleBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.schedule.resourceName := omit; v_createRequest.primitiveContent.schedule.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler));//Schedule v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createAeAux(omit,omit)));//Schedule
v_ae1.done; v_ae1.done;
...@@ -2138,10 +2129,9 @@ module OneM2M_Testcases { ...@@ -2138,10 +2129,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createScheduleBase; var template RequestPrimitive v_createRequest := m_createScheduleBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.schedule.resourceName := omit; v_createRequest.primitiveContent.schedule.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createSubscriptionBase, v_notifyHandler));//Schedule v_ae1.start(f_CSE_DMR_CRE_001(int18, v_createRequest, m_createSubscriptionBase));//Schedule
v_ae1.done; v_ae1.done;
...@@ -2159,12 +2149,11 @@ module OneM2M_Testcases { ...@@ -2159,12 +2149,11 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createPollingChannelBase; var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.pollingChannel.resourceName := omit; v_createRequest.primitiveContent.pollingChannel.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler));//PollingChannel v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel
v_ae1.done; v_ae1.done;
...@@ -2182,10 +2171,9 @@ module OneM2M_Testcases { ...@@ -2182,10 +2171,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, -, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, -));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2203,10 +2191,9 @@ module OneM2M_Testcases { ...@@ -2203,10 +2191,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("AE2") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAeAux(omit,omit), v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAeAux(omit,omit)));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2224,10 +2211,9 @@ module OneM2M_Testcases { ...@@ -2224,10 +2211,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createContainerBase, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createContainerBase));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2244,11 +2230,10 @@ module OneM2M_Testcases { ...@@ -2244,11 +2230,10 @@ module OneM2M_Testcases {
// Local variables // Local variables
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAcpBase, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createAcpBase));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2265,10 +2250,9 @@ module OneM2M_Testcases { ...@@ -2265,10 +2250,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createScheduleBase, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createScheduleBase));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2285,10 +2269,9 @@ module OneM2M_Testcases { ...@@ -2285,10 +2269,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase; var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.subscription.resourceName := omit; v_createRequest.primitiveContent.subscription.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createGroupBase, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int23, v_createRequest, m_createGroupBase));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2304,12 +2287,11 @@ module OneM2M_Testcases { ...@@ -2304,12 +2287,11 @@ module OneM2M_Testcases {
// Local variables // Local variables
var template RequestPrimitive v_createRequest := m_createNodeBase; var template RequestPrimitive v_createRequest := m_createNodeBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_createRequest.primitiveContent.node.resourceName := omit; v_createRequest.primitiveContent.node.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int14, v_createRequest, -, v_notifyHandler));//Node v_ae1.start(f_CSE_DMR_CRE_001(int14, v_createRequest, -));//Node
v_ae1.done; v_ae1.done;
...@@ -2327,10 +2309,9 @@ module OneM2M_Testcases { ...@@ -2327,10 +2309,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createMgmtCmdBase; var template RequestPrimitive v_createRequest := m_createMgmtCmdBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.mgmtResource.resourceName := omit; v_createRequest.primitiveContent.mgmtResource.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int12, v_createRequest, -, v_notifyHandler));//Management Command v_ae1.start(f_CSE_DMR_CRE_001(int12, v_createRequest, -));//Management Command
v_ae1.done; v_ae1.done;
...@@ -2348,10 +2329,9 @@ module OneM2M_Testcases { ...@@ -2348,10 +2329,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createLocationPolicyBase; var template RequestPrimitive v_createRequest := m_createLocationPolicyBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.locationPolicy.resourceName := omit; v_createRequest.primitiveContent.locationPolicy.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int10, v_createRequest, -, v_notifyHandler));//Location Policy v_ae1.start(f_CSE_DMR_CRE_001(int10, v_createRequest, -));//Location Policy
v_ae1.done; v_ae1.done;
...@@ -2369,10 +2349,9 @@ module OneM2M_Testcases { ...@@ -2369,10 +2349,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createStatsConfigBase; var template RequestPrimitive v_createRequest := m_createStatsConfigBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.statsConfig.resourceName := omit; v_createRequest.primitiveContent.statsConfig.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int22, v_createRequest, -, v_notifyHandler));//Stats Config v_ae1.start(f_CSE_DMR_CRE_001(int22, v_createRequest, -));//Stats Config
v_ae1.done; v_ae1.done;
...@@ -2389,11 +2368,10 @@ module OneM2M_Testcases { ...@@ -2389,11 +2368,10 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createStatsCollectBase; var template RequestPrimitive v_createRequest := m_createStatsCollectBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.statsCollect.resourceName := omit; v_createRequest.primitiveContent.statsCollect.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int21, v_createRequest, -, v_notifyHandler));//Stats Collect v_ae1.start(f_CSE_DMR_CRE_001(int21, v_createRequest, -));//Stats Collect
v_ae1.done; v_ae1.done;
...@@ -2411,10 +2389,9 @@ module OneM2M_Testcases { ...@@ -2411,10 +2389,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createM2mServiceSubscriptionProfileBase; var template RequestPrimitive v_createRequest := m_createM2mServiceSubscriptionProfileBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.m2mServiceSubscriptionProfile.resourceName := omit; v_createRequest.primitiveContent.m2mServiceSubscriptionProfile.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int11, v_createRequest, -, v_notifyHandler));//Subscription Profile v_ae1.start(f_CSE_DMR_CRE_001(int11, v_createRequest, -));//Subscription Profile
v_ae1.done; v_ae1.done;
...@@ -2432,10 +2409,9 @@ module OneM2M_Testcases { ...@@ -2432,10 +2409,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createServiceSubscribedAppRuleBase; var template RequestPrimitive v_createRequest := m_createServiceSubscribedAppRuleBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.serviceSubscribedAppRule.resourceName := omit; v_createRequest.primitiveContent.serviceSubscribedAppRule.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int19, v_createRequest, -, v_notifyHandler));//Service Subscribed App v_ae1.start(f_CSE_DMR_CRE_001(int19, v_createRequest, -));//Service Subscribed App
v_ae1.done; v_ae1.done;
...@@ -2453,10 +2429,9 @@ module OneM2M_Testcases { ...@@ -2453,10 +2429,9 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createContentInstanceBase; var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var AeSimu v_notifyHandler := AeSimu.create("NotifyHandler") alive;
v_createRequest.primitiveContent.contentInstance.resourceName := omit; v_createRequest.primitiveContent.contentInstance.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase, v_notifyHandler));//Subscription v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase));//Subscription
v_ae1.done; v_ae1.done;
...@@ -2469,9 +2444,10 @@ module OneM2M_Testcases { ...@@ -2469,9 +2444,10 @@ module OneM2M_Testcases {
} }
function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in AeSimu p_notifyHandler) runs on AeSimu return ResponsePrimitive { function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu return ResponsePrimitive {
// Local variables // Local variables
var AeSimu v_ae2 := AeSimu.create("AE2") alive;
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_parentIndex := -1; var integer v_parentIndex := -1;
...@@ -2479,14 +2455,13 @@ module OneM2M_Testcases { ...@@ -2479,14 +2455,13 @@ module OneM2M_Testcases {
var integer v_ae2Index := -1; var integer v_ae2Index := -1;
var integer v_acpAuxIndex := -1; var integer v_acpAuxIndex := -1;
var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
var AeSimu v_notifyHandler;
// Test control // Test control
// Test component configuration // Test component configuration
f_cf01Up(); f_cf01Up();
map(p_notifyHandler:mcaPort, system:mcaPort); map(v_ae2:mcaPort, system:mcaPort);
map(p_notifyHandler:mcaPortIn, system:mcaPortIn); map(v_ae2:mcaPortIn, system:mcaPortIn);
// Test adapter configuration // Test adapter configuration
...@@ -2494,11 +2469,11 @@ module OneM2M_Testcases { ...@@ -2494,11 +2469,11 @@ module OneM2M_Testcases {
if(ispresent(p_parentRequestPrimitive)) { if(ispresent(p_parentRequestPrimitive)) {
if(match(int23, p_parentRequestPrimitive.resourceType)){ if(match(int23, p_parentRequestPrimitive.resourceType)){
p_notifyHandler.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred v_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred
p_notifyHandler.done; v_ae2.done;
v_ae2Index := f_getResource(p_notifyHandler); v_ae2Index := f_getResource(v_ae2);
p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex)); v_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex));
} }
if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){ if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){
...@@ -2529,11 +2504,11 @@ module OneM2M_Testcases { ...@@ -2529,11 +2504,11 @@ module OneM2M_Testcases {
// Test Body // Test Body
if(match(int23, p_requestPrimitive.resourceType)){ if(match(int23, p_requestPrimitive.resourceType)){
p_notifyHandler.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred v_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred
p_notifyHandler.done; v_ae2.done;
v_ae2Index := f_getResource(p_notifyHandler); v_ae2Index := f_getResource(v_ae2);
p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex)); v_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex));
} }
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
...@@ -2573,9 +2548,9 @@ module OneM2M_Testcases { ...@@ -2573,9 +2548,9 @@ module OneM2M_Testcases {
vc_resourcesIndexToBeDeleted := {}; vc_resourcesIndexToBeDeleted := {};
// Tear down // Tear down
//notifyHandler.stop; //ae2.stop;
f_cf01Down(); f_cf01Down();
unmap(p_notifyHandler:mcaPort, system:mcaPort); unmap(v_ae2:mcaPort, system:mcaPort);
return v_response.primitive.responsePrimitive; return v_response.primitive.responsePrimitive;
...@@ -2722,7 +2697,7 @@ module OneM2M_Testcases { ...@@ -2722,7 +2697,7 @@ module OneM2M_Testcases {
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_aeIndex := -1;
var AeSimu v_notifyHandler; var AeSimu v_ae2;
var integer v_ae2Index := -1; var integer v_ae2Index := -1;
var integer v_resourceIndex := -1; var integer v_resourceIndex := -1;
...@@ -2736,7 +2711,7 @@ module OneM2M_Testcases { ...@@ -2736,7 +2711,7 @@ module OneM2M_Testcases {
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType); f_cse_preamble_subscriptionVerification(v_ae2, v_aeIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
// Test Body // Test Body
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
...@@ -2848,7 +2823,7 @@ module OneM2M_Testcases { ...@@ -2848,7 +2823,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_aeIndex := -1;
var integer v_resourceIndex := -1; var integer v_resourceIndex := -1;
var AeSimu v_notifyHandler; var AeSimu v_ae2;
var integer v_ae2Index := -1; var integer v_ae2Index := -1;
// Test control // Test control
...@@ -2861,7 +2836,7 @@ module OneM2M_Testcases { ...@@ -2861,7 +2836,7 @@ module OneM2M_Testcases {
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi)