1 | /**
|
---|
2 | * @author STF 370
|
---|
3 | * @version $Id: $
|
---|
4 | * @desc This module provides common function for TestCoordinator component.
|
---|
5 | */
|
---|
6 | module AtsImsIot_Functions {
|
---|
7 |
|
---|
8 | import from AtsImsIot_TestSystem {type ImsTestCoordinator;}
|
---|
9 |
|
---|
10 | import from LibIot_PIXITS {modulepar PX_MAX_MSG_WAIT, PX_PRODUCTS;}
|
---|
11 |
|
---|
12 | import from AtsImsIot_TypesAndValues {type SipMessage;}
|
---|
13 |
|
---|
14 |
|
---|
15 | import from LibIms_UpperTester all;
|
---|
16 |
|
---|
17 | import from LibIot_TestInterface {type InterfaceMonitor, TestCoordinator, EquipmentUser;}
|
---|
18 |
|
---|
19 | import from LibIot_Functions {function f_getE2EVerdict;}
|
---|
20 |
|
---|
21 | group ue {
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * @desc
|
---|
25 | * Starts user component behavior for triggering the registration
|
---|
26 | * procedures at the UE from test coordinator.
|
---|
27 | * @return
|
---|
28 | * true in case of successfull execution of the trigger command
|
---|
29 | * otherwise false
|
---|
30 | */
|
---|
31 | function f_mtc_userTriggerRegistration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
32 | runs on TestCoordinator
|
---|
33 | return boolean {
|
---|
34 | var boolean v_status := true;
|
---|
35 | // TODO Investigate if f_PR_user_home_registration is to be removed
|
---|
36 | // Reason: Thre is no difference when triggering UE to register in home or visiting NW
|
---|
37 | if( p_userInfo.publicId == "dummy" ) { return false; }
|
---|
38 |
|
---|
39 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
40 | return v_status;
|
---|
41 | }
|
---|
42 |
|
---|
43 | /**
|
---|
44 | * @desc
|
---|
45 | * Starts user component behavior for checking the successful
|
---|
46 | * registration.
|
---|
47 | * @param p_userCompRef Reference to IMS UE user component
|
---|
48 | * @return
|
---|
49 | * true in case of successfull execution of the trigger command
|
---|
50 | * otherwise false
|
---|
51 | */
|
---|
52 | function f_mtc_userCheckRegistration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
53 | runs on TestCoordinator return boolean {
|
---|
54 | var boolean v_status := true;
|
---|
55 | if( p_userInfo.publicId == "dummy" ) { return false; }
|
---|
56 | v_status := f_mtc_userCheckRegistrationSuccessful(p_userCompRef);
|
---|
57 | return v_status;
|
---|
58 | }
|
---|
59 |
|
---|
60 | /**
|
---|
61 | * @desc Trigger UE given by p_ueRef to initiate an MO call
|
---|
62 | * @param p_userCompRef Reference to IMS UE user component
|
---|
63 | * @param p_calledParty ImsUserInfo of called party
|
---|
64 | * @return
|
---|
65 | * true in case of successfull execution of the trigger command
|
---|
66 | * otherwise false
|
---|
67 | */
|
---|
68 | function f_mtc_userTriggerInitiateCall(EquipmentUser p_ueRef, ImsUserInfo p_calledParty)
|
---|
69 | runs on TestCoordinator return boolean {
|
---|
70 | var boolean v_status := true;
|
---|
71 | // TODO
|
---|
72 | return v_status;
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * @desc Trigger UE given by p_ueRef to initiate an MO call
|
---|
76 | * @param p_userCompRef Reference to IMS UE user component
|
---|
77 | * @return
|
---|
78 | * true in case of successfull execution of the trigger command
|
---|
79 | * otherwise false
|
---|
80 | */
|
---|
81 | function f_mtc_userTriggerAnswerCall(EquipmentUser p_ueRef)
|
---|
82 | runs on TestCoordinator return boolean {
|
---|
83 | var boolean v_status := true;
|
---|
84 | // TODO
|
---|
85 | return v_status;
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * @desc Trigger UE given by p_ueRef to end current call
|
---|
89 | * @param p_userCompRef Reference to IMS UE user component
|
---|
90 | * @return
|
---|
91 | * true in case of successfull execution of the trigger command
|
---|
92 | * otherwise false
|
---|
93 | */
|
---|
94 | function f_mtc_triggerEndCall(EquipmentUser p_ueRef)
|
---|
95 | runs on TestCoordinator return boolean {
|
---|
96 | var boolean v_status := true;
|
---|
97 | // TODO
|
---|
98 | return v_status;
|
---|
99 | }
|
---|
100 |
|
---|
101 |
|
---|
102 | /**
|
---|
103 | * @desc Trigger UE given by p_ueRef to enter HOLD state
|
---|
104 | * @param p_userCompRef Reference to IMS UE user component
|
---|
105 | * @return
|
---|
106 | * true in case of successfull execution of the trigger command
|
---|
107 | * otherwise false
|
---|
108 | */
|
---|
109 | function f_mtc_userTriggerHold(EquipmentUser p_ueRef)
|
---|
110 | runs on TestCoordinator return boolean {
|
---|
111 | var boolean v_status := true;
|
---|
112 | // TODO
|
---|
113 | return v_status;
|
---|
114 | }
|
---|
115 | /**
|
---|
116 | * @desc Trigger UE given by p_ueRef to leave HOLD state and resume pending call
|
---|
117 | * @param p_userCompRef Reference to IMS UE user component
|
---|
118 | * @return
|
---|
119 | * true in case of successfull execution of the trigger command
|
---|
120 | * otherwise false
|
---|
121 | */
|
---|
122 | function f_mtc_userTriggerResume(EquipmentUser p_ueRef)
|
---|
123 | runs on TestCoordinator return boolean {
|
---|
124 | var boolean v_status := true;
|
---|
125 | // TODO
|
---|
126 | return v_status;
|
---|
127 | }
|
---|
128 |
|
---|
129 | /**
|
---|
130 | * @desc Check that UE given by p_ueRef is ringing
|
---|
131 | * @param p_userCompRef Reference to IMS UE user component
|
---|
132 | * @return true or false
|
---|
133 | */
|
---|
134 | function f_mtc_userCheckRinging(EquipmentUser p_ueRef)
|
---|
135 | runs on TestCoordinator return boolean {
|
---|
136 | var boolean v_status := true;
|
---|
137 | // TODO
|
---|
138 | return v_status;
|
---|
139 | }
|
---|
140 |
|
---|
141 | /**
|
---|
142 | * @desc Check that UE given by p_ueRef reports a successfull call establishment
|
---|
143 | * @param p_userCompRef Reference to IMS UE user component
|
---|
144 | * @return true or false
|
---|
145 | */
|
---|
146 | function f_mtc_userCheckCallEstablished(EquipmentUser p_ueRef)
|
---|
147 | runs on TestCoordinator return boolean {
|
---|
148 | var boolean v_status := true;
|
---|
149 | // TODO
|
---|
150 | return v_status;
|
---|
151 | }
|
---|
152 |
|
---|
153 |
|
---|
154 | /**
|
---|
155 | * @desc Check that UE by p_ueRef given reports that its peer is ringing
|
---|
156 | * @param p_userCompRef Reference to IMS UE user component
|
---|
157 | * @return true or false
|
---|
158 | */
|
---|
159 | function f_mtc_userCheckPeerIsRinging(EquipmentUser p_ueRef)
|
---|
160 | runs on TestCoordinator return boolean {
|
---|
161 | var boolean v_status := true;
|
---|
162 | // TODO
|
---|
163 | return v_status;
|
---|
164 | }
|
---|
165 | /**
|
---|
166 | * @desc Check that UE by p_ueRef given reports HOLD state
|
---|
167 | * @param p_userCompRef Reference to IMS UE user component
|
---|
168 | * @return true or false
|
---|
169 | */
|
---|
170 | function f_mtc_userCheckUserOnHold(EquipmentUser p_ueRef)
|
---|
171 | runs on TestCoordinator return boolean {
|
---|
172 | var boolean v_status := true;
|
---|
173 | // TODO
|
---|
174 | return v_status;
|
---|
175 | }
|
---|
176 | /**
|
---|
177 | * @desc Check that UE by p_ueRef given reports that call has been resumed
|
---|
178 | * @param p_userCompRef Reference to IMS UE user component
|
---|
179 | * @return true or false
|
---|
180 | */
|
---|
181 | function f_mtc_userCheckCallResumed(EquipmentUser p_ueRef)
|
---|
182 | runs on TestCoordinator return boolean {
|
---|
183 | var boolean v_status := true;
|
---|
184 | // TODO
|
---|
185 | return v_status;
|
---|
186 | }
|
---|
187 | /**
|
---|
188 | * @desc Check that UE by p_ueRef given reports that call has ended
|
---|
189 | * @param p_userCompRef Reference to IMS UE user component
|
---|
190 | * @return true or false
|
---|
191 | */
|
---|
192 | function f_mtc_userCheckCallEnded(EquipmentUser p_ueRef)
|
---|
193 | runs on TestCoordinator return boolean {
|
---|
194 | var boolean v_status := true;
|
---|
195 | // TODO
|
---|
196 | return v_status;
|
---|
197 | }
|
---|
198 | /**
|
---|
199 | * @desc Check that UE by p_ueRef given reports that call is no longer offered
|
---|
200 | * @param p_userCompRef Reference to IMS UE user component
|
---|
201 | * @return true or false
|
---|
202 | */
|
---|
203 | function f_mtc_userCheckCallNoLongerOffered(EquipmentUser p_ueRef)
|
---|
204 | runs on TestCoordinator return boolean {
|
---|
205 | var boolean v_status := true;
|
---|
206 | // TODO
|
---|
207 | return v_status;
|
---|
208 | }
|
---|
209 |
|
---|
210 |
|
---|
211 |
|
---|
212 | /**
|
---|
213 | * @desc Start capturing and monitoring traffic on all configured interfaces
|
---|
214 | * @return true or false
|
---|
215 | */
|
---|
216 | function f_mtc_StartAllTrafficCapture()
|
---|
217 | runs on TestCoordinator return boolean {
|
---|
218 | var boolean v_status := true;
|
---|
219 | // TODO
|
---|
220 | return v_status;
|
---|
221 | }
|
---|
222 |
|
---|
223 |
|
---|
224 |
|
---|
225 | /**
|
---|
226 | * @desc Starts user component behaviour for registration from test coordinator
|
---|
227 | * @param p_userCompRef Reference to IMS UE user component
|
---|
228 | * @param p_publicId public user identity
|
---|
229 | * @param p_privateId private user identity
|
---|
230 | * @param p_pw user password
|
---|
231 | * @return
|
---|
232 | * true in case of successfull execution of the trigger command
|
---|
233 | * otherwise false
|
---|
234 | */
|
---|
235 | function f_mtc_userRegister(EquipmentUser p_userCompRef, charstring p_publicId, charstring p_privateId, charstring p_pw) runs on TestCoordinator return boolean {
|
---|
236 | // TODO server address parameter may needed
|
---|
237 | var boolean v_success := false;
|
---|
238 |
|
---|
239 | p_userCompRef.start(f_userRegistration(p_publicId, p_privateId, p_pw));
|
---|
240 |
|
---|
241 | p_userCompRef.done;
|
---|
242 |
|
---|
243 | if(f_getE2EVerdict() == pass) {
|
---|
244 | v_success := true;
|
---|
245 | }
|
---|
246 |
|
---|
247 | return v_success;
|
---|
248 | }
|
---|
249 |
|
---|
250 | function f_mtc_userCheckRegistrationSuccessful(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
251 | var boolean v_success := false;
|
---|
252 |
|
---|
253 | p_userCompRef.start(f_checkUserIsRegistered());
|
---|
254 |
|
---|
255 | p_userCompRef.done;
|
---|
256 |
|
---|
257 | if(f_getE2EVerdict() == pass) {
|
---|
258 | v_success := true;
|
---|
259 | }
|
---|
260 |
|
---|
261 | return v_success;
|
---|
262 | }
|
---|
263 |
|
---|
264 |
|
---|
265 | /**
|
---|
266 | * @desc Starts user component behaviour for registration from test coordinator
|
---|
267 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
268 | * @param publicId public user identity
|
---|
269 | * @return
|
---|
270 | * true in case of successfull execution of the trigger command
|
---|
271 | * otherwise false
|
---|
272 | */
|
---|
273 | function f_mtc_userDeregister(EquipmentUser p_userCompRef, charstring p_publicId) runs on TestCoordinator return boolean {
|
---|
274 | var boolean v_success := false;
|
---|
275 |
|
---|
276 | p_userCompRef.start(f_userDeregistration(p_publicId));
|
---|
277 |
|
---|
278 | p_userCompRef.done;
|
---|
279 |
|
---|
280 | if( f_getE2EVerdict() == pass) {
|
---|
281 | v_success := true;
|
---|
282 | }
|
---|
283 |
|
---|
284 | return v_success;
|
---|
285 | }
|
---|
286 |
|
---|
287 | /**
|
---|
288 | *
|
---|
289 | * @desc Starts user component behaviour for sending a message from test coordinator
|
---|
290 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
291 | * @param p_content Content of meessage to be sent
|
---|
292 | */
|
---|
293 | function f_mtc_userSendMessage(EquipmentUser p_userCompRef, charstring p_content) runs on TestCoordinator return boolean {
|
---|
294 | var boolean v_success := false;
|
---|
295 |
|
---|
296 | p_userCompRef.start(f_userSendMessage(p_content));
|
---|
297 |
|
---|
298 | p_userCompRef.done;
|
---|
299 |
|
---|
300 | if(f_getE2EVerdict() == pass) {
|
---|
301 | v_success := true;
|
---|
302 | }
|
---|
303 |
|
---|
304 | return v_success;
|
---|
305 | }
|
---|
306 |
|
---|
307 | /**
|
---|
308 | *
|
---|
309 | * @desc Starts user component behaviour for checking message receipt from test coordinator
|
---|
310 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
311 | * @param p_content Content of meessage to be received
|
---|
312 | */
|
---|
313 | function f_mtc_userCheckMessageReceipt(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
314 | var boolean v_success := false;
|
---|
315 |
|
---|
316 | p_userCompRef.start(f_userCheckMessageReceipt());
|
---|
317 |
|
---|
318 | p_userCompRef.done;
|
---|
319 |
|
---|
320 | if(f_getE2EVerdict() == pass) {
|
---|
321 | v_success := true;
|
---|
322 | }
|
---|
323 |
|
---|
324 | return v_success;
|
---|
325 | }
|
---|
326 |
|
---|
327 | /**
|
---|
328 | *
|
---|
329 | * @desc Starts user component behaviour for checking message receipt from test coordinator
|
---|
330 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
331 | * @param p_content Content of meessage to be received
|
---|
332 | */
|
---|
333 | function f_mtc_userCheckMessageNotDelivered(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
334 | var boolean v_success := false;
|
---|
335 |
|
---|
336 | p_userCompRef.start(f_userCheckMessageNotDelivered());
|
---|
337 |
|
---|
338 | p_userCompRef.done;
|
---|
339 |
|
---|
340 | if(f_getE2EVerdict() == pass) {
|
---|
341 | v_success := true;
|
---|
342 | }
|
---|
343 |
|
---|
344 | return v_success;
|
---|
345 | }
|
---|
346 |
|
---|
347 | function f_getAnyValidUser(integer p_productIdx) return ImsUserInfo {
|
---|
348 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
349 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
350 | var ImsUserIdentity v_userid;
|
---|
351 |
|
---|
352 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
353 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
354 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
355 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
356 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].genUserId )) {
|
---|
357 | return PX_IMS_USER_DATA[i].userIds[j].genUserId;
|
---|
358 | } // end if
|
---|
359 | } // end for j
|
---|
360 | log("f_getAnyValidUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
361 | return c_dummyInfo;
|
---|
362 | } // end if
|
---|
363 | } // end for i
|
---|
364 | log("f_getAnyValidUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
365 | return c_dummyInfo;
|
---|
366 | }
|
---|
367 |
|
---|
368 | function f_getTelUserId(integer p_productIdx) return ImsUserInfo {
|
---|
369 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
370 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
371 | var ImsUserIdentity v_userid;
|
---|
372 |
|
---|
373 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
374 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
375 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
376 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
377 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].telUserId )) {
|
---|
378 | return PX_IMS_USER_DATA[i].userIds[j].telUserId;
|
---|
379 | } // end if
|
---|
380 | } // end for j
|
---|
381 | log("f_getTelUserId: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
382 | return c_dummyInfo;
|
---|
383 | } // end if
|
---|
384 | } // end for i
|
---|
385 | log("f_getTelUserId: Did not find specified product in PX_IMS_USER_DATA");
|
---|
386 | return c_dummyInfo;
|
---|
387 | }
|
---|
388 |
|
---|
389 | function f_getSipUserId(integer p_productIdx) return ImsUserInfo {
|
---|
390 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
391 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
392 | var ImsUserIdentity v_userid;
|
---|
393 |
|
---|
394 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
395 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
396 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
397 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
398 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].sipUserId )) {
|
---|
399 | return PX_IMS_USER_DATA[i].userIds[j].sipUserId;
|
---|
400 | } // end if
|
---|
401 | } // end for j
|
---|
402 | log("f_getSipUserId: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
403 | return c_dummyInfo;
|
---|
404 | } // end if
|
---|
405 | } // end for i
|
---|
406 | log("f_getSipUserId: Did not find specified product in PX_IMS_USER_DATA");
|
---|
407 | return c_dummyInfo;
|
---|
408 | }
|
---|
409 |
|
---|
410 |
|
---|
411 |
|
---|
412 | function f_getHoldUser(integer p_productIdx) return ImsUserInfo {
|
---|
413 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
414 | // TODO
|
---|
415 | return c_dummyInfo;
|
---|
416 | }
|
---|
417 |
|
---|
418 | function f_getHostname(integer p_productIdx, charstring p_entity, out charstring p_hostname)
|
---|
419 | return boolean {
|
---|
420 | // TODO
|
---|
421 | return true;
|
---|
422 | }
|
---|
423 |
|
---|
424 | // TODO
|
---|
425 | function f_getUEHostname(integer p_ID, out charstring p_hostname)
|
---|
426 | return boolean {
|
---|
427 |
|
---|
428 | // TODO
|
---|
429 |
|
---|
430 | return true;
|
---|
431 | }
|
---|
432 |
|
---|
433 | /**
|
---|
434 | * @desc
|
---|
435 | * Preamble to handle user registration in home network from test coordinator
|
---|
436 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
437 | * @return true in case of successfull execution otherwise false
|
---|
438 | */
|
---|
439 | function f_PR_user_home_registration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
440 | runs on TestCoordinator return boolean {
|
---|
441 | var boolean v_status := true;
|
---|
442 | if( p_userInfo.publicId == "" ) { return false; }
|
---|
443 |
|
---|
444 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
445 |
|
---|
446 | return v_status;
|
---|
447 | }
|
---|
448 |
|
---|
449 | /**
|
---|
450 | * @desc
|
---|
451 | * Postamble to handle user deregistration in home network from test coordinator
|
---|
452 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
453 | * @return true in case of successfull execution otherwise false
|
---|
454 | */
|
---|
455 | function f_PO_user_home_deregistration(EquipmentUser p_userCompRef) runs on ImsTestCoordinator return boolean {
|
---|
456 | var boolean v_status := true;
|
---|
457 |
|
---|
458 | v_status := f_mtc_userDeregister(p_userCompRef, "*"); // deregister all previous users
|
---|
459 |
|
---|
460 | return v_status;
|
---|
461 | }
|
---|
462 |
|
---|
463 | /**
|
---|
464 | * @desc
|
---|
465 | * Preamble to handle user registration in roaming network from test coordinator
|
---|
466 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
467 | * @return true in case of successfull execution otherwise false
|
---|
468 | */
|
---|
469 | function f_PR_user_roaming_registration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
470 | runs on TestCoordinator return boolean {
|
---|
471 | var boolean v_status := true;
|
---|
472 | if( p_userInfo.publicId == "" ) { return false; }
|
---|
473 |
|
---|
474 | // TODO check roaming registration
|
---|
475 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
476 |
|
---|
477 | return v_status;
|
---|
478 | }
|
---|
479 |
|
---|
480 | /**
|
---|
481 | * @desc
|
---|
482 | * Postamble to handle user deregistration in roaming network from test coordinator
|
---|
483 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
484 | * @return true in case of successfull execution otherwise false
|
---|
485 | */
|
---|
486 | function f_PO_user_roaming_deregistration(EquipmentUser p_userCompRef) runs on ImsTestCoordinator return boolean {
|
---|
487 | var boolean v_status := true;
|
---|
488 |
|
---|
489 | // TODO check roaming de-registration
|
---|
490 | v_status := f_mtc_userDeregister(p_userCompRef, "*"); // deregister all previous users
|
---|
491 |
|
---|
492 | return v_status;
|
---|
493 | }
|
---|
494 |
|
---|
495 | /**
|
---|
496 | * @desc Get the S-CSCF FQDN address of referenced EUT
|
---|
497 | * @return if a S-CSCF is avaiable, the domainname of the S-CSCF,
|
---|
498 | * otherwise error_string
|
---|
499 | */
|
---|
500 | function f_GetEUTScscfAddress(integer p_ProductIdx) return charstring {
|
---|
501 | // TODO function not tested
|
---|
502 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
503 | var integer v_size_ipinterfaceinfo;
|
---|
504 | var integer v_interface := -1;
|
---|
505 | var integer v_ipinterfaceinfo := -1;
|
---|
506 | var charstring v_domainname;
|
---|
507 |
|
---|
508 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
509 | if (PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName == "Mw"){
|
---|
510 | v_interface := i;
|
---|
511 | }
|
---|
512 | }
|
---|
513 | if (v_interface > -1) {
|
---|
514 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
515 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
516 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
517 | if (match(substr(v_domainname, 0, 5), pattern "[Ss][Cc][Ss][Cc][Ff]")) {
|
---|
518 | v_ipinterfaceinfo := i;
|
---|
519 | }
|
---|
520 | }
|
---|
521 | } else {
|
---|
522 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
523 | }
|
---|
524 | if (v_ipinterfaceinfo > -1) {
|
---|
525 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
526 | } else {
|
---|
527 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
528 | }
|
---|
529 | }
|
---|
530 |
|
---|
531 | /**
|
---|
532 | * @desc Get the P-CSCF FQDN address of referenced EUT
|
---|
533 | * @return if a PCSCF is avaiable, the domainname of the PCSCF,
|
---|
534 | * otherwise error_string
|
---|
535 | */
|
---|
536 | function f_GetEUTPcscfAddress(integer p_ProductIdx) return charstring {
|
---|
537 | // TODO function not tested
|
---|
538 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
539 | var integer v_size_ipinterfaceinfo;
|
---|
540 | var integer v_interface := -1;
|
---|
541 | var integer v_ipinterfaceinfo := -1;
|
---|
542 | var charstring v_domainname;
|
---|
543 |
|
---|
544 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
545 | if (PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName == "Gm"){
|
---|
546 | v_interface := i;
|
---|
547 | }
|
---|
548 | }
|
---|
549 | if (v_interface > -1) {
|
---|
550 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
551 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
552 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
553 | if (match(substr(v_domainname, 0, 5), pattern "[Pp][Cc][Ss][Cc][Ff]")) {
|
---|
554 | v_ipinterfaceinfo := i;
|
---|
555 | }
|
---|
556 | }
|
---|
557 | } else {
|
---|
558 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
559 | }
|
---|
560 | if (v_ipinterfaceinfo > -1) {
|
---|
561 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
562 | } else {
|
---|
563 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
564 | }
|
---|
565 | }
|
---|
566 |
|
---|
567 | /**
|
---|
568 | * @desc Get the Public Id of referenced UE
|
---|
569 | * @param p_ProductIdx index of the product the UE belongs to
|
---|
570 | * @return PublicID of the UE of the productIdx
|
---|
571 | */
|
---|
572 | function f_GetUEPublicId(integer p_ProductIdx) return charstring {
|
---|
573 |
|
---|
574 | var ImsUserInfo v_uePublicId := f_getSipUserId(p_ProductIdx);
|
---|
575 |
|
---|
576 | return v_uePublicId.publicId;
|
---|
577 | }
|
---|
578 |
|
---|
579 | /**
|
---|
580 | * @desc Get the Public Id of referenced EUT
|
---|
581 | */
|
---|
582 | function f_GetEUTPublicId(integer p_ProductIdx) return charstring {
|
---|
583 | // TODO
|
---|
584 | return "TODO";
|
---|
585 | }
|
---|
586 |
|
---|
587 | /**
|
---|
588 | * @desc Get the AS server FQDN of referenced EUT
|
---|
589 | */
|
---|
590 | function f_GetEUTASServerAddress(integer p_ProductIdx) return charstring {
|
---|
591 | // TODO
|
---|
592 | return "TODO";
|
---|
593 | }
|
---|
594 |
|
---|
595 | }
|
---|
596 |
|
---|
597 |
|
---|
598 | group interComponent {
|
---|
599 | /**
|
---|
600 | * @desc
|
---|
601 | * This function waits for a sip message send from a given monitor
|
---|
602 | * component to mtc.
|
---|
603 | * @param p_monitor Reference of Interface Monitor component
|
---|
604 | * @param p_msg The Sip message
|
---|
605 | */
|
---|
606 | function f_getSipMsgFromMonitor(InterfaceMonitor p_monitor, out SipMessage p_msg) runs on ImsTestCoordinator {
|
---|
607 | timer t_local := PX_MAX_MSG_WAIT;
|
---|
608 | t_local.start;
|
---|
609 | alt {
|
---|
610 | []icpPort.receive (SipMessage:?) from p_monitor -> value p_msg {
|
---|
611 | t_local.stop;
|
---|
612 | setverdict(pass, self, "***f_getMsgFromMonitor: SIP message received***");
|
---|
613 | }
|
---|
614 | []t_local.timeout {
|
---|
615 | setverdict(fail, self, "***f_getMsgFromMonitor: SIP message not received***");
|
---|
616 | }
|
---|
617 | }
|
---|
618 | }
|
---|
619 | }
|
---|
620 |
|
---|
621 | } |
---|