OneM2M_PermutationFunctions.ttcn 373 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     ETSI
 *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
 *              $Id: OneM2M_Testcases.ttcn 347 2017-08-11 08:48:20Z reinaortega $
 *  @desc       Module containing test cases for oneM2M
 *
 */
module OneM2M_PermutationFunctions {

	import from OneM2M_TestSystem all;
	import from OneM2M_Templates all;
	import from OneM2M_Types all;//{type XSD.ID};
	import from OneM2M_TypesAndValues all;
	import from OneM2M_Pixits all;
	import from LibCommon_Time all;
	import from OneM2M_Pics all;
	import from OneM2M_Functions all;
	import from XSD all;
	
	group AE {
		
		group General {
			
			group Create {
						
					function f_AE_GEN_CRE_001(PrimitiveScope p_primitiveScope) runs on CseSimu {
						
						var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
						var integer v_resourceIndex := -1;
						var MsgIn v_request;
37
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid CREATE Request for container to ";
38
39
						
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
40
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
41
42
43
44
45
46
							stop;
						}

						f_cf03Up();
						
						//Send Trigger Message
47
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope);
48
						f_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope));
49
50
51
						
						tc_ac.start;
						alt {
52
							[] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
53
								tc_ac.stop;
54
								setverdict(pass, __SCOPE__ & " : Container creation request received successfuly");
55
56
								v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);	
								mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
57
							}
58
							[] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request {
59
								tc_ac.stop;
60
								setverdict(fail, __SCOPE__ & " : Create Request with unexpected target");
61
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
62
63
64
								stop;
							}
							[] tc_ac.timeout {
65
								setverdict(fail, __SCOPE__ & " : No answer while creating resource");
66
67
68
69
70
71
72
73
								stop;
							}
						}
						
						// Postamble
						f_cf03Down();
					}
					function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
74
						var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
75
						var Integer v_resourceIndex := -1;
76
						var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
77
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid CREATE Request for container to ";
78
79
80
81
						
						
						//Test Control
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
82
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
83
84
85
86
87
88
							stop;
						}
	
						f_cf03Up();
	
						//Send Trigger Message
89
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
90
						f_sendUtPrimitive(v_utRequest,v_action  & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope));
91
92
93
94
							
	
						tc_ac.start;
						alt {
95
							[] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
96
								tc_ac.stop;
97
								setverdict(pass, __SCOPE__ & " : Container creation request received successfuly");
98
99
								v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);	
								mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
100
							}
101
							[] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request {
102
								tc_ac.stop;
103
								setverdict(fail, __SCOPE__ & " : Create Request with unexpected target");
104
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
105
106
107
								stop;
							}
							[] tc_ac.timeout {
108
								setverdict(fail, __SCOPE__ & " : No answer while creating resource");
109
110
111
112
113
114
115
116
117
118
119
120
121
								stop;
							}
						}
	
						// Postamble
						f_cf03Down();
					}
				
			} //end group Create
			
			group Update {
						
					function f_AE_GEN_UPD_001(PrimitiveScope p_primitiveScope) runs on CseSimu {
122
						var MsgIn v_request;
123
						var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
124
						var integer v_resourceIndex;
125
						var PrimitiveContent v_localResource;
126
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid UPDATE Request for container to ";
127
128
129
						
						
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
130
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
131
132
133
134
135
136
							stop;
						}
						
						f_cf03Up();
						
						//Send Trigger Message
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
137
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
138
139
						v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope);
140
						f_sendUtPrimitive(v_utRequest,v_action  & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
141
142
143
						
						tc_ac.start;
						alt {
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
144
							[] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
145
								tc_ac.stop;
146
								setverdict(pass, __SCOPE__ & " : Container update request received successfuly");
147
148
								f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
149
							}
150
							[] mcaPortIn.receive(mw_request(mw_updateContainer())) {
151
								tc_ac.stop;
152
								setverdict(fail, __SCOPE__ & " : Update Request with unexpected target");
153
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
154
155
156
								stop;
							}
							[] tc_ac.timeout {
157
								setverdict(fail, __SCOPE__ & " : No answer while updating resource");
158
159
160
161
162
163
164
165
								stop;
							}
						}
						
						// Postamble
						f_cf03Down();
					}
					function f_AE_GEN_UPD_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
166
						var MsgIn v_request;
167
						var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
168
						var integer v_resourceIndex := -1;
169
						var PrimitiveContent v_localResource;
170
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid UPDATE Request for container to ";
171
172
						
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
173
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
174
175
176
177
178
179
							stop;
						}
	
						f_cf03Up();
	
						//Send Trigger Message
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
180
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
181
182
						v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope);
183
						f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
184
185
186
								
						tc_ac.start;
						alt {
187
							[] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
188
								tc_ac.stop;
189
								setverdict(pass, __SCOPE__ & " : Container update request received successfuly");
190
191
								f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
192
							}
193
							[] mcaPortIn.receive(mw_request(mw_updateContainer())) {
194
								tc_ac.stop;
195
								setverdict(fail, __SCOPE__ & " : Update Request with unexpected target");
196
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
197
198
199
								stop;
							}
							[] tc_ac.timeout {
200
								setverdict(fail, __SCOPE__ & " : No answer while updating resource");
201
202
203
204
205
206
207
208
209
210
211
212
213
								stop;
							}
						}
	
						// Postamble
						f_cf03Down();
					}
				
			} //end group Update
			
			group Retrieve {
						
					function f_AE_GEN_RET_001(PrimitiveScope p_primitiveScope) runs on CseSimu {
214
						var MsgIn v_request;
215
216
						var template UtTriggerPrimitive v_utRequest;
                        var integer v_resourceIndex := -1;
217
						var PrimitiveContent v_localResource;
218
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to ";
219
220
						
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
221
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
222
223
224
225
226
227
							stop;
						}
			
						f_cf03Up();
			
						//Send Trigger Message
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
228
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
229
						v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
230
231
232
						v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
						f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
                        
233
234
						tc_ac.start;
						alt {
235
							[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
236
								tc_ac.stop;
237
								setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly");
238
239
								f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
240
							}
241
							[] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request {
242
								tc_ac.stop;
243
								setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target");
244
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
245
246
247
								stop;
							}
							[] tc_ac.timeout {
248
								setverdict(fail, __SCOPE__ & " : No answer while retrieving resource");
249
250
251
252
253
254
255
256
								stop;
							}
						}
			
						// Postamble
						f_cf03Down();
					}
					function f_AE_GEN_RET_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
257
						var MsgIn v_request;
258
259
						var template UtTriggerPrimitive v_utRequest;
                        var integer v_resourceIndex := -1;
260
						var PrimitiveContent v_localResource;
261
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to ";
262
263
						
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
264
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
265
266
267
268
269
270
							stop;
						}

						f_cf03Up();

						//Send Trigger Message
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
271
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
272
						v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
273
						v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
274
275
                        f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
						
276
277
						tc_ac.start;
						alt {
278
							[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
279
								tc_ac.stop;
280
								setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly");
281
282
								f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
283
							}
284
							[] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request {
285
								tc_ac.stop;
286
								setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target");
287
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
288
289
290
								stop;
							}
							[] tc_ac.timeout {
291
								setverdict(fail, __SCOPE__ & " : No answer while retrieving resource");
292
293
294
295
296
297
298
299
300
301
302
303
304
								stop;
							}
						}

						// Postamble
						f_cf03Down();
					}
	
			} //end group Retrieve
						
			group Delete {
						
					function f_AE_GEN_DEL_001(PrimitiveScope p_primitiveScope) runs on CseSimu {
305
						var MsgIn v_request;
306
						var template UtTriggerPrimitive v_utRequest := m_utDelete;
307
308
						var integer v_auxInteger;
						var PrimitiveContent v_localResource;
309
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid DELETE Request for container to ";
310
311

						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
312
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
313
314
315
316
317
318
							stop;
						}
			
						f_cf03Up();
			
						//Send Trigger Message
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
319
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
320
						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
321
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope);
322
						f_sendUtPrimitive(v_utRequest,v_action  & f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope));
323
324
325
			
						tc_ac.start;
						alt {
326
							[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
327
								tc_ac.stop;
328
329
330
								setverdict(pass, __SCOPE__ & " : Container delete request received successfuly");
								f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
331
							}
332
							[] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request {
333
								tc_ac.stop;
334
								setverdict(fail, __SCOPE__ & " : Delete request with unexpected target");
335
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
336
337
338
								stop;
							}
							[] tc_ac.timeout {
339
								setverdict(fail, __SCOPE__ & " : No answer while updating resource");
340
341
342
343
344
345
346
347
								stop;
							}
						}
			
						// Postamble
						f_cf03Down();
					}
					function f_AE_GEN_DEL_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
348
						var MsgIn v_request;
349
						var template UtTriggerPrimitive v_utRequest := m_utDelete;
350
351
						var integer v_auxInteger;
						var PrimitiveContent v_localResource;
352
						var universal charstring v_action :=  __SCOPE__ & ": Please, send a valid DELETE Request for container to ";
353
354
						
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
355
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
356
357
358
359
360
							stop;
						}

						f_cf03Up();

361
						//Send Trigger Message
362
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
363
						v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
364
						v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope);
365
						f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope));
366
367
368
369
				

						tc_ac.start;
						alt {
370
							[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
371
								tc_ac.stop;
372
373
374
								setverdict(pass, __SCOPE__ & " : Container delete request received successfuly");
								f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
375
							}
376
							[] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request {
377
								tc_ac.stop;
378
								setverdict(fail, __SCOPE__ & " : Delete request with unexpected target");
379
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
380
381
382
								stop;
							}
							[] tc_ac.timeout {
383
								setverdict(fail, __SCOPE__ & " : No answer while updating resource");
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
								stop;
							}
						}

						// Postamble
						f_cf03Down();
					}
	
			} //end group Delete
			
		}//end group General

		group Registration {
			
			group Create {
						
Miguel Angel Reina Ortega's avatar
Fix #38    
Miguel Angel Reina Ortega committed
400
				   function f_AE_REG_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
401
402
	
						//primitives for mcaPortIn
403
					    var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
404
405
406
					    var integer v_parentIndex := -1;
					    var integer v_resourceIndex := -1;
					    var PrimitiveContent v_resource;
407
408
409
410
411
						var ResponsePrimitive v_responsePrimitive;
	
					   f_cf03Up();
	
					   //Send Trigger Message
412
413
					   p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
					   p_request.to_ := p_utRequest.requestPrimitive.to_;
414
					   f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
415
416
417
418
	
					   //Test behavior
					   tc_ac.start;
					   alt{
Miguel Angel Reina Ortega's avatar
Fix #38    
Miguel Angel Reina Ortega committed
419
							[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
420
							   tc_ac.stop;
421
							   setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!");
422
423
							   v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);	
							
424
							   //send back responsePrimitive
425
							   mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
426
						   }
427
							[] mcaPortIn.receive(mw_request(mw_createAe())) -> value v_request {
428
							   tc_ac.stop;
429
							   setverdict(fail, __SCOPE__ & " : Unexpected AE registration request");
430
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
431
432
						   }
						   [] tc_ac.timeout{
433
							   setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
						   }
	
					   }
	
					   // Postamble
					   f_cf03Down();
			   		}
			
			} // End of subgroup Create
			
			group Delete {
			
			}// End Delete subgroup

		}//end Registration subgroup

		group Data_Management_and_Repository {
			
			group Create {
			
					function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
455
						var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
456
						var integer v_resourceIndex := -1;
Miguel Angel Reina Ortega's avatar
Fix #38    
Miguel Angel Reina Ortega committed
457
458
						var PrimitiveContent v_localResource;
						var integer v_containerIndex := -1;
459
						
460
461
462
						//Test component configuration
						f_cf03Up();
	
463
464
						//send triggering
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
465
						v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
466
467
						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -);
						p_request.to_ := p_utRequest.requestPrimitive.to_;
468
						f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_containerIndex, -, -));
469
470
471
472
473
474
	
						//Test behavior
						tc_ac.start;
						alt{
	
							//receive MsgIn requestPrimitive
475
							[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
476
								tc_ac.stop;
477
								setverdict(pass, __SCOPE__ & " : ContentInstance creation request is accepted!!");
478
								v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);	
479
								//send back responsePrimitive
480
								mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
481
482
							}
	
483
							[] mcaPortIn.receive(mw_request(mw_create)) -> value v_request{
484
								tc_ac.stop;
485
								setverdict(fail, __SCOPE__ & " : Unexpected CREATE request ");
486
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
487
488
							}
							[] tc_ac.timeout{
489
								setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
490
491
492
493
494
495
496
							}
						}
	
						// Postamble
						f_cf03Down();
					}
					function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
497
						var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
498
						var integer v_resourceIndex := -1;
499
						
500
501
502
503
						//Test component configuration
						f_cf03Up();
	
						//send triggering primitive to SUT
504
505
						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -);
						p_request.to_ := p_utRequest.requestPrimitive.to_;
506
						f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -));
507
508
509
510
511
512
	
						//Test behavior
						tc_ac.start;
						alt{
	
							//receive MsgIn requestPrimitive
513
							[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
514
								tc_ac.stop;
515
								setverdict(pass, __SCOPE__ & " : Container creation request is accepted!!");
516
								v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive);	
517
								//send back responsePrimitive
518
								mcaPortIn.send(f_getMsgOutPrimitive(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive))));
519
							}
520
							[] mcaPortIn.receive(mw_request(mw_create)) {
521
								tc_ac.stop;
522
								setverdict(fail, __SCOPE__ & " : Unexpected CREATE request ");
523
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
524
525
							}
							[] tc_ac.timeout{
526
								setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
527
528
529
530
531
532
533
534
535
536
537
							}
						}
	
						// Postamble
						f_cf03Down();
					}
				 
			}//End of subgroup Create
			
			group Update {
				
538
				   function f_AE_DMR_UPD_001(template UtTriggerPrimitive p_utRequest, in universal charstring p_action, template RequestPrimitive p_expectedUpdateRequest) runs on CseSimu {
539
540
541
	
						//primitives for mcaPortIn
					   	var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
542
						var integer v_resourceIndex := -1;
543
					   	var PrimitiveContent v_localResource;
544
					   	
545
546
547
					   	f_cf03Up();
					   
					   	//Preamble
548
						
549
550
					   	//Send Tr
					    v_localResource := f_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
551
552
						v_resourceIndex := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
553
					   	f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex));
554
555
556
557
558
559
560
	
					   //Test behavior
					   
					   tc_ac.start;
					   alt{
							[] mcaPortIn.receive(mw_request(p_expectedUpdateRequest)) -> value v_request {
							   tc_ac.stop;
561
							   setverdict(pass, __SCOPE__ & " : AE update request is accepted!");
562
563
564
							   f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive);
							   mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
							}
565
							[] mcaPortIn.receive(mw_request(mw_update)) -> value v_request {
566
							   tc_ac.stop;
567
							   setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request");
568
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
569
570
						   }
						   [] tc_ac.timeout{
571
							   setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
572
573
574
575
576
577
578
579
580
						   }
	
					   }
	
					   // Postamble
					   f_cf03Down();
					}
	
					function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
581
						var MsgIn v_request;
582
						var PrimitiveContent v_localResource;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
583
						var integer v_resourceIndex := -1;
584
585
586
587

						//Test component configuration
						f_cf03Up();

588
589
						//send triggering 
						v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
590
591
						v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
592
						f_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex));
593
594
595
596
597
598

						//Test behavior
						tc_ac.start;
						alt{

							//receive MsgIn requestPrimitive
599
							[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
600
								tc_ac.stop;
601
								setverdict(pass, __SCOPE__ & " : Container update request is accepted!!");
602
603
								f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive);
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
604
							}
605
							[] mcaPortIn.receive(mw_request(mw_update)) {
606
								tc_ac.stop;
607
								setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request");
608
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
609
610
							}
							[] tc_ac.timeout{
611
								setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
612
613
614
615
616
617
618
619
620
621
622
							}
						}

						// Postamble
						f_cf03Down();
					}

			}//End of subgroup Update

			group Retrieve {
				
623
					function f_AE_DMR_RET_001(ResourceType p_resourceType, in template (omit) PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu {
624
625
		
						//variables
626
						var template UtTriggerPrimitive v_utRequest;
627
628
						var MsgIn v_request;
						var ResponsePrimitive v_responsePrimitive;
629
						var PrimitiveContent v_localResource;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
630
						var integer v_resourceIndex := -1;
631
						
632
633
634
						//Test component configuration
						f_cf03Up();
		
635
						//send triggering message
636
637
638
639
640
641
					    if(p_resourceType != int5) {
					    	v_localResource := f_generateLocalResource(p_primitiveContent, vc_cSEBaseIndex, p_resourceType);
					    	v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
					    } else {
					    	v_resourceIndex := vc_cSEBaseIndex;
					    }
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
642
						v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex));
643
						f_sendUtPrimitive(v_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex));
644
645
646
647
						
						//Test behavior
						tc_ac.start;
						alt{
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
648
							[] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_resourceIndex)))) -> value v_request {
649
								tc_ac.stop;
650
								setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!");
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
651
								v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
652
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
653
							}
654
							[] mcaPortIn.receive (mw_request(mw_retrieve(?))){
655
								tc_ac.stop;
656
								setverdict(fail, __SCOPE__ & " : Retrieve request for unexpected target");
657
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
658
659
							}
							[] tc_ac.timeout{
660
								setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
							}
						}
		
						// Postamble
						f_cf03Down();
					}
					

			}//End of subgroup Retrieve
			
			group Delete {
			
			}

		}//end DMR subgroup

		group Subscription_and_Notification {
			
			group Create {
				
					function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
	
						var MsgIn v_request;
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
684
685
686
						var integer v_parentIndex := -1;
						var integer v_resourceIndex := -1;
						var PrimitiveContent v_resource;
687
688
689
690
691
						var ResponsePrimitive v_responsePrimitive;

						f_cf03Up();

						//send triggering primitive to SUT
692
						p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress();
693
694
695
696
697
698
699
						f_sendUtPrimitive(p_utRequest,p_action);

						//Test behavior
						tc_ac.start;
						alt{
							[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
								tc_ac.stop;
700
								setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!");
701
								v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_);
Miguel Angel Reina Ortega's avatar
Fix #47    
Miguel Angel Reina Ortega committed
702
								v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
Miguel Angel Reina Ortega's avatar
Fix #44    
Miguel Angel Reina Ortega committed
703
704
								v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);	
								v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
705
								//send back responsePrimitive
706
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
707
708
709
							}
							[] mcaPortIn.receive {
								tc_ac.stop;
710
								setverdict(fail, __SCOPE__ & " : Subscription creation request is rejected due to not including the optional attribute!");
711
								mcaPortIn.send(f_getMsgOutPrimitive(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))));
712
713
							}
							[] tc_ac.timeout{
714
								setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!");
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
							}
						}

						// Postamble
						f_cf03Down();

					}
			
			}//End Create Group
			
			group Notify {
				
			}//End of Notify group


		}//end SUB subgroup


	}//end group AE
	
	
		
	group CSE {
		
		group Generic {
			
			group Create {
								
					function f_CSE_GEN_CRE_001(in PrimitiveScope p_primitiveScope) runs on AeSimu {
    				
						// Local variables
						var RequestPrimitive v_request;
						var integer v_aeIndex := -1;
						var integer v_resourceIndex := -1;
						var AddressingMethod v_addressingMethod;
						var PrimitiveScope v_primitiveScope;
											   
						// Test control
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
							stop;
						}
    				
						// Test component configuration
						f_cf01Up();
    				
						// Test adapter configuration
    				
						// Preamble
						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
					
						v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
					
						// Test Body
						//Force usage of Non-Hierarchical addressing method
						v_addressingMethod := e_nonHierarchical;
						v_primitiveScope := p_primitiveScope;
						v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex);
						v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope);
						
775
						mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
						tc_ac.start;
						alt {
							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
								tc_ac.stop;
								setverdict(pass, __SCOPE__ & ": Container resource created using non-hierarchical addressing method");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Error while creating container resource using non-hierarchical addressing method");
							}
							[] tc_ac.timeout {
								setverdict(fail, __SCOPE__ & ": No answer while creating resource");
							}
						}	
    								
						// Postamble
						f_cse_postamble_deleteResources();
					
						// Tear down
						f_cf01Down();
    				
					}//end f_CSE_GEN_CRE_001				
				
					function f_CSE_GEN_CRE_002(in PrimitiveScope p_primitiveScope) runs on AeSimu {
    				
						// Local variables
						var RequestPrimitive v_request;
						var integer v_aeIndex := -1;
						var integer v_resourceIndex := -1;
						var AddressingMethod v_addressingMethod;
						var PrimitiveScope v_primitiveScope;
											   
						// Test control
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
							stop;
						}
    				
						// Test component configuration
						f_cf01Up();
    				
						// Test adapter configuration
    				
						// Preamble
						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
					
						v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
					
						// Test Body
						//Force usage of Non-Hierarchical addressing method
						v_addressingMethod := e_hierarchical;
						v_primitiveScope := p_primitiveScope;
						v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex);
						v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope);
												
835
						mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
						tc_ac.start;
						alt {
							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
								tc_ac.stop;
								setverdict(pass, __SCOPE__ & ": Container resource created using hierarchical addressing method");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method");
							}
							[] tc_ac.timeout {
								setverdict(fail, __SCOPE__ & ": No answer while creating resource");
							}
						}	
    								
						// Postamble
						f_cse_postamble_deleteResources();
					
						// Tear down
						f_cf01Down();
    				
					}//end f_CSE_GEN_CRE_002				
				
			} // end of group Create
			
			group Retrieve {

					function f_CSE_GEN_RET_001(in PrimitiveScope p_primitiveScope) runs on AeSimu {
    				
						// Local variables
						var integer v_aeIndex := -1;
						var integer v_resourceIndex := -1;
						var AddressingMethod v_addressingMethod;
						var PrimitiveScope v_primitiveScope;
											   
						// Test control
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
							stop;
						}
    				
						// Test component configuration
						f_cf01Up();
    				
						// Test adapter configuration
    				
						// Preamble
						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
					
						v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
					
						// Test Body
						//Force usage of Non-Hierarchical addressing method
						v_addressingMethod := e_nonHierarchical;
						v_primitiveScope := p_primitiveScope;
						
896
						mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))));
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
						tc_ac.start;
						alt {
							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
								tc_ac.stop;
								setverdict(pass, __SCOPE__ & ": Container resource retrieved using non-hierarchical addressing method");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using non-hierarchical addressing method");
							}
							[] tc_ac.timeout {
								setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
							}
						}	
    								
						// Postamble
						f_cse_postamble_deleteResources();
					
						// Tear down
						f_cf01Down();
    				
					}//end f_CSE_GEN_RET_001				
				
					function f_CSE_GEN_RET_002(in PrimitiveScope p_primitiveScope) runs on AeSimu {
    				
						// Local variables
						var integer v_aeIndex := -1;
						var integer v_resourceIndex := -1;
						var AddressingMethod v_addressingMethod;
						var PrimitiveScope v_primitiveScope;
											   
						// Test control
						if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
							setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case");
							stop;
						}
    				
						// Test component configuration
						f_cf01Up();
    				
						// Test adapter configuration
    				
						// Preamble
						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
					
						v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); 
					
						// Test Body
						//Force usage of Non-Hierarchical addressing method
						v_addressingMethod := e_hierarchical;
						v_primitiveScope := p_primitiveScope;
						
953
						mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))));tc_ac.start;
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
						alt {
							[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
								tc_ac.stop;
								setverdict(pass, __SCOPE__ & ": Container resource retrieved using hierarchical addressing method");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
							}
							[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
								tc_ac.stop;
								setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using hierarchical addressing method");
							}
							[] tc_ac.timeout {
								setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
							}
						}	
    								
						// Postamble
						f_cse_postamble_deleteResources();
					
						// Tear down
						f_cf01Down();
    				
					}//end f_CSE_GEN_RET_002				
				
			} // end of group Retrieve
			
			group Update {
								
					function f_CSE_GEN_UPD_001(in PrimitiveScope p_primitiveScope) runs on AeSimu {
    				
						// Local variables
						var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
						var integer v_aeIndex := -1;
						var integer v_resourceIndex := -1;
						var AddressingMethod v_addressingMethod;
						var PrimitiveScope v_primitiveScope;
											   
						// Test control
						if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
							setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case");
							stop;
						}
    				
						// Test component configuration
						f_cf01Up();
For faster browsing, not all history is shown. View entire blame