Commit 7da9b134fb8a9390bab112d7a9fc3f71f6a20425

Authored by Miguel Angel Reina Ortega
1 parent e3cc4e6d

Adding descriptions to all functions in OneM2M_Functions file

Renaming of "child" component:
- vc_cseSimu -> vc_cse1
- vc_aeSimu -> vc_ae1 for CseSimu or vc_ae2 for AeSimu

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
... ... @@ -15,13 +15,11 @@ module OneM2M_Functions {
15 15  
16 16 import from XSD all;
17 17 import from OneM2M_Templates all;
18   - import from OneM2M_Types all;//{type XSD.ID};
  18 + import from OneM2M_Types all;
19 19 import from OneM2M_TypesAndValues all;
20 20 import from OneM2M_TestSystem all;
21 21 import from OneM2M_Pixits all;
22 22 import from OneM2M_Pics all;
23   -// import from OneM2M_AdditionalTypes all;
24   -
25 23  
26 24 group ConfigFunctions {
27 25  
... ... @@ -45,6 +43,7 @@ module OneM2M_Functions {
45 43 vc_auxiliaryAe2Up := p_auxiliaryAe2Required;
46 44 vc_ae2 := AeSimu.create("AE2") alive;
47 45 vc_ae2.start(f_cf01UpAe2());
  46 + vc_ae2.done;
48 47 }
49 48  
50 49 //Initialze the IUT
... ... @@ -79,20 +78,41 @@ module OneM2M_Functions {
79 78  
80 79 // Variables
81 80 vc_config := e_cf02;
82   - vc_cseSimu := CseSimu.create("CSE1") alive;
  81 + vc_cse1 := CseSimu.create("CSE1") alive;
83 82  
84 83 // Map
85 84 map(self:mcaPort, system:mcaPort);
86   - map(vc_cseSimu:mccPort, system:mccPort);
87 85 map(self:acPort, system:acPort);
88 86 activate(a_default());
89   - activate(a_cse_aeSimu());
  87 + activate(a_cse_cf02_ae1());
  88 + vc_cse1.start(f_cf02UpCse1());
  89 + vc_cse1.done;
90 90  
91 91 // Connect
92   - f_connectInfoPort(vc_cseSimu);
  92 +
93 93 //Initialze the IUT
94 94  
95 95 } // end f_cf02Up
  96 +
  97 + /**
  98 + @desc Ports mapping and default behaviour activation for Config 2 on the CSE1
  99 + */
  100 + function f_cf02UpCse1() runs on CseSimu {
  101 +
  102 + // Variables
  103 + vc_config := e_cf02;
  104 +
  105 + // Map
  106 + map(self:mccPort, system:mccPort);
  107 + map(self:mccPortIn, system:mccPortIn);
  108 + map(self:acPort, system:acPort);
  109 +
  110 + activate(a_default());
  111 + activate(a_cse_cf02_cse1());
  112 +
  113 + //Initialze the IUT
  114 +
  115 + } // end f_cf02UpCse1
96 116  
97 117 /**
98 118 * @desc Ports mapping and default behaviour activation for Config 02
... ... @@ -101,22 +121,43 @@ module OneM2M_Functions {
101 121  
102 122 // Variables
103 123 vc_config := e_cf02;
104   - vc_aeSimu := AeSimu.create("AE1") alive;
  124 + vc_ae1 := AeSimu.create("AE1") alive;
105 125  
106 126 // Map
107 127 map(self:mccPort, system:mccPort);
108   - map(vc_aeSimu:mcaPort, system:mcaPort);
  128 + map(self:mccPortIn, system:mccPortIn);
109 129 map(self:acPort, system:acPort);
110 130 activate(a_default());
111   - activate(a_cse_cseSimu());
  131 + activate(a_cse_cf02_cse1());
  132 + vc_ae1.start(f_cf02UpAe1());
  133 + vc_ae1.done;
112 134  
113 135 // Connect
114   - f_connectInfoPort(vc_aeSimu);
  136 +
115 137 //Initialze the IUT
116 138  
117 139 } // end f_cf02UpCseSimuMaster
118 140  
119 141 /**
  142 + @desc Ports mapping and default behaviour activation for Config 2 on the AE1
  143 + */
  144 + function f_cf02UpAe1() runs on AeSimu {
  145 +
  146 + // Variables
  147 + vc_config := e_cf02;
  148 +
  149 + // Map
  150 + map(self:mcaPort, system:mcaPort);
  151 + map(self:acPort, system:acPort);
  152 +
  153 + activate(a_default());
  154 + activate(a_cse_cf02_ae1());
  155 +
  156 + //Initialze the IUT
  157 +
  158 + } // end f_cf02UpAe1
  159 +
  160 + /**
120 161 * @desc Ports mapping and default behaviour activation for Config 03
121 162 */
122 163 function f_cf03Up() runs on CseSimu {
... ... @@ -125,7 +166,7 @@ module OneM2M_Functions {
125 166 vc_config := e_cf03;
126 167  
127 168 // Map
128   - map(self:mcaPort, system:mcaPort);
  169 + map(self:mcaPort, system:mcaPort);//TODO To be consistent, we should use mcaPortIn for AE testing
129 170 map(self:acPort, system:acPort);
130 171 activate(a_default());
131 172 activate(a_ae_cf03());
... ... @@ -158,29 +199,6 @@ module OneM2M_Functions {
158 199  
159 200 /**
160 201 * @desc Ports unmapping
161   - * @verdict
162   - */
163   - /*function f_cfCseTesterDown() runs on Tester {
164   -
165   - if(vc_config == e_cf01) {
166   - f_cf01Down()
167   - } else if (vc_config == e_cf02){
168   - f_cf02Down()
169   - }
170   - }
171   - /**
172   - * @desc Ports unmapping
173   - * @verdict
174   - */
175   - /*function f_cfAeTesterDown() runs on AeSimu {
176   -
177   - if(vc_config == e_cf03) {
178   - f_cf03Down()
179   - }
180   - }
181   - /**
182   - * @desc Ports unmapping
183   - * @verdict
184 202 */
185 203 function f_cf01Down() runs on AeSimu {
186 204  
... ... @@ -193,7 +211,6 @@ module OneM2M_Functions {
193 211  
194 212 /**
195 213 * @desc Ports unmapping
196   - * @verdict
197 214 */
198 215 function f_cf01DownAe2() runs on AeSimu {
199 216  
... ... @@ -204,25 +221,25 @@ module OneM2M_Functions {
204 221  
205 222 /**
206 223 * @desc Ports unmapping
207   - * @verdict
208 224 */
209 225 function f_cf02Down() runs on AeSimu {
210 226  
211 227 unmap(self:mcaPort, system:mcaPort);
212   - unmap(vc_cseSimu:mccPort, system:mccPort);
213 228 unmap(self:acPort, system:acPort);
214   - unmap(vc_cseSimu:acPort, system:acPort);
  229 + unmap(vc_cse1:mccPort, system:mccPort);
  230 + unmap(vc_cse1:mccPortIn, system:mccPortIn);
  231 + unmap(vc_cse1:acPort, system:acPort);
215 232 }
216 233 /**
217 234 * @desc Ports unmapping
218   - * @verdict
219 235 */
220 236 function f_cf02DownCseSimuMaster() runs on CseSimu {
221 237  
222 238 unmap(self:mccPort, system:mccPort);
223   - unmap(vc_aeSimu:mcaPort, system:mcaPort);
  239 + unmap(self:mccPortIn, system:mccPortIn);
224 240 unmap(self:acPort, system:acPort);
225   - unmap(vc_aeSimu:acPort, system:acPort);
  241 + unmap(vc_ae1:mcaPort, system:mcaPort);
  242 + unmap(vc_ae1:acPort, system:acPort);
226 243 }
227 244 /**
228 245 * @desc Ports unmapping for Config 03
... ... @@ -241,18 +258,199 @@ module OneM2M_Functions {
241 258 unmap(self:mccPort, system:mccPort);
242 259 unmap(self:acPort, system:acPort);
243 260 }
244   -
  261 +
  262 + }//end group configFunctions
  263 +
  264 + group InfoPortCommunication {
  265 +
  266 + /**
  267 + * @desc Connection of InfoPort of two components
  268 + * @param p_tester PTC where InfoPort is to be connected
  269 + */
245 270 function f_connectInfoPort(in Tester p_tester) runs on Tester {
246 271 // Connect
247 272 connect(self:infoPort, p_tester:infoPort);
248 273 }
249 274  
  275 + /**
  276 + * @desc Disconnection of InfoPort of two components
  277 + * @param p_tester PTC where InfoPort is to be connected
  278 + */
250 279 function f_disconnectInfoPort(in Tester p_tester) runs on Tester {
251 280 // Disconnect
252 281 disconnect(self:infoPort, p_tester:infoPort);
253 282 }
  283 +
  284 + /**
  285 + * @desc Getting last responsePrimitive saved in a component
  286 + * @param p_tester Given component
  287 + */
  288 + function f_getResponsePrimitive(in Tester p_component) runs on Tester return ResponsePrimitive {
  289 + var ResponsePrimitive v_response;
  290 +
  291 + f_connectInfoPort(p_component);
  292 +
  293 + p_component.start(f_sendResponsePrimitive());
  294 + alt {
  295 + []infoPort.receive(mw_responsePrimitiveforInfoPort) -> value v_response {
  296 + }
  297 + }
  298 +
  299 + f_disconnectInfoPort(p_component);
  300 +
  301 + return v_response;
  302 +
  303 + }
254 304  
255   - }//end group configFunctions
  305 + /**
  306 + * @desc Getting last requestPrimitive saved in an AeSimu component
  307 + * @param p_tester Given component
  308 + */
  309 + function f_getRequestPrimitive(in Tester p_component) runs on Tester return RequestPrimitive {
  310 + var RequestPrimitive v_request;
  311 +
  312 + f_connectInfoPort(p_component);
  313 +
  314 + p_component.start(f_sendRequestPrimitive());
  315 + alt {
  316 + []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request {
  317 + }
  318 + }
  319 +
  320 + f_disconnectInfoPort(p_component);
  321 +
  322 + return v_request;
  323 +
  324 + }
  325 +
  326 + /**
  327 + * @desc Getting primitiveContent retrieved in an AeSimu component
  328 + * @param p_tester AeSimu component
  329 + */
  330 + function f_getPrimitiveContentRetrievedResource(in AeSimu p_ae) runs on Tester return PrimitiveContent {
  331 + var PrimitiveContent v_primitiveContent;
  332 +
  333 + f_connectInfoPort(p_ae);
  334 +
  335 + p_ae.start(f_sendPrimitiveContentRetrievedResource());
  336 + alt {
  337 + []infoPort.receive(mw_primitiveContent) -> value v_primitiveContent {
  338 + }
  339 + }
  340 +
  341 + f_disconnectInfoPort(p_ae);
  342 +
  343 + return v_primitiveContent;
  344 +
  345 + }
  346 +
  347 + /**
  348 + * @desc Getting remoteCSE resource from a CseSimu component
  349 + * @param p_tester CseSimu component
  350 + */
  351 + function f_getRemoteCseResource(in CseSimu p_cse) runs on Tester return integer {
  352 + var MyResource v_resource;
  353 + var integer v_resourceIndex := -1;
  354 +
  355 + f_connectInfoPort(p_cse);
  356 +
  357 + p_cse.start(f_sendRemoteCseResource());
  358 + alt {
  359 + []infoPort.receive(mw_resource) -> value v_resource {
  360 + v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
  361 + }
  362 + }
  363 +
  364 + f_disconnectInfoPort(p_cse);
  365 +
  366 + return v_resourceIndex;
  367 +
  368 + }
  369 +
  370 + /**
  371 + * @desc Getting a specific resource from an AeSimu component
  372 + * @param p_tester AeSimu component
  373 + * @param p_resourceIndex Index of resource to be retrieved
  374 + */
  375 + function f_getResource(in Tester p_component, in integer p_resourceIndex := -1) runs on Tester return integer {
  376 + var MyResource v_resource;
  377 + var integer v_resourceIndex := -1;
  378 +
  379 + f_connectInfoPort(p_component);
  380 +
  381 + p_component.start(f_sendResource(p_resourceIndex));
  382 + alt {
  383 + []infoPort.receive(mw_resource) -> value v_resource {
  384 + v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
  385 + }
  386 + }
  387 +
  388 + f_disconnectInfoPort(p_component);
  389 +
  390 + return v_resourceIndex;
  391 +
  392 + }
  393 +
  394 + /**
  395 + * @desc Sending of last responsePrimitive (vc_response) through InfoPort
  396 + */
  397 + function f_sendResponsePrimitive() runs on Tester {
  398 +
  399 + infoPort.send(vc_response.primitive.responsePrimitive);
  400 +
  401 + }
  402 +
  403 + /**
  404 + * @desc Sending of last requestPrimitive (vc_request) through InfoPort
  405 + */
  406 + function f_sendRequestPrimitive() runs on Tester {
  407 +
  408 + infoPort.send(vc_request.primitive.requestPrimitive);
  409 +
  410 + }
  411 +
  412 + /**
  413 + * @desc Sending of last primitiveContent retrieved (vc_primitiveContentRetrievedResource) through InfoPort
  414 + */
  415 + function f_sendPrimitiveContentRetrievedResource() runs on AeSimu {
  416 +
  417 + infoPort.send(vc_primitiveContentRetrievedResource);
  418 +
  419 + }
  420 +
  421 + /**
  422 + * @desc Sending of remoteCSE resource through InfoPort
  423 + */
  424 + function f_sendRemoteCseResource() runs on CseSimu {
  425 +
  426 + infoPort.send(vc_resourcesList[vc_remoteCseIndex]);
  427 +
  428 + }
  429 +
  430 + /**
  431 + * @desc Sending of Ae resource through InfoPort
  432 + */
  433 + function f_sendAeResource() runs on AeSimu {
  434 +
  435 + infoPort.send(vc_resourcesList[vc_aeAuxIndex]);
  436 +
  437 + }
  438 +
  439 + /**
  440 + * @desc Sending of a specific resource through InfoPort
  441 + * @param p_resourceIndex Index of resource to be sent
  442 + */
  443 + function f_sendResource(in integer p_resourceIndex) runs on Tester {
  444 +
  445 + if(p_resourceIndex == -1) {
  446 + infoPort.send(vc_resourcesList[vc_aeAuxIndex]); //TODO To send Ae or RemoteCSE depending on the component type
  447 + } else {
  448 + infoPort.send(vc_resourcesList[p_resourceIndex]);
  449 + }
  450 +
  451 + }
  452 +
  453 + }// end of gropu InfoPortCommunication
256 454  
257 455 group CseFunctions {
258 456  
... ... @@ -272,8 +470,9 @@ module OneM2M_Functions {
272 470  
273 471  
274 472 /**
275   - * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
276   - * @param p_allowedOperations Allowed operations for the auxiliar AE resource
  473 + * @desc Creation of auxiliar resource AE for correct execution of the test case
  474 + * @param p_accessControlPolicyIDs AccessControlPolicyIDs for the auxiliar AE resource
  475 + * @param p_poaList Point of contact of the auxiliar AE resource
277 476 * @return Internal AE resource index
278 477 * @verdict
279 478 */
... ... @@ -325,12 +524,12 @@ module OneM2M_Functions {
325 524  
326 525 f_checkAeSimuStatus();
327 526 return vc_aeAuxIndex;
328   -
329 527 }
330 528  
331 529 /**
332 530 * @desc Creation of auxiliar resources ACP and AE for correct execution of the test case
333 531 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
  532 + * @param p_appId AppID of the AE resource to be created
334 533 * @return Internal AE resource index
335 534 * @verdict
336 535 */
... ... @@ -395,6 +594,12 @@ module OneM2M_Functions {
395 594  
396 595 }
397 596  
  597 + /**
  598 + * @desc Creation of ServiceSubscribedAppRule resource
  599 + * @param p_allowedAEs Allowed AEs
  600 + * @return Internal resource index
  601 + * @verdict
  602 + */
398 603 function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}) runs on AeSimu return integer {//c_CRUDNDi
399 604  
400 605 var integer v_serviceSubscribedAppRuleIndex := -1;
... ... @@ -405,6 +610,12 @@ module OneM2M_Functions {
405 610  
406 611 }
407 612  
  613 + /**
  614 + * @desc Creation of SubscribedProfile resource
  615 + * @param p_allowedAEs Allowed AEs
  616 + * @return Internal resource index
  617 + * @verdict
  618 + */
408 619 function f_cse_preamble_createServiceSubscribedProfile(in template ListOfM2MID p_allowedAEs := {""}) runs on AeSimu return integer {//c_CRUDNDi
409 620  
410 621 var integer v_serviceSubscribedAppRuleIndex := -1;
... ... @@ -420,6 +631,14 @@ module OneM2M_Functions {
420 631  
421 632 }
422 633  
  634 + /**
  635 + * @desc Registration of AE2 for handling of notifications and handling of subscription verification started if subscription resource is to be created
  636 + * @param p_ae2Index Internal AE2 resource index
  637 + * @param p_createRequestPrimitive CREATE Request for the resource to be created
  638 + * @param p_resourceType ResourceType of the resource to be created
  639 + * @param p_responseStatusCode Response Status Code to be sent in response to the subscription verification request
  640 + * @verdict
  641 + */
423 642 function f_cse_preamble_subscriptionVerification(inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu {
424 643 if(p_resourceType == int23){
425 644  
... ... @@ -440,7 +659,7 @@ module OneM2M_Functions {
440 659 group PostambleFunctions {
441 660  
442 661 /**
443   - * @desc Deletion of all resources created during the test case execution. IUT gets clean and ready for next execution
  662 + * @desc Deletion of all resources created during the test case execution. It deals also with AE2 created resources if any. IUT gets clean and ready for next execution
444 663 * @verdict
445 664 */
446 665 function f_cse_postamble_deleteResources() runs on AeSimu {
... ... @@ -485,7 +704,7 @@ module OneM2M_Functions {
485 704 }
486 705  
487 706 /**
488   - * @desc Calls to postamble for AE2 entity
  707 + * @desc Calls to postamble for AeSimu components (i.e. AE2)
489 708 * @verdict
490 709 */
491 710 function f_cse_postamble_aeSimu(in AeSimu p_ae) runs on AeSimu {
... ... @@ -534,172 +753,7 @@ module OneM2M_Functions {
534 753 }
535 754 }
536 755  
537   - }
538   -
539   - /**
540   - @desc
541   - */
542   - function f_getResponsePrimitive(in AeSimu p_ae) runs on Tester return ResponsePrimitive {
543   - var ResponsePrimitive v_response;
544   -
545   - f_connectInfoPort(p_ae);
546   -
547   - p_ae.start(f_sendResponsePrimitive());
548   - alt {
549   - []infoPort.receive(mw_responsePrimitiveforInfoPort) -> value v_response {
550   - }
551   - }
552   -
553   - f_disconnectInfoPort(p_ae);
554   -
555   - return v_response;
556   -
557   - }
558   -
559   - /**
560   - @desc
561   - */
562   - function f_getRequestPrimitive(in AeSimu p_ae) runs on Tester return RequestPrimitive {
563   - var RequestPrimitive v_request;
564   -
565   - f_connectInfoPort(p_ae);
566   -
567   - p_ae.start(f_sendRequestPrimitive());
568   - alt {
569   - []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request {
570   - }
571   - }
572   -
573   - f_disconnectInfoPort(p_ae);
574   -
575   - return v_request;
576   -
577   - }
578   -
579   - function f_getRemoteCseRequestPrimitive(in CseSimu p_cse) runs on Tester return RequestPrimitive {
580   - var RequestPrimitive v_request;
581   -
582   - f_connectInfoPort(p_cse);
583   -
584   - p_cse.start(f_sendRemoteCseRequestPrimitive());
585   - alt {
586   - []infoPort.receive(mw_requestPrimitiveforInfoPort) -> value v_request {
587   - }
588   - }
589   -
590   - f_disconnectInfoPort(p_cse);
591   -
592   - return v_request;
593   -
594   - }
595   -
596   -
597   - /**
598   - @desc
599   - */
600   - function f_getPrimitiveContentRetrievedResource(in AeSimu p_ae) runs on Tester return PrimitiveContent {
601   - var PrimitiveContent v_primitiveContent;
602   -
603   - f_connectInfoPort(p_ae);
604   -
605   - p_ae.start(f_sendPrimitiveContentRetrievedResource());
606   - alt {
607   - []infoPort.receive(mw_primitiveContent) -> value v_primitiveContent {
608   - }
609   - }
610   -
611   - f_disconnectInfoPort(p_ae);
612   -
613   - return v_primitiveContent;
614   -
615   - }
616   -
617   - /**
618   - @desc
619   - */
620   - function f_getRemoteCseResource(in CseSimu p_cse) runs on AeSimu return integer {
621   - var MyResource v_resource;
622   - var integer v_resourceIndex := -1;
623   -
624   - f_connectInfoPort(p_cse);
625   -
626   - p_cse.start(f_sendRemoteCseResource());
627   - alt {
628   - []infoPort.receive(mw_resource) -> value v_resource {
629   - v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
630   - }
631   - }
632   -
633   - f_disconnectInfoPort(p_cse);
634   -
635   - return v_resourceIndex;
636   -
637   - }
638   -
639   - /**
640   - @desc
641   - */
642   - function f_getResource(in AeSimu p_ae, in integer p_resourceIndex := -1) runs on AeSimu return integer {
643   - var MyResource v_resource;
644   - var integer v_resourceIndex := -1;
645   -
646   - f_connectInfoPort(p_ae);
647   -
648   - p_ae.start(f_sendResource(p_resourceIndex));
649   - alt {
650   - []infoPort.receive(mw_resource) -> value v_resource {
651   - v_resourceIndex := f_setResource(v_resource.resource, v_resource.resourceType, v_resource.parentIndex, false);
652   - }
653   - }
654   -
655   - f_disconnectInfoPort(p_ae);
656   -
657   - p_ae.done;
658   -
659   - return v_resourceIndex;
660   -
661   - }
662   -
663   - function f_sendResponsePrimitive() runs on AeSimu {
664   -
665   - infoPort.send(vc_response.primitive.responsePrimitive);
666   -
667   - }
668   -
669   - function f_sendRequestPrimitive() runs on AeSimu {
670   -
671   - infoPort.send(vc_request.primitive.requestPrimitive);
672   -
673   - }
674   -
675   - function f_sendRemoteCseRequestPrimitive() runs on CseSimu {
676   -
677   - infoPort.send(vc_request.primitive.requestPrimitive);
678   -
679   - }
680   -
681   - function f_sendPrimitiveContentRetrievedResource() runs on AeSimu {
682   -
683   - infoPort.send(vc_primitiveContentRetrievedResource);
684   -
685   - }
686   -
687   - function f_sendRemoteCseResource() runs on CseSimu {
688   -
689   - infoPort.send(vc_resourcesList[vc_remoteCseIndex]);
690   -
691   - }
692   -
693   - function f_sendResource(in integer p_resourceIndex) runs on AeSimu {
694   -
695   - if(p_resourceIndex == -1) {
696   - infoPort.send(vc_resourcesList[vc_aeAuxIndex]);
697   - } else {
698   - infoPort.send(vc_resourcesList[p_resourceIndex]);
699   - }
700   -
701   - }
702   -
  756 + }
703 757  
704 758 }//end group postambleFunctions
705 759  
... ... @@ -708,7 +762,7 @@ module OneM2M_Functions {
708 762 /**
709 763 * @desc Creation of a resource
710 764 * @param p_resourceType Resource type of the resource to be created
711   - * @param p_requestPrimitive Template request primitive
  765 + * @param p_requestPrimitive CREATE request primitive for the resource to be created
712 766 * @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
713 767 * @return Internal resource index of the created resource
714 768 * @verdict
... ... @@ -793,35 +847,10 @@ module OneM2M_Functions {
793 847 return v_acpAuxIndex;
794 848  
795 849 }
796   -
797   -
798   - /**
799   - * @desc Creation of the auxiliar Container resource
800   - * @param p_parentIndex Internal resource index which indicates the parent of the Container resource to be created
801   - * @return Internal resource index of the created Container resource
802   - * @verdict
803   - */
804   - function f_cse_createContainerResourceAux (integer p_parentIndex := -1) runs on AeSimu return integer {
805   -
806   - var RequestPrimitive v_request;
807   - var integer v_acpAuxIndex := -1;
808   - var integer v_containerResourceIndex := -1;
809   -
810   - v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2"
811   -
812   - v_request := valueof(m_createContainerBase);
813   - v_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
814   - v_request.primitiveContent.container.resourceName := "MyContainerAux";
815   -
816   - v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex);
817   -
818   - return v_containerResourceIndex;
819   -
820   - }
821   -
  850 +
822 851 /**
823   - * @desc
824   - * @param p_requestPrimitive
  852 + * @desc Message exchange for the update of a resource
  853 + * @param p_requestPrimitive UPDATE request primitive to be used
825 854 * @verdict
826 855 */
827 856 function f_cse_updateResource(in RequestPrimitive p_requestPrimitive) runs on AeSimu {
... ... @@ -851,8 +880,9 @@ module OneM2M_Functions {
851 880 }// end f_cse_updateResource
852 881  
853 882 /**
854   - * @desc
855   - * @param p_resourceIndex
  883 + * @desc Message exchange for the retrieval of a resource
  884 + * @param p_resourceIndex Resource index of the resource to be retrieved
  885 + * @return PrimitiveContent parameter of the RETRIEVE response
856 886 * @verdict
857 887 */
858 888 function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{
... ... @@ -881,11 +911,12 @@ module OneM2M_Functions {
881 911  
882 912 return vc_response.primitive.responsePrimitive.primitiveContent;
883 913  
884   - }// end f_cse_retrievingResource
  914 + }// end f_cse_retrieveResource
885 915  
886 916 /**
887   - * @desc
888   - * @param p_requestPrimitive
  917 + * @desc Message exchange for the deletion of a resource
  918 + * @param p_index Resource index of the resource to be deleted
  919 + * @param p_requestPrimitive DELETE request to be used. If not present default DELETE request will be used
889 920 * @verdict
890 921 */
891 922 function f_cse_deleteResource(in integer p_index, in template (omit) RequestPrimitive p_requestPrimitive := omit) runs on AeSimu {
... ... @@ -921,8 +952,8 @@ module OneM2M_Functions {
921 952 }// end f_cse_deleteResource
922 953  
923 954 /**
924   - * @desc Check that a resource is present in the IUT (resourceId is known)
925   - * @param p_resourceIndex Resource index
  955 + * @desc Check that a resource is present in the IUT (resourceId is known) by using RETRIEVE operation
  956 + * @param p_resourceIndex Resource index of the resource to be checked
926 957 * @return boolean
927 958 */
928 959 function f_isResourcePresent (integer p_resourceIndex) runs on AeSimu return boolean {
... ... @@ -951,8 +982,8 @@ module OneM2M_Functions {
951 982  
952 983 /**
953 984 * @desc Check that a resource is not present in the IUT (resourceId is NOT known)
954   - * @param p_parentIndex Index of the parent resource
955   - * @param p_resourceName Resource name (Hierarchical method is used)
  985 + * @param p_parentIndex Index of the parent resource of the resource to be checked
  986 + * @param p_resourceName Resource name (Hierarchical method is used) of the resource to be checked
956 987 * @return boolean
957 988 */
958 989 function f_isResourceNotPresent (integer p_parentIndex, XSD.String p_resourceName) runs on AeSimu return boolean {
... ... @@ -982,7 +1013,7 @@ module OneM2M_Functions {
982 1013 }
983 1014  
984 1015 /**
985   - * @desc Update of the auxiliar ACP resource
  1016 + * @desc Message exchange for the update of the auxiliar ACP resource
986 1017 * @param p_allowedOperations New allowed operations
987 1018 * @verdict
988 1019 */
... ... @@ -1001,6 +1032,7 @@ module OneM2M_Functions {
1001 1032 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
1002 1033 tc_ac.stop;
1003 1034 setverdict(pass, __SCOPE__&":INFO: " & v_request.to_ & " resource updated successfuly");
  1035 + //TODO To save new values
1004 1036 }
1005 1037 [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
1006 1038 tc_ac.stop;
... ... @@ -1015,9 +1047,9 @@ module OneM2M_Functions {
1015 1047 }
1016 1048  
1017 1049 /**
1018   - * @desc Function to handle announcement of resources
1019   - * @param p_from
1020   - * @param p_to
  1050 + * @desc Handling of announcement of resources
  1051 + * @param p_from Expected originator of the request primitive
  1052 + * @param p_to Expected receiver of the request primitive
1021 1053 * @verdict
1022 1054 */
1023 1055 //TODO To finalize this function
... ... @@ -1028,16 +1060,16 @@ module OneM2M_Functions {
1028 1060  
1029 1061 tc_ac.start;
1030 1062 alt {
1031   - [] mccPort.receive(mw_request(mw_create(p_from, p_to))) -> value v_request {
  1063 + [] mccPortIn.receive(mw_request(mw_create(p_from, p_to))) -> value v_request {
1032 1064 tc_ac.stop;
1033 1065 setverdict(pass, __SCOPE__ & ":INFO: Announcement received");
1034 1066 //TODO Save resource and generate required attributes
1035 1067 v_responsePrimitive := f_getCreateResponsePrimitive(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive);
1036   - mccPort.send(m_response(v_responsePrimitive));
  1068 + mccPortIn.send(m_response(v_responsePrimitive));
1037 1069 f_checkAttributesToBeSaved(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive, vc_response.primitive.responsePrimitive);
1038 1070 f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, v_request.primitive.requestPrimitive.resourceType, vc_remoteCseIndex);
1039 1071 }
1040   - [] mccPort.receive{
  1072 + [] mccPortIn.receive{
1041 1073 tc_ac.stop;
1042 1074 setverdict(fail, __SCOPE__ & ":ERROR: Unexpected message received");
1043 1075 }
... ... @@ -1051,9 +1083,9 @@ module OneM2M_Functions {
1051 1083 } //end f_cse_resourceAnnouncementHandler
1052 1084  
1053 1085 /**
1054   - * @desc Function for announcement of resources
1055   - * @param p_from
1056   - * @param p_to
  1086 + * @desc Message exchange for the announcement of resources
  1087 + * @param p_resourceType ResourceType of the resource to be announced
  1088 + * @param p_requestPrimitive CREATE request to be used for the announcement
1057 1089 * @verdict
1058 1090 */
1059 1091 //TODO To finalize this function
... ... @@ -1068,17 +1100,17 @@ module OneM2M_Functions {
1068 1100 mccPort.send(m_request(v_request));
1069 1101 tc_ac.start;
1070 1102 alt {
1071   - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
  1103 + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
1072 1104 tc_ac.stop;
1073 1105 setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
1074 1106 f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive);
1075 1107 v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex);
1076 1108 }
1077   - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
  1109 + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
1078 1110 tc_ac.stop;
1079 1111 setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type " & int2str(enum2int(p_resourceType)));
1080 1112 }
1081   - [] mcaPort.receive {
  1113 + [] mccPort.receive {
1082 1114 tc_ac.stop;
1083 1115 setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
1084 1116 }
... ... @@ -1091,8 +1123,16 @@ module OneM2M_Functions {
1091 1123  
1092 1124 return v_resourceIndex;
1093 1125  
1094   - } //end f_cse_resourceAnnouncementHandler
  1126 + } //end f_cse_announceResource
1095 1127  
  1128 + /**
  1129 + * @desc Checking of returned important attributed (in response) in order to save properly internally
  1130 + * @param p_resourceType ResourceType of the resource to be checked
  1131 + * @param p_request Request primitive used for the CRU operation
  1132 + * @param p_response Response primitive received
  1133 + * @verdict
  1134 + */
  1135 + //Note: This function will be continously extended with necessary attributes/resources
1096 1136 function f_checkAttributesToBeSaved (ResourceType p_resourceType, RequestPrimitive p_request, inout ResponsePrimitive p_response) {
1097 1137 select (p_resourceType) {
1098 1138 case (int1) {
... ... @@ -1166,6 +1206,13 @@ module OneM2M_Functions {
1166 1206 // TODO test that if the resource name is returned is the same resource name as used in the create message
1167 1207 }
1168 1208  
  1209 + /**
  1210 + * @desc Comparison of two URIs
  1211 + * @param p_expectedURIIndex Resource index of the resource for which its URI is to be compared
  1212 + * @param p_receivedURI URI to be compared
  1213 + * @param p_response Response primitive received
  1214 + * @verdict
  1215 + */
1169 1216 function f_compareURIs(in integer p_expectedURIIndex, in XSD.ID p_receivedURI) runs on Tester return boolean{
1170 1217 // Local variables
1171 1218 var boolean v_matchResult := false;
... ... @@ -1203,6 +1250,11 @@ module OneM2M_Functions {
1203 1250  
1204 1251 group NotificationFunctions {
1205 1252  
  1253 + /**
  1254 + * @desc Handling message exchange for the subscription verification
  1255 + * @param p_responseStatusCode Response Status Code to be used for the response to the verification request
  1256 + * @verdict
  1257 + */
1206 1258 function f_cse_notifyProcedure_subscriptionVerificationHandler(in ResponseStatusCode p_responseStatusCode := int2001) runs on AeSimu {
1207 1259 // Local variables
1208 1260 var ResponsePrimitive v_responsePrimitive;
... ... @@ -1250,6 +1302,11 @@ module OneM2M_Functions {
1250 1302  
1251 1303 } //end f_subscriptionVerificationHandler
1252 1304  
  1305 + /**
  1306 + * @desc Handling message exchange for the notification procedure
  1307 + * @param p_primitiveContent Expected primitiveContent in the notification
  1308 + * @verdict
  1309 + */
1253 1310 function f_cse_notifyProcedure_representationHandler(template PrimitiveContent p_primitiveContent) runs on AeSimu {
1254 1311 // Local variables
1255 1312 var ResponsePrimitive v_responsePrimitive;
... ... @@ -1280,6 +1337,11 @@ module OneM2M_Functions {
1280 1337  
1281 1338 } //end f_cse_notifyProcedure_representationHandler
1282 1339  
  1340 + /**
  1341 + * @desc Handling message exchange for the notification procedure (aggregatedNotification)
  1342 + * @param p_primitiveContent Expected primitiveContent in the notification
  1343 + * @verdict
  1344 + */
1283 1345 function f_cse_notifyProcedure_aggregatedNoficationHandler(template PrimitiveContent p_primitiveContent,in integer p_numberOfAggregatedNotification) runs on AeSimu {
1284 1346 // Local variables
1285 1347 var ResponsePrimitive v_responsePrimitive;
... ... @@ -1334,6 +1396,11 @@ module OneM2M_Functions {
1334 1396  
1335 1397 } //end f_cse_notifyProcedure_aggregatedNotificationHandler
1336 1398  
  1399 + /**
  1400 + * @desc Handling message exchange for the notification procedure (deletion of subscription resource)
  1401 + * @param p_notification Expected notification
  1402 + * @verdict
  1403 + */
1337 1404 function f_cse_notifyProcedure_subscriptionDeletionHandler( template Notification p_notification) runs on AeSimu {
1338 1405 var ResponsePrimitive v_responsePrimitive;
1339 1406 tc_ac.start;
... ... @@ -1358,6 +1425,10 @@ module OneM2M_Functions {
1358 1425  
1359 1426 } //end f_cse_notifyProcedure_subscriptionDeletionHandler
1360 1427  
  1428 + /**
  1429 + * @desc Handling message exchange for the notification procedure (no notification expected)
  1430 + * @verdict
  1431 + */
1361 1432 function f_cse_notifyProcedure_noNotificationHandler() runs on AeSimu {
1362 1433 // Local variables
1363 1434  
... ... @@ -1374,6 +1445,12 @@ module OneM2M_Functions {
1374 1445  
1375 1446 } //end f_cse_notifyProcedure_noNotification Handler
1376 1447  
  1448 + /**
  1449 + * @desc Checking of notification primitiveContent
  1450 + * @param p_requestPrimitive Received Notification request
  1451 + * @param p_primitiveContent Expected primitiveContent in the notification
  1452 + * @verdict
  1453 + */
1377 1454 function f_check_notificationContent(in RequestPrimitive p_requestPrimitive, template PrimitiveContent p_primitiveContent) runs on Tester return boolean{
1378 1455 // Local variables
1379 1456 var boolean v_matchResult := false;
... ... @@ -1458,6 +1535,7 @@ module OneM2M_Functions {
1458 1535 /**
1459 1536 * @desc Registration of Test System (simulating a CSE) to the CSE IUT (creation of remoteCSE)
1460 1537 * @param p_requestPrimitive Template request primitive
  1538 + * @param p_primitiveContent Expected primitiveContent in the CREATE response primitive
1461 1539 * @return Internal resource index of the created resource
1462 1540 */
1463 1541 function f_cse_registerRemoteCse(in template RequestPrimitive p_requestPrimitive, in template PrimitiveContent p_contentResponse := ?) runs on CseSimu return integer {
... ... @@ -1521,7 +1599,6 @@ module OneM2M_Functions {
1521 1599 v_remoteCSEResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, 1, int16);//TODO Get index from v_request.primitive.requestPrimitive.to_
1522 1600 v_localResourceIndex := f_setLocalResource(v_remoteCSEResource, int16, -1);
1523 1601  
1524   -
1525 1602 v_response := m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier);
1526 1603 v_response.from_ := PX_CSE1_ID;
1527 1604 v_response.to_ := v_request.primitive.requestPrimitive.from_;
... ... @@ -1529,7 +1606,6 @@ module OneM2M_Functions {
1529 1606 mccPort.send(m_response(v_response));
1530 1607  
1531 1608 v_resourceIndex := f_setResource(v_request.primitive.responsePrimitive.primitiveContent, int16, -1);
1532   -
1533 1609 }
1534 1610 [] mccPortIn.receive {
1535 1611 tc_ac.stop;
... ... @@ -1545,41 +1621,24 @@ module OneM2M_Functions {
1545 1621 return v_resourceIndex;
1546 1622  
1547 1623 }
1548   -
1549   - /**
1550   - * @desc Send a request to the CSE IUT from the Test System (simulating a CSE)
1551   - * @param p_requestPrimitive Template request primitive
1552   - * @return Internal resource index of the created resource
1553   - */
1554   - function f_cse_sendCreateRequest(in template RequestPrimitive p_requestPrimitive) runs on CseSimu {
1555   -
1556   -//TODO: To be completed
1557   -// var RequestPrimitive v_request;
1558   -//
1559   -// v_request := f_getCreateRequestPrimitive(p_requestPrimitive);
1560   -//
1561   -// mccPort.send(m_request(v_request));
1562   -
1563   - }
1564   -
  1624 +
1565 1625 /**
1566 1626 * @desc Receive a request from the CSE IUT to the Test System (simulating a CSE)
1567   - * @param p_requestPrimitive Template request primitive
1568   - * @return Internal resource index of the created resource
  1627 + * @param p_requestPrimitive Expected CREATE request primitive
1569 1628 */
1570 1629 function f_cse_receiveCreateRequest(in template RequestPrimitive p_requestPrimitive := ?) runs on CseSimu {
1571 1630  
1572 1631 tc_ac.start;
1573 1632 alt {
1574   - [] mccPort.receive(mw_request(p_requestPrimitive)) -> value vc_request {
  1633 + [] mccPortIn.receive(mw_request(p_requestPrimitive)) -> value vc_request {
1575 1634 tc_ac.stop;
1576 1635 setverdict(pass, __SCOPE__&":INFO: CREATE Request received successfuly");
1577 1636 }
1578   - [] mccPort.receive(mw_request(?)) {
  1637 + [] mccPortIn.receive(mw_request(?)) {
1579 1638 tc_ac.stop;
1580 1639 setverdict(fail, __SCOPE__&":INFO: Unexpected CREATE Request received");
1581 1640 }
1582   - [] mccPort.receive {
  1641 + [] mccPortIn.receive {
1583 1642 tc_ac.stop;
1584 1643 setverdict(fail, __SCOPE__&":INFO: Unexpected message received");
1585 1644 }
... ... @@ -1593,12 +1652,11 @@ module OneM2M_Functions {
1593 1652 }
1594 1653  
1595 1654 /**
1596   - * @desc Creates specified resource
  1655 + * @desc Creation of a local resource (Test System simulating a CSE)
1597 1656 * @param p_resource Resource to be created
1598   - * @param p_parentIndex Parent index of resource to be saved
  1657 + * @param p_parentIndex Parent resource index of resource to be saved
1599 1658 * @param p_resourceType Type of the resource to be created
1600   - * @param p_modifiedResource Assigned and/or modified fields
1601   - * @return Internal resource index of the saved resource or -1
  1659 + * @return Internal created resource
1602 1660 */
1603 1661 function f_cse_generateLocalResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType) runs on CseSimu return PrimitiveContent {
1604 1662  
... ... @@ -1675,42 +1733,31 @@ module OneM2M_Functions {
1675 1733 }
1676 1734  
1677 1735 /**
1678   - * @desc Cse altstep for config 02
  1736 + * @desc Cse altstep for config 02 on CSE1 (AE1 as master)
1679 1737 */
1680   - altstep a_cse_cf02() runs on CseSimu {
  1738 + altstep a_cse_cf02_cse1() runs on CseSimu {
1681 1739  
1682   - [] mcaPort.receive {
1683   - log(__SCOPE__&": WARNING: Unexpected message received");
1684   - repeat;
1685   - }
1686   - [] mccPort.receive {
  1740 + [] mccPortIn.receive {
1687 1741 log(__SCOPE__&": WARNING: Unexpected message received");
1688 1742 repeat;
1689 1743 }
1690   - }
1691   -
1692   - /**
1693   - * @desc CseSimu altstep
1694   - */
1695   - altstep a_cse_cseSimu() runs on CseSimu {
1696   -
1697 1744 [] mccPort.receive {
1698 1745 log(__SCOPE__&": WARNING: Unexpected message received");
1699 1746 repeat;
1700 1747 }
1701 1748 }
1702 1749  
1703   - /**
1704   - * @desc Cse altstep for config 02
  1750 + /**
  1751 + * @desc Cse altstep for config 02 on AE1 (CSE1 as master)
1705 1752 */
1706   - altstep a_cse_aeSimu() runs on AeSimu {
1707   -
  1753 + altstep a_cse_cf02_ae1() runs on AeSimu
  1754 + {
1708 1755 [] mcaPort.receive {
1709 1756 log(__SCOPE__&": WARNING: Unexpected message received");
1710 1757 repeat;
1711 1758 }
1712 1759 }
1713   -
  1760 +
1714 1761 /**
1715 1762 * @desc Cse altstep for config 04
1716 1763 */
... ... @@ -1732,6 +1779,7 @@ module OneM2M_Functions {
1732 1779  
1733 1780 /**
1734 1781 * @desc Waits for AE registration request and process it
  1782 + * @param p_utRequest UpperTester request primitive to be sent to the IUT
1735 1783 * @return Internal resource index of AE or -1 in case of failure
1736 1784 * @verdict inconc if no AE registration request is received
1737 1785 */
... ... @@ -1780,6 +1828,7 @@ module OneM2M_Functions {
1780 1828  
1781 1829 /**
1782 1830 * @desc Waits for Container create request and process it
  1831 + * @param p_utRequest UpperTester request primitive to be sent to the IUT
1783 1832 * @return Internal resource index of Container or -1 in case of failure
1784 1833 * @verdict inconc if no Container create request is received
1785 1834 */
... ... @@ -2666,8 +2715,8 @@ module OneM2M_Functions {
2666 2715 if(vc_config == e_cf01) {
2667 2716 f_cf01Down();
2668 2717 } else if (vc_config ==e_cf02) {
2669   - vc_cseSimu.start(f_cse_postamble_deleteResourcesCSE());
2670   - vc_cseSimu.done;
  2718 + vc_cse1.start(f_cse_postamble_deleteResourcesCSE());
  2719 + vc_cse1.done;
2671 2720 f_cf02Down();
2672 2721 }
2673 2722 stop;
... ... @@ -2784,6 +2833,7 @@ module OneM2M_Functions {
2784 2833  
2785 2834 /**
2786 2835 * @desc Get the Resource Identifier with Unstructured-CSE-relative -Resource-ID format
  2836 + * @return Cleaned-up resourceID
2787 2837 */
2788 2838 function f_resourceIdCleaner(in XSD.ID p_resourceID) return XSD.ID {
2789 2839 var integer v_length := lengthof(p_resourceID);
... ... @@ -2845,6 +2895,12 @@ module OneM2M_Functions {
2845 2895 }
2846 2896 }
2847 2897  
  2898 + /**
  2899 + * @desc Removal of an element from a given integer list
  2900 + * @param p_list Given integer list
  2901 + * @param p_valueToBeDeleted Element value to be removed
  2902 + * @verdict
  2903 + */
2848 2904 function f_removeElementFromList (inout IntegerList p_list, in integer p_valueToBeDeleted) {
2849 2905 var IntegerList result := {};
2850 2906 var integer i;
... ... @@ -2856,6 +2912,12 @@ module OneM2M_Functions {
2856 2912 p_list := result;
2857 2913 }
2858 2914  
  2915 + /**
  2916 + * @desc Build a reception template from the primitiveContent sent in previous request primitive
  2917 + * @param p_primitiveContent PrimitiveContent from previous request primitive
  2918 + * @return Built reception template
  2919 + * @verdict
  2920 + */
2859 2921 function f_getTemplateFromPrimitiveContent (in template PrimitiveContent p_primitiveContent) return template PrimitiveContent{
2860 2922 var template PrimitiveContent v_primitiveContent := omit;
2861 2923  
... ... @@ -3108,6 +3170,12 @@ module OneM2M_Functions {
3108 3170 return v_primitiveContent;
3109 3171 }
3110 3172  
  3173 + /**
  3174 + * @desc Comparison of two primitiveContent parameters
  3175 + * @param p_responsePrimitiveContent Received primitiveContent
  3176 + * @param p_requestPrimitiveContent Sent primitiveContent
  3177 + * @verdict
  3178 + */
3111 3179 function f_match2PrimitiveContent (in PrimitiveContent p_responsePrimitiveContent, in template PrimitiveContent p_requestPrimitiveContent) runs on Tester {
3112 3180 var template PrimitiveContent v_primitiveContent;
3113 3181 var PrimitiveContent v_response;
... ...
... ... @@ -33,11 +33,11 @@ module OneM2M_TestSystem {
33 33 var Configurations vc_config;
34 34 var MyResourcesList vc_resourcesList;
35 35 var IntegerList vc_resourcesIndexToBeDeleted := {};
36   - //var PrimitiveScope vc_primitiveScope := PX_PRIMITIVE_SCOPE;
37   - //var AddressingMethod vc_addressingMethod := PX_ADDRESSING_METHOD;
38 36 var integer vc_aeAuxIndex;//TODO To be removed
39 37 var integer vc_acpAuxIndex;
40 38 var AccessControlPolicy_optional vc_acpAux;
  39 + var MsgIn vc_request;
  40 + var MsgIn vc_response;
41 41 };
42 42  
43 43 type component AeSimu extends Tester {
... ... @@ -48,12 +48,8 @@ module OneM2M_TestSystem {
48 48 //global variables
49 49 var PrimitiveContent vc_primitiveContentRetrievedResource;
50 50  
51   - var MsgIn vc_request;
52   - var MsgIn vc_response;
53   - var CseSimu vc_cseSimu;//For CF02 when AeSimu is master
  51 + var CseSimu vc_cse1;//For CF02 when AeSimu is master
54 52 var boolean vc_auxiliaryAe2Up := false;
55   - //var AeSimu vc_ae2;
56   -
57 53 };
58 54  
59 55 type component CseSimu extends Tester {
... ... @@ -63,10 +59,8 @@ module OneM2M_TestSystem {
63 59  
64 60 //global variables
65 61 var MyResourcesList vc_localResourcesList;
66   - var AeSimu vc_aeSimu;//For CF02 when CseSimu is master
  62 + var AeSimu vc_ae1;//For CF02 when CseSimu is master
67 63 var integer vc_remoteCseIndex;
68   - var MsgIn vc_request;
69   - var MsgIn vc_response;
70 64 };
71 65  
72 66 type component InCseSimu extends CseSimu {}
... ...
... ... @@ -963,8 +963,8 @@ module OneM2M_Testcases_CSE {
963 963  
964 964 //Preamble
965 965 v_remoteCseIndex := f_cse_registrationRemoteCse();
966   - vc_aeSimu := AeSimu.create("AE1") alive;
967   - //vc_aeSimu.start(f_a);
  966 + vc_ae1 := AeSimu.create("AE1") alive;
  967 + //vc_ae1.start(f_a);
968 968  
969 969  
970 970 }
... ... @@ -1034,7 +1034,7 @@ module OneM2M_Testcases_CSE {
1034 1034 vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
1035 1035  
1036 1036 //Test Body
1037   - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)));
  1037 + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit)));
1038 1038  
1039 1039 //v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
1040 1040  
... ... @@ -1058,8 +1058,8 @@ module OneM2M_Testcases_CSE {
1058 1058 }
1059 1059 }
1060 1060  
1061   - /*vc_cseSimu.start(f_cse_receiveCreateRequest(mw_createAEAnnc(-, -, -)));
1062   - vc_cseSimu.done;*/
  1061 + /*vc_cse1.start(f_cse_receiveCreateRequest(mw_createAEAnnc(-, -, -)));
  1062 + vc_cse1.done;*/
1063 1063  
1064 1064 // Postamble
1065 1065 f_cse_postamble_deleteResourcesCSE();
... ... @@ -1084,14 +1084,14 @@ module OneM2M_Testcases_CSE {
1084 1084  
1085 1085 //Preambule
1086 1086 vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
1087   - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
  1087 + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
1088 1088  
1089 1089 //TODO:
1090 1090 //v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex)));
1091 1091 //mcaPort.send(m_request(v_request));
1092 1092  
1093 1093 //Test Body
1094   - vc_aeSimu.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
  1094 + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
1095 1095  
1096 1096 tc_ac.start;
1097 1097  
... ... @@ -1191,13 +1191,13 @@ module OneM2M_Testcases_CSE {
1191 1191 f_cf02Up();
1192 1192  
1193 1193 //Preambule
1194   - vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
1195   - vc_cseSimu.done;
  1194 + vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
  1195 + vc_cse1.done;
1196 1196  
1197 1197 v_aeIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));
1198 1198  
1199   - vc_cseSimu.start(f_cse_resourceAnnouncementHandler());
1200   - vc_cseSimu.done;
  1199 + vc_cse1.start(f_cse_resourceAnnouncementHandler());
  1200 + vc_cse1.done;
1201 1201  
1202 1202 //TODO Deregister
1203 1203 //f_cse_deleteResource(v_aeIndex);
... ... @@ -1207,8 +1207,8 @@ module OneM2M_Testcases_CSE {
1207 1207 //Test Body
1208 1208 f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, f_getResourceId(vc_resourcesList[v_aeIndex].resource)));
1209 1209  
1210   - vc_cseSimu.start(f_cse_resourceAnnouncementHandler(PX_CSE_ID, f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative)));
1211   - vc_cseSimu.done;
  1210 + vc_cse1.start(f_cse_resourceAnnouncementHandler(PX_CSE_ID, f_getResourceAddress(v_aeIndex, e_nonHierarchical, e_spRelative)));
  1211 + vc_cse1.done;
1212 1212  
1213 1213 tc_ac.start;
1214 1214  
... ... @@ -1720,7 +1720,7 @@ module OneM2M_Testcases_CSE {
1720 1720 // Test adapter configuration
1721 1721  
1722 1722 // Preamble
1723   - vc_cseSimu.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
  1723 + vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSEBase));
1724 1724  
1725 1725 // Test Body
1726 1726 f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit));
... ... @@ -6029,8 +6029,8 @@ module OneM2M_Testcases_CSE {
6029 6029  
6030 6030 mcaPort.send(m_request(v_request));
6031 6031  
6032   - vc_cseSimu.start(f_cse_receiveCreateRequest(p_requestAnnc));
6033   - vc_cseSimu.done;
  6032 + vc_cse1.start(f_cse_receiveCreateRequest(p_requestAnnc));
  6033 + vc_cse1.done;
6034 6034  
6035 6035 // Postamble
6036 6036 f_cse_postamble_deleteResources();
... ... @@ -6259,15 +6259,15 @@ module OneM2M_Testcases_CSE {
6259 6259 // Preamble
6260 6260  
6261 6261 if (PX_IUT_IS_MN_CSE == true) {
6262   - vc_cseSimu.start(f_cse_registrationRemoteCse(m_createRemoteCSEBase));
  6262 + vc_cse1.start(f_cse_registrationRemoteCse(m_createRemoteCSEBase));
6263 6263 }else if (PX_IUT_IS_IN_CSE == true) {
6264   - vc_cseSimu.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
  6264 + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
6265 6265 }
6266   - vc_cseSimu.done;
  6266 + vc_cse1.done;
6267 6267  
6268   - vc_cseSimu.start(f_cse_resourceAnnouncementHandler());
  6268 + vc_cse1.start(f_cse_resourceAnnouncementHandler());
6269 6269 v_resourceIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, omit));
6270   - vc_cseSimu.done;
  6270 + vc_cse1.done;
6271 6271  
6272 6272 if(p_resourceType == int4) {
6273 6273 v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex);
... ... @@ -6277,11 +6277,11 @@ module OneM2M_Testcases_CSE {
6277 6277 // Test Body
6278 6278 v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
6279 6279  
6280   - vc_cseSimu.start(f_cse_receiveCreateRequest(p_requestAnnc));
  6280 + vc_cse1.start(f_cse_receiveCreateRequest(p_requestAnnc));
6281 6281 mcaPort.send(m_request(v_request));
6282   - vc_cseSimu.done;
  6282 + vc_cse1.done;
6283 6283  
6284   - vc_request.primitive.requestPrimitive := f_getRemoteCseRequestPrimitive(vc_cseSimu);
  6284 + vc_request.primitive.requestPrimitive := f_getRequestPrimitive(vc_cse1);
6285 6285  
6286 6286 // Postamble
6287 6287 f_cse_postamble_deleteResources();
... ... @@ -7815,10 +7815,10 @@ module OneM2M_Testcases_CSE {
7815 7815  
7816 7816 } else { //ResourceType = RemoteCSE
7817 7817  
7818   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
7819   - vc_cseSimu.done;
  7818 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  7819 + vc_cse1.done;
7820 7820  
7821   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  7821 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
7822 7822  
7823 7823 }
7824 7824  
... ... @@ -7955,10 +7955,10 @@ module OneM2M_Testcases_CSE {
7955 7955  
7956 7956 } else { //ResourceType = RemoteCSE
7957 7957  
7958   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
7959   - vc_cseSimu.done;
  7958 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  7959 + vc_cse1.done;
7960 7960  
7961   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  7961 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
7962 7962  
7963 7963 }
7964 7964  
... ... @@ -8121,10 +8121,10 @@ module OneM2M_Testcases_CSE {
8121 8121 v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
8122 8122  
8123 8123 } else {
8124   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
8125   - vc_cseSimu.done;
  8124 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  8125 + vc_cse1.done;
8126 8126  
8127   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  8127 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
8128 8128 }
8129 8129  
8130 8130 // Test Body
... ... @@ -8290,10 +8290,10 @@ module OneM2M_Testcases_CSE {
8290 8290 v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
8291 8291  
8292 8292 }else{
8293   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
8294   - vc_cseSimu.done;
  8293 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  8294 + vc_cse1.done;
8295 8295  
8296   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  8296 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
8297 8297 }
8298 8298  
8299 8299 mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_aeIndex))));//from AE ID
... ... @@ -8543,10 +8543,10 @@ module OneM2M_Testcases_CSE {
8543 8543 v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
8544 8544  
8545 8545 }else{
8546   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
8547   - vc_cseSimu.done;
  8546 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  8547 + vc_cse1.done;
8548 8548  
8549   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  8549 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
8550 8550 }
8551 8551  
8552 8552 mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex) ,
... ... @@ -8684,10 +8684,10 @@ module OneM2M_Testcases_CSE {
8684 8684 v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
8685 8685  
8686 8686 }else{
8687   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
8688   - vc_cseSimu.done;
  8687 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  8688 + vc_cse1.done;
8689 8689  
8690   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  8690 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
8691 8691 }
8692 8692  
8693 8693 mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex),
... ... @@ -8821,10 +8821,10 @@ module OneM2M_Testcases_CSE {
8821 8821 v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
8822 8822  
8823 8823 }else{
8824   - vc_cseSimu.start(f_cse_registerRemoteCse(p_requestPrimitive));
8825   - vc_cseSimu.done;
  8824 + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive));
  8825 + vc_cse1.done;
8826 8826  
8827   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  8827 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
8828 8828 }
8829 8829  
8830 8830 mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(f_getResourceAddress(v_resourceIndex),
... ... @@ -14108,10 +14108,10 @@ module OneM2M_Testcases_CSE {
14108 14108  
14109 14109 v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource
14110 14110 } else { //ResourceType = RemoteCSE
14111   - vc_cseSimu.start(f_cse_registerRemoteCse(p_createRequestPrimitive));
14112   - vc_cseSimu.done;
  14111 + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive));
  14112 + vc_cse1.done;
14113 14113  
14114   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  14114 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
14115 14115 }
14116 14116  
14117 14117 //Test Body
... ... @@ -14732,10 +14732,10 @@ module OneM2M_Testcases_CSE {
14732 14732  
14733 14733 v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource
14734 14734 } else { //ResourceType = RemoteCSE
14735   - vc_cseSimu.start(f_cse_registerRemoteCse(p_createRequestPrimitive));
14736   - vc_cseSimu.done;
  14735 + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive));
  14736 + vc_cse1.done;
14737 14737  
14738   - v_resourceIndex := f_getRemoteCseResource(vc_cseSimu);
  14738 + v_resourceIndex := f_getRemoteCseResource(vc_cse1);
14739 14739 }
14740 14740  
14741 14741 //Test Body
... ...