Loading ttcn/LibDiameter_Steps.ttcn +38 −4 Original line number Diff line number Diff line Loading @@ -69,19 +69,33 @@ group Preambles { */ function f_preambleClient() runs on DiameterComponent { var Lower_Layer_Primitive v_MSG; vc_ETS_conn:=1; // init connection ID, or even better random for each component DIAMP.send(m_llp_connect(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port,vc_ETS_conn)); tc_wait.start; alt { [] DIAMP.receive (mw_llp_connectConfirm(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port,vc_ETS_conn)) -> value v_MSG { tc_wait.stop; log("Connection established"); }; [] DIAMP.receive (mw_llp_disconnectIndication(vc_ETS_conn)) { tc_wait.stop; vc_ETS_conn:=0; log("Connection NOT established"); setverdict (fail); }; [] tc_wait.timeout { log("Connection established"); vc_ETS_conn:=0; log("Connection NOT established"); setverdict (fail); } } } Loading @@ -93,13 +107,16 @@ group Preambles { */ function f_preambleServer() runs on DiameterComponent { var Lower_Layer_Primitive v_MSG; DIAMP.send(m_llp_listen(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port)); tc_wait.start; alt { [] DIAMP.receive (mw_llp_connectIndication(*,*,*,*,*)) [] DIAMP.receive (mw_llp_connectIndication(*,*,*,*,*)) -> value v_MSG { tc_wait.stop; vc_ETS_conn:=v_MSG.ll_header._ETS_conn; log("Connection established"); }; [] tc_wait.timeout Loading @@ -113,7 +130,23 @@ group Preambles { }// end group Preambles group Postambles { //TODO /** * * @desc prostamble for Client or Server side * @param */ function f_postambleDisconnect() runs on DiameterComponent { DIAMP.send(m_llp_disconnect(vc_ETS_conn)); vc_ETS_conn:=0; all timer stop; //stop; } } // end group Postambles group DiameterChecks Loading @@ -130,6 +163,7 @@ group DefaultsTestStep all timer.stop; //stop } [] DIAMP.receive (mw_llp_disconnectIndication(vc_ETS_conn)) { tc_wait.stop; Loading Loading
ttcn/LibDiameter_Steps.ttcn +38 −4 Original line number Diff line number Diff line Loading @@ -69,19 +69,33 @@ group Preambles { */ function f_preambleClient() runs on DiameterComponent { var Lower_Layer_Primitive v_MSG; vc_ETS_conn:=1; // init connection ID, or even better random for each component DIAMP.send(m_llp_connect(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port,vc_ETS_conn)); tc_wait.start; alt { [] DIAMP.receive (mw_llp_connectConfirm(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port,vc_ETS_conn)) -> value v_MSG { tc_wait.stop; log("Connection established"); }; [] DIAMP.receive (mw_llp_disconnectIndication(vc_ETS_conn)) { tc_wait.stop; vc_ETS_conn:=0; log("Connection NOT established"); setverdict (fail); }; [] tc_wait.timeout { log("Connection established"); vc_ETS_conn:=0; log("Connection NOT established"); setverdict (fail); } } } Loading @@ -93,13 +107,16 @@ group Preambles { */ function f_preambleServer() runs on DiameterComponent { var Lower_Layer_Primitive v_MSG; DIAMP.send(m_llp_listen(vc_ETS_address, vc_ETS_port, vc_SUT_address, vc_SUT_port)); tc_wait.start; alt { [] DIAMP.receive (mw_llp_connectIndication(*,*,*,*,*)) [] DIAMP.receive (mw_llp_connectIndication(*,*,*,*,*)) -> value v_MSG { tc_wait.stop; vc_ETS_conn:=v_MSG.ll_header._ETS_conn; log("Connection established"); }; [] tc_wait.timeout Loading @@ -113,7 +130,23 @@ group Preambles { }// end group Preambles group Postambles { //TODO /** * * @desc prostamble for Client or Server side * @param */ function f_postambleDisconnect() runs on DiameterComponent { DIAMP.send(m_llp_disconnect(vc_ETS_conn)); vc_ETS_conn:=0; all timer stop; //stop; } } // end group Postambles group DiameterChecks Loading @@ -130,6 +163,7 @@ group DefaultsTestStep all timer.stop; //stop } [] DIAMP.receive (mw_llp_disconnectIndication(vc_ETS_conn)) { tc_wait.stop; Loading