Newer
Older
* @author STF 574
* @version $Id: LibIot_VxLTE_Functions.ttcn 1 2020-05-29 15:06:42Z pintar $
* @desc This module provides Functions parameters which need to be
* changeable within validation
module LibIot_VxLTE_Functions {
import from LibIot_TypesAndValues all;
import from AtsImsIot_Templates all;
import from LibIot_VxLTE_PIXITS all;
import from LibIot_VxLTE_Templates all;
import from AtsImsIot_TestConfiguration all;
import from AtsImsIot_TestSystem all;
type record of charstring InterfaceNamesList;
group ConfigurationFunctions{
/**
* @desc Check and create a list of monitor interfaces based on PIXITS
* @param
* @return the created monitor component list in vc_MonIntfList
*/
function f_setVxLteMonIterfacesAvailability(/*inout VxLTEMonitorInterfaceList p_vxlteMonIntfList*/)runs on ImsTestCoordinator{
if (PX_SIP_GMA_MONITORENABLED == true){
//p_vxlteMonIntfList.gmA := valueof(m_MonIntf_Sip_Gm_A);
vc_MonIntfList.gmA := valueof(m_MonIntf_Sip_Gm_A);
}
if (PX_SIP_GMB_MONITORENABLED == true){
vc_MonIntfList.gmB := valueof(m_MonIntf_Sip_Gm_B);
}
if (PX_SIP_MM_B_PSAP_MONITORENABLED == true){
vc_MonIntfList.mmB_PSAP := valueof(m_MonIntf_Sip_MmB_PSAP);
}
if (PX_SIP_MW_EB_MONITORENABLED == true){
vc_MonIntfList.mwEB := valueof(m_MonIntf_Sip_Mw_EB);
}
if (PX_SIP_ML_E_LRF_MONITORENABLED == true){
vc_MonIntfList.mlE_LRF := valueof(m_MonIntf_Sip_Ml_E_LRF);
}
if (PX_SIP_MW_S_PSAP_MONITORENABLED == true){
vc_MonIntfList.mwS_PSAP := valueof(m_MonIntf_Sip_MwS_PSAP);
}
if (PX_SIP_IC_MONITORENABLED == true){
vc_MonIntfList.ic := valueof(m_MonIntf_Sip_Ic);
}
if (PX_SIP_MW_PI_MONITORENABLED == true){
vc_MonIntfList.mwPI := valueof(m_MonIntf_Sip_Mw_PI);
}
if (PX_SIP_MW_PS_MONITORENABLED == true){
vc_MonIntfList.mwPS := valueof(m_MonIntf_Sip_Mw_PS);
}
if (PX_SIP_MW_PE_MONITORENABLED == true){
vc_MonIntfList.mwPE := valueof(m_MonIntf_Sip_Mw_PE);
}
if (PX_SIP_MW_IS_MONITORENABLED == true){
vc_MonIntfList.mwIS := valueof(m_MonIntf_Sip_Mw_IS);
}
if (PX_SIP_MW_PB_MONITORENABLED == true){
vc_MonIntfList.mwPB := valueof(m_MonIntf_Sip_Mw_PB);
}
if (PX_SIP_MW_IB_MONITORENABLED == true){
vc_MonIntfList.mwIB := valueof(m_MonIntf_Sip_Mw_IB);
}
if (PX_SIP_MW_IE_MONITORENABLED == true){
vc_MonIntfList.mwIE := valueof(m_MonIntf_Sip_Mw_IE);
}
if (PX_SIP_ISC_MONITORENABLED == true){
vc_MonIntfList.isc := valueof(m_MonIntf_Sip_ISC);
}
if (PX_DIAMETER_CX_IH_MONITORENABLED == true){
vc_MonIntfList.cxIH := valueof(m_MonIntf_Diameter_Cx_IH);
}
if (PX_DIAMETER_CX_SH_MONITORENABLED == true){
vc_MonIntfList.cxSH := valueof(m_MonIntf_Diameter_Cx_SH);
}
if (PX_DIAMETER_GX_MONITORENABLED == true){
vc_MonIntfList.gx := valueof(m_MonIntf_Diameter_Gx);
}
if (PX_DIAMETER_RX_MONITORENABLED == true){
vc_MonIntfList.rx := valueof(m_MonIntf_Diameter_Rx);
}
if (PX_DIAMETER_S6A_MONITORENABLED == true){
vc_MonIntfList.s6a := valueof(m_MonIntf_Diameter_S6a);
}
if (PX_DIAMETER_S9_MONITORENABLED == true){
vc_MonIntfList.s9 := valueof(m_MonIntf_Diameter_S9);
}
if (PX_DIAMETER_SH_MONITORENABLED == true){
vc_MonIntfList.sh := valueof(m_MonIntf_Diameter_Sh);
* @desc Create monitor components based on vc_MonIntfList
* @param
* @return the created monitor components in vc_vxlte_monitor_components
*/
function f_cf_createVxLteMonitor() runs on ImsTestCoordinator{
if (isvalue(vc_MonIntfList.gmA)){
vc_vxlte_monitor_components.gmA := f_cf_create_monitor_sip ( vc_MonIntfList.gmA);
}
if (isvalue(vc_MonIntfList.gmB)){
vc_vxlte_monitor_components.gmB := f_cf_create_monitor_sip ( vc_MonIntfList.gmB);
}
if (isvalue(vc_MonIntfList.mmB_PSAP)){
vc_vxlte_monitor_components.mmB_PSAP := f_cf_create_monitor_sip ( vc_MonIntfList.mmB_PSAP);
}
if (isvalue(vc_MonIntfList.mwEB)){
vc_vxlte_monitor_components.mwEB := f_cf_create_monitor_sip ( vc_MonIntfList.mwEB);
}
if (isvalue(vc_MonIntfList.mlE_LRF)){
vc_vxlte_monitor_components.mlE_LRF := f_cf_create_monitor_sip ( vc_MonIntfList.mlE_LRF);
}
if (isvalue(vc_MonIntfList.mwS_PSAP)){
vc_vxlte_monitor_components.mwS_PSAP := f_cf_create_monitor_sip ( vc_MonIntfList.mwS_PSAP);
}
if (isvalue(vc_MonIntfList.ic)){
vc_vxlte_monitor_components.ic := f_cf_create_monitor_sip ( vc_MonIntfList.ic);
}
if (isvalue(vc_MonIntfList.mwPI)){
vc_vxlte_monitor_components.mwPI := f_cf_create_monitor_sip ( vc_MonIntfList.mwPI);
}
if (isvalue(vc_MonIntfList.mwPS)){
vc_vxlte_monitor_components.mwPS := f_cf_create_monitor_sip ( vc_MonIntfList.mwPS);
}
if (isvalue(vc_MonIntfList.mwPE)){
vc_vxlte_monitor_components.mwPE := f_cf_create_monitor_sip ( vc_MonIntfList.mwPE);
}
if (isvalue(vc_MonIntfList.mwIS)){
vc_vxlte_monitor_components.mwIS := f_cf_create_monitor_sip ( vc_MonIntfList.mwIS);
}
if (isvalue(vc_MonIntfList.mwPB)){
vc_vxlte_monitor_components.mwPB := f_cf_create_monitor_sip ( vc_MonIntfList.mwPB);
}
if (isvalue(vc_MonIntfList.mwIB)){
vc_vxlte_monitor_components.mwIB := f_cf_create_monitor_sip ( vc_MonIntfList.mwIB);
}
if (isvalue(vc_MonIntfList.mwIE)){
vc_vxlte_monitor_components.mwIE := f_cf_create_monitor_sip ( vc_MonIntfList.mwIE);
}
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
if (isvalue(vc_MonIntfList.isc)){
vc_vxlte_monitor_components.isc := f_cf_create_monitor_sip ( vc_MonIntfList.isc);
}
if (isvalue(vc_MonIntfList.cxIH)){
vc_vxlte_monitor_components.cxIH := f_cf_create_monitor_diameter ( vc_MonIntfList.cxIH);
}
if (isvalue(vc_MonIntfList.cxSH)){
vc_vxlte_monitor_components.cxSH := f_cf_create_monitor_diameter ( vc_MonIntfList.cxSH);
}
if (isvalue(vc_MonIntfList.gx)){
vc_vxlte_monitor_components.gx := f_cf_create_monitor_diameter ( vc_MonIntfList.gx);
}
if (isvalue(vc_MonIntfList.rx)){
vc_vxlte_monitor_components.rx := f_cf_create_monitor_diameter ( vc_MonIntfList.rx);
}
if (isvalue(vc_MonIntfList.s6a)){
vc_vxlte_monitor_components.s6a := f_cf_create_monitor_diameter ( vc_MonIntfList.s6a);
}
if (isvalue(vc_MonIntfList.s9)){
vc_vxlte_monitor_components.s9 := f_cf_create_monitor_diameter ( vc_MonIntfList.s9);
}
if (isvalue(vc_MonIntfList.sh)){
vc_vxlte_monitor_components.sh := f_cf_create_monitor_diameter ( vc_MonIntfList.sh);
}
}
/**
* @desc Start monitor components based on vc_MonIntfList
* @param
* @return Created monitor components in vc_vxlte_monitor_components are connected/mapped
*/
function f_cf_VxLteMonitor_Up() runs on ImsTestCoordinator{
//Initialize the Adapter (including the TrafficCapture process).
timer tc_noAct;
f_cf_initCapture();
if (isvalue(vc_MonIntfList.gmA)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.gmA);
vc_vxlte_monitor_components.gmA.start(f_cf_setFilter(
e_sip,
{vc_MonIntfList.gmA.interfaceInfo}
}
if (isvalue(vc_MonIntfList.gmB)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.gmB);
vc_vxlte_monitor_components.gmB.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.gmB.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mmB_PSAP)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mmB_PSAP);
vc_vxlte_monitor_components.mmB_PSAP.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mmB_PSAP.interfaceInfo}
if (isvalue(vc_MonIntfList.mwEB)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwEB);
vc_vxlte_monitor_components.mwEB.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwEB.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mlE_LRF)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mlE_LRF);
vc_vxlte_monitor_components.mlE_LRF.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mlE_LRF.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwS_PSAP)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwS_PSAP);
vc_vxlte_monitor_components.mwS_PSAP.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwS_PSAP.interfaceInfo}
)
)));
}
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
if (isvalue(vc_MonIntfList.ic)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.ic);
vc_vxlte_monitor_components.ic.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.ic.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwPI)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwPI);
vc_vxlte_monitor_components.mwPI.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwPI.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwPS)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwPS);
vc_vxlte_monitor_components.mwPS.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwPS.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwPE)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwPE);
vc_vxlte_monitor_components.mwPS.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwPE.interfaceInfo}
)
)));
}
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
if (isvalue(vc_MonIntfList.mwIS)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwIS);
vc_vxlte_monitor_components.mwIS.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwIS.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwPB)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwPB);
vc_vxlte_monitor_components.mwPB.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwPB.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwIB)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwIB);
vc_vxlte_monitor_components.mwIB.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwIB.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.mwIE)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwIE);
vc_vxlte_monitor_components.mwPS.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwIE.interfaceInfo}
)
)));
}
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
if (isvalue(vc_MonIntfList.isc)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.isc);
vc_vxlte_monitor_components.isc.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.isc.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.cxIH)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.cxIH);
vc_vxlte_monitor_components.cxIH.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.cxIH.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.cxSH)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.cxSH);
vc_vxlte_monitor_components.cxSH.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.cxSH.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.gx)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.gx);
vc_vxlte_monitor_components.gx.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.gx.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.rx)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.rx);
vc_vxlte_monitor_components.rx.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.rx.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.s6a)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.s6a);
vc_vxlte_monitor_components.s6a.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.s6a.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.s9)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.s9);
vc_vxlte_monitor_components.s9.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.s9.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.sh)){
f_cf_monitor_up_diameter(vc_vxlte_monitor_components.sh);
vc_vxlte_monitor_components.sh.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_diameter,
{vc_MonIntfList.sh.interfaceInfo}
)
)));
}
tc_noAct.start(3.0);
alt {
[] tc_noAct.timeout {
}
}
f_cf_startCapture();
}
/**
* @desc Stops monitor components based on vc_MonIntfList
* @param
* @return Created monitor components in vc_vxlte_monitor_components are disconnected/unmapped
*/
function f_cf_VxLteMonitor_Down() runs on ImsTestCoordinator{
//Stop traffic capture processing.
f_cf_stopCapture();
if (isvalue(vc_MonIntfList.gmA)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.gmA);
}
if (isvalue(vc_MonIntfList.gmB)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.gmB);
}
if (isvalue(vc_MonIntfList.mmB_PSAP)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mmB_PSAP);
if (isvalue(vc_MonIntfList.mwEB)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwEB);
}
if (isvalue(vc_MonIntfList.mlE_LRF)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mlE_LRF);
}
if (isvalue(vc_MonIntfList.mwS_PSAP)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwS_PSAP);
}
if (isvalue(vc_MonIntfList.ic)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.ic);
}
if (isvalue(vc_MonIntfList.mwPI)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwPI);
}
if (isvalue(vc_MonIntfList.mwPS)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwPS);
}
if (isvalue(vc_MonIntfList.mwPE)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwPE);
}
if (isvalue(vc_MonIntfList.mwIS)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwIS);
}
if (isvalue(vc_MonIntfList.mwPB)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwPB);
}
if (isvalue(vc_MonIntfList.mwIB)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwIB);
}
if (isvalue(vc_MonIntfList.mwIE)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwIE);
}
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
if (isvalue(vc_MonIntfList.isc)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.isc);
}
if (isvalue(vc_MonIntfList.cxIH)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.cxIH);
}
if (isvalue(vc_MonIntfList.cxSH)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.cxSH);
}
if (isvalue(vc_MonIntfList.gx)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.gx);
}
if (isvalue(vc_MonIntfList.rx)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.rx);
}
if (isvalue(vc_MonIntfList.s6a)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.s6a);
}
if (isvalue(vc_MonIntfList.s9)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.s9);
}
if (isvalue(vc_MonIntfList.sh)){
f_cf_monitor_down_diameter(vc_vxlte_monitor_components.sh);
}
}
}//end group ConfigurationFunctions
group CheckFunctions{
/**
* @desc Check monitor components based on interfaces names
* @param
* @return true - Monitorinteface available/active
* false - Monitorinteface not exists or not available/active
*/
function f_checkVxLteRequiredMonitorInterface(InterfaceNamesList p_interfaces) runs on ImsTestCoordinator return boolean{
var integer v_len:=lengthof(p_interfaces);
var integer i:=0;
var boolean v_check := false;
if (v_len>0){
for(i:=0;i<v_len;i:=i+1){
v_check := v_check or f_SipMonitorInterface_available(p_interfaces[i]) or f_DiameterMonitorInterface_available(p_interfaces[i]);
}
}
else{//condition of required list of interfaces not meet
return v_check;
}
return v_check;
}
/**
* @desc Check monitor component based on interface name
* @param
* @return true - Monitorinteface available/active
* false - Monitorinteface not exists or not available/active
*/
function f_SipMonitorInterface_available(charstring p_interfaceName) runs on ImsTestCoordinator return boolean{
// if (vc_vxlte_monitor_components.gmA.vc_interfacename) {return true;}
if ((isvalue(vc_MonIntfList.gmA)) and (vc_MonIntfList.gmA.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.gmB)) and (vc_MonIntfList.gmB.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mmB_PSAP)) and (vc_MonIntfList.mmB_PSAP.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwEB)) and (vc_MonIntfList.mwEB.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mlE_LRF)) and (vc_MonIntfList.mlE_LRF.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwS_PSAP)) and (vc_MonIntfList.mwS_PSAP.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.ic)) and (vc_MonIntfList.ic.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwPI)) and (vc_MonIntfList.mwPI.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwPS)) and (vc_MonIntfList.mwPS.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwPE)) and (vc_MonIntfList.mwPE.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwIS)) and (vc_MonIntfList.mwIS.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwPB)) and (vc_MonIntfList.mwPB.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwIB)) and (vc_MonIntfList.mwIB.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwIE)) and (vc_MonIntfList.mwIE.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.isc)) and (vc_MonIntfList.isc.interfaceName==p_interfaceName)){ return true;}
return false;
}
/**
* @desc Check monitor component based on interface name
* @param
* @return true - Monitorinteface available/active
* false - Monitorinteface not exists or not available/active
*/
function f_DiameterMonitorInterface_available(charstring p_interfaceName) runs on ImsTestCoordinator return boolean{
if ((isvalue(vc_MonIntfList.cxIH)) and (vc_MonIntfList.cxIH.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.cxSH)) and (vc_MonIntfList.cxSH.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.gx)) and (vc_MonIntfList.gx.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.rx)) and (vc_MonIntfList.rx.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.s6a)) and (vc_MonIntfList.s6a.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.s9)) and (vc_MonIntfList.s9.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.sh)) and (vc_MonIntfList.sh.interfaceName==p_interfaceName)){ return true;}
return false;
}
}
group temporary_functions{
function f_check_and_setup_monitor_interfaces() runs on ImsTestCoordinator{
var InterfaceAvailableList v_VxLTE_MonIntf_Available;
var InterfaceAvailable v_InterfaceAvailable;
var SipInterfaceMonitor v_gmA, v_gmB, v_mmBPSAP, v_mwEB, v_mlE_LRF, v_mwSPSAP, v_ic, v_mwPI, v_mwPS, v_mwPE, v_mwSI, v_mwPB, v_mwIB, v_mwIE, v_isc;
var DiameterInterfaceMonitor v_cxIH, v_cxSH, v_gx, v_rx, v_s6a, v_s9, v_sh;
if (PX_SIP_GMA_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_GMA_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_GMA_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_gmA := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Gm_A)/*PX_SIP_GMA_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_gmA);
}
if (PX_SIP_GMB_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_GMB_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_GMB_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_gmB := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Gm_B)/*PX_SIP_GMB_INTERFACENAME*/);
if (PX_SIP_MM_B_PSAP_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MM_B_PSAP_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MM_B_PSAP_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mmBPSAP := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_MmB_PSAP)/*PX_SIP_MW_PSAP_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mmBPSAP);
if (PX_SIP_MW_EB_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_EB_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_EB_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwEB := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_EB)/*PX_SIP_MW_PI_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwEB);
}
if (PX_SIP_ML_E_LRF_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_ML_E_LRF_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_ML_E_LRF_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mlE_LRF := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Ml_E_LRF)/*PX_SIP_MW_PI_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mlE_LRF);
}
if (PX_SIP_MW_S_PSAP_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_S_PSAP_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_S_PSAP_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwSPSAP := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_MwS_PSAP)/*PX_SIP_MW_PSAP_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwSPSAP);
}
if (PX_SIP_IC_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_IC_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_IC_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_ic := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Ic)/*PX_SIP_IC_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_ic);
}
if (PX_SIP_MW_PI_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_PI_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_PI_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwPI := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_PI)/*PX_SIP_MW_PI_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwPI);
}
if (PX_SIP_MW_PS_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_PS_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_PS_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwPS := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_PS)/*PX_SIP_MW_PS_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwPS);
}
if (PX_SIP_MW_PE_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_PE_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_PE_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwPE := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_PE)/*PX_SIP_MW_PE_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwPE);
}
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
if (PX_SIP_MW_IS_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_IS_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_IS_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwSI := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_IS)/*PX_SIP_MW_IS_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwSI);
}
if (PX_SIP_MW_PB_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_PB_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_PB_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwPB := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_PB)/*PX_SIP_MW_PB_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwPB);
}
if (PX_SIP_MW_IB_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_IB_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_IB_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwIB := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_IB)/*PX_SIP_MW_IB_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwIB);
}
if (PX_SIP_ISC_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_ISC_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_ISC_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_isc := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_ISC)/*PX_SIP_ISC_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_isc);
}
if (PX_SIP_MW_IE_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_IE_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_IE_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwIE := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_IE)/*PX_SIP_MW_IE_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwIE);
}
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
if (PX_DIAMETER_CX_IH_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_CX_IH_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_CX_IH_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_cxIH := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_Cx_IH)/*PX_DIAMETER_CX_IH_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_cxIH);
}
if (PX_DIAMETER_CX_SH_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_CX_SH_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_CX_SH_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_cxSH := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_Cx_SH)/*PX_DIAMETER_CX_SH_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_cxSH);
}
if (PX_DIAMETER_GX_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_GX_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_GX_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_gx := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_Gx)/*PX_DIAMETER_GX_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_gx);
}
if (PX_DIAMETER_RX_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_RX_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_RX_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_rx := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_Rx)/*PX_DIAMETER_RX_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_rx);
}
if (PX_DIAMETER_S6A_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_S6A_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_S6A_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_s6a := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_S6a)/*PX_DIAMETER_S6A_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_s6a);
}
if (PX_DIAMETER_S9_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_S9_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_S9_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_s9 := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_S9)/*PX_DIAMETER_S9_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_s9);
}
if (PX_DIAMETER_SH_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_SH_INTERFACENAME;
v_InterfaceAvailable.available := PX_DIAMETER_SH_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_sh := f_cf_create_monitor_diameter ( valueof(m_MonIntf_Diameter_Sh)/*PX_DIAMETER_SH_INTERFACENAME*/ );
f_cf_monitor_up_diameter(v_sh);
}
function f_update_MonitorInterfaceList(
in InterfaceAvailableList p_MI_List,
in InterfaceAvailable p_MI
)
return InterfaceAvailableList {
var InterfaceAvailable v_IntfAvail;
var InterfaceAvailableList v_MI_List := p_MI_List;
var integer v_size_mi_list := lengthof(v_MI_List);
var integer v_size_mi_updated := v_size_mi_list + 1;
var InterfaceAvailableList v_MI_List_updated;
var integer i;
for (i := 0; i < v_size_mi_updated; i := i + 1) {
v_MI_List_updated[i] := v_MI_List[i];
}
v_MI_List_updated[v_size_mi_updated] := p_MI;
return (v_MI_List_updated);
}
}
}