Skip to content
Snippets Groups Projects
Commit eef9304b authored by Iztok Juvancic's avatar Iztok Juvancic
Browse files

added emergency config parameters/intefcaes

parent 4e03bb33
No related branches found
No related tags found
1 merge request!6Update master branch for closing TTF T010
/*
* @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
* @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
{
type IOTExecMode, IotVerdictType, CaptureMode, RecordMode, FileList, TimeOffset, EutInterfaceInfoList,
ProtocolFilter, IpAddress, PortNumber, ProductList, InterfaceAvailable, InterfaceAvailableList,MonitorInterfaceInfo,
VxLTEMonitorInterfaceList;
}
import from AtsImsIot_Templates {
template /*m_generalConfigurationReq_offline, m_generalConfigurationReq_online, m_generalConfigurationReq_merge,
m_generalConfigurationRsp_success, m_generalConfigurationRsp_error, m_generalConfigurationRsp_timeout,*/
m_SetFilterReq/*, mw_SetFilterRsp, m_startTrafficCaptureReq, m_stopTrafficCaptureReq,
m_startTrafficCaptureRsp_any, m_stopTrafficCaptureRsp_any*/;
import from LibIot_TypesAndValues {
type
IOTExecMode,
IotVerdictType,
CaptureMode,
RecordMode,
FileList,
TimeOffset,
EutInterfaceInfoList,
ProtocolFilter,
IpAddress,
PortNumber,
ProductList,
InterfaceAvailable,
InterfaceAvailableList,
MonitorInterfaceInfo,
VxLTEMonitorInterfaceList;
}
import from AtsImsIot_Templates {
template /*m_generalConfigurationReq_offline, m_generalConfigurationReq_online, m_generalConfigurationReq_merge,
m_generalConfigurationRsp_success, m_generalConfigurationRsp_error, m_generalConfigurationRsp_timeout,*/
m_SetFilterReq /*, mw_SetFilterRsp, m_startTrafficCaptureReq, m_stopTrafficCaptureReq,
m_startTrafficCaptureRsp_any, m_stopTrafficCaptureRsp_any*/;
}
import from LibIot_VxLTE_PIXITS all;
import from LibIot_VxLTE_Templates all;
......@@ -28,9 +40,9 @@ module LibIot_VxLTE_Functions {
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
* @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{
......@@ -42,6 +54,9 @@ module LibIot_VxLTE_Functions {
if (PX_SIP_GMB_MONITORENABLED == true){
vc_MonIntfList.gmB := valueof(m_MonIntf_Sip_Gm_B);
}
if (PX_SIP_MW_PSAP_MONITORENABLED == true){
vc_MonIntfList.mwPSAP := valueof(m_MonIntf_Sip_Mw_PSAP);
}
if (PX_SIP_IC_MONITORENABLED == true){
vc_MonIntfList.ic := valueof(m_MonIntf_Sip_Ic);
}
......@@ -51,6 +66,9 @@ module LibIot_VxLTE_Functions {
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);
}
......@@ -60,12 +78,14 @@ module LibIot_VxLTE_Functions {
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);
}
......@@ -86,14 +106,14 @@ module LibIot_VxLTE_Functions {
}
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
* @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{
......@@ -104,6 +124,9 @@ module LibIot_VxLTE_Functions {
vc_vxlte_monitor_components.gmB := f_cf_create_monitor_sip ( vc_MonIntfList.gmB);
}
if (isvalue(vc_MonIntfList.mwPSAP)){
vc_vxlte_monitor_components.mwPSAP := f_cf_create_monitor_sip ( vc_MonIntfList.mwPSAP);
}
if (isvalue(vc_MonIntfList.ic)){
vc_vxlte_monitor_components.ic := f_cf_create_monitor_sip ( vc_MonIntfList.ic);
}
......@@ -114,6 +137,9 @@ module LibIot_VxLTE_Functions {
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);
}
......@@ -123,6 +149,9 @@ module LibIot_VxLTE_Functions {
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);
}
if (isvalue(vc_MonIntfList.isc)){
vc_vxlte_monitor_components.isc := f_cf_create_monitor_sip ( vc_MonIntfList.isc);
......@@ -154,23 +183,23 @@ module LibIot_VxLTE_Functions {
}
/**
* @desc Start monitor components based on vc_MonIntfList
* @param
* @return Created monitor components in vc_vxlte_monitor_components are connected/mapped
* @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).
//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(
valueof (m_SetFilterReq(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.gmA.interfaceInfo}
)
)));
)
)));
}
if (isvalue(vc_MonIntfList.gmB)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.gmB);
......@@ -182,6 +211,16 @@ module LibIot_VxLTE_Functions {
)));
}
if (isvalue(vc_MonIntfList.mwPSAP)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwPSAP);
vc_vxlte_monitor_components.mwPI.start(f_cf_setFilter(
valueof (m_SetFilterReq(
e_sip,
{vc_MonIntfList.mwPSAP.interfaceInfo}
)
)));
}
if (isvalue(vc_MonIntfList.ic)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.ic);
vc_vxlte_monitor_components.ic.start(f_cf_setFilter(
......@@ -210,6 +249,15 @@ module LibIot_VxLTE_Functions {
)
)));
}
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}
)
)));
}
if (isvalue(vc_MonIntfList.mwIS)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.mwIS);
vc_vxlte_monitor_components.mwIS.start(f_cf_setFilter(
......@@ -237,6 +285,15 @@ module LibIot_VxLTE_Functions {
)
)));
}
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}
)
)));
}
if (isvalue(vc_MonIntfList.isc)){
f_cf_monitor_up_sip(vc_vxlte_monitor_components.isc);
......@@ -323,9 +380,9 @@ module LibIot_VxLTE_Functions {
}
/**
* @desc Stops monitor components based on vc_MonIntfList
* @param
* @return Created monitor components in vc_vxlte_monitor_components are disconnected/unmapped
* @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.
......@@ -337,7 +394,9 @@ module LibIot_VxLTE_Functions {
if (isvalue(vc_MonIntfList.gmB)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.gmB);
}
if (isvalue(vc_MonIntfList.mwPSAP)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.mwPSAP);
}
if (isvalue(vc_MonIntfList.ic)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.ic);
}
......@@ -348,6 +407,9 @@ module LibIot_VxLTE_Functions {
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);
}
......@@ -357,6 +419,9 @@ module LibIot_VxLTE_Functions {
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);
}
if (isvalue(vc_MonIntfList.isc)){
f_cf_monitor_down_sip(vc_vxlte_monitor_components.isc);
......@@ -413,23 +478,26 @@ module LibIot_VxLTE_Functions {
/**
* @desc Check monitor component based on interface name
* @param
* @return true - Monitorinteface available/active
* @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.gmB)) and (vc_MonIntfList.gmB.interfaceName==p_interfaceName)){ return true;}
if ((isvalue(vc_MonIntfList.mwPSAP)) and (vc_MonIntfList.mwPSAP.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;}
......@@ -437,9 +505,9 @@ module LibIot_VxLTE_Functions {
}
/**
* @desc Check monitor component based on interface name
* @param
* @return true - Monitorinteface available/active
* @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{
......@@ -463,7 +531,7 @@ module LibIot_VxLTE_Functions {
var InterfaceAvailableList v_VxLTE_MonIntf_Available;
var InterfaceAvailable v_InterfaceAvailable;
var SipInterfaceMonitor v_gmA, v_gmB, v_ic, v_mwPI, v_mwPS, v_mwSI, v_mwPB, v_mwIB, v_isc;
var SipInterfaceMonitor v_gmA, v_gmB, v_mwPSAP, 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){
......@@ -477,9 +545,17 @@ module LibIot_VxLTE_Functions {
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*/ );
v_gmB := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Gm_B)/*PX_SIP_GMB_INTERFACENAME*/);
f_cf_monitor_up_sip(v_gmB);
}
if (PX_SIP_MW_PSAP_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_PSAP_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_PSAP_MONITORENABLED;
v_VxLTE_MonIntf_Available := f_update_MonitorInterfaceList(v_VxLTE_MonIntf_Available,v_InterfaceAvailable);
v_mwPSAP := f_cf_create_monitor_sip ( valueof(m_MonIntf_Sip_Mw_PSAP)/*PX_SIP_MW_PSAP_INTERFACENAME*/ );
f_cf_monitor_up_sip(v_mwPSAP);
}
if (PX_SIP_IC_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_IC_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_IC_MONITORENABLED;
......@@ -502,6 +578,13 @@ module LibIot_VxLTE_Functions {
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);
}
if (PX_SIP_MW_IS_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_SIP_MW_IS_INTERFACENAME;
v_InterfaceAvailable.available := PX_SIP_MW_IS_MONITORENABLED;
......@@ -530,8 +613,13 @@ module LibIot_VxLTE_Functions {
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);
}
if (PX_DIAMETER_CX_IH_MONITORENABLED == true){
v_InterfaceAvailable.interfaceName := PX_DIAMETER_CX_IH_INTERFACENAME;
......@@ -581,7 +669,7 @@ module LibIot_VxLTE_Functions {
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment