Loading AtsNIT_SipSip/ttcn/AtsNIT_SipSip_TestConfiguration.ttcn +95 −44 Original line number Diff line number Diff line /* * @author STF 366 * @author STF 368 * @version $Id$ * @desc This module contains functions which implement the * configuration of the SUT adapter and mapping of test Loading @@ -23,69 +23,95 @@ group auxSipFunction { /* ** @desc f_IncCSeq returns an input parameter incremented by 1000 ** reason is to run the next testcase with a higher CSeq value /** * @desc * f_IncCSeq returns an input parameter incremented by 1000 reason * is to run the next testcase with a higher CSeq value */ function f_IncCSeq(inout CSeq p_cSeq) runs on ServerSyncComp { p_cSeq.seqNumber := p_cSeq.seqNumber + 1000; return }; // end f_IncCSeq function f_IncCSeq(inout CSeq p_cSeq) runs on ServerSyncComp { p_cSeq.seqNumber := p_cSeq.seqNumber + 1000; } // end f_IncCSeq }//end group auxSipFunction group syncCommands { const charstring c_syncSip_Isup := "syncSipIsup"; }//end group syncCommands group cfUp { /** * * @desc Creates test configuration of Ims and Isup component * @param p_imsComponen ims component * @param p_isupBiccComponent isup component * @desc Creates test configuration of 2 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component */ function f_cf_2imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2) runs on ServerSyncComp { function f_cf_2imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2 )runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_imsComponent1 := ImsComponent.create ; p_imsComponent2 := ImsComponent.create ; //Connect&map //Connect connect(p_imsComponent1:syncPort, self:syncPort) ; map(p_imsComponent1:SIPP, system:IMSCN1); // Init test Configuration connect(p_imsComponent2:syncPort, self:syncPort) ; // Map map(p_imsComponent1:SIPP, system:IMSCN1); // Init test Configuration map(p_imsComponent2:SIPP, system:IMSCN2); // Init test Configuration f_setVerdict(v_ret); }//end f_cf_2imsUp /** * @desc Creates test configuration of 3 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component * @param p_imsComponent3 third IMS component */ function f_cf_3imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2, out ImsComponent p_imsComponent3 )runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_imsComponent1 := ImsComponent.create ; p_imsComponent2 := ImsComponent.create ; //Connect connect(p_imsComponent1:syncPort, self:syncPort) ; connect(p_imsComponent2:syncPort, self:syncPort) ; connect(p_imsComponent3:syncPort, self:syncPort) ; //Map map(p_imsComponent1:SIPP, system:IMSCN1); map(p_imsComponent2:SIPP, system:IMSCN2); map(p_imsComponent2:SIPP, system:IMSCN3); f_setVerdict(v_ret); }//end f_cf_3imsUp }//end group cfUp group cfDown { /** * * @desc Deletes test configuration of Ims and Isup component * @param p_imsComponen ims component * @param p_isupBiccComponent isup component * @desc Deletes test configuration of 2 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component */ function f_cf_2imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2) runs on ServerSyncComp { var FncRetCode v_ret; f_serverWaitForAllClientsToStop(); function f_cf_2imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2 ) runs on ServerSyncComp { //Variables v_ret := e_success; var FncRetCode v_ret := e_success; //Wait for clients f_serverWaitForAllClientsToStop(); //Disconnect disconnect(p_imsComponent1:syncPort, self:syncPort) ; disconnect(p_imsComponent2:syncPort, self:syncPort) ; Loading @@ -93,11 +119,36 @@ //Unmap unmap(p_imsComponent1:SIPP, system:IMSCN1); unmap(p_imsComponent2:SIPP, system:IMSCN2); }//end f_cf_2imsDown } //end group cfDown /** * @desc Deletes test configuration of 3 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component * @param p_imsComponent3 third IMS component */ function f_cf_3imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2, in ImsComponent p_imsComponent3 ) runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Wait for clients f_serverWaitForAllClientsToStop(); //Disconnect disconnect(p_imsComponent1:syncPort, self:syncPort); disconnect(p_imsComponent2:syncPort, self:syncPort); disconnect(p_imsComponent3:syncPort, self:syncPort); //Unmap unmap(p_imsComponent1:SIPP, system:IMSCN1); unmap(p_imsComponent2:SIPP, system:IMSCN2); unmap(p_imsComponent2:SIPP, system:IMSCN3); }//end f_cf_2imsDown } //end group cfDown } // end module AtsNIT_SipSip_TestConfiguration No newline at end of file Loading
AtsNIT_SipSip/ttcn/AtsNIT_SipSip_TestConfiguration.ttcn +95 −44 Original line number Diff line number Diff line /* * @author STF 366 * @author STF 368 * @version $Id$ * @desc This module contains functions which implement the * configuration of the SUT adapter and mapping of test Loading @@ -23,69 +23,95 @@ group auxSipFunction { /* ** @desc f_IncCSeq returns an input parameter incremented by 1000 ** reason is to run the next testcase with a higher CSeq value /** * @desc * f_IncCSeq returns an input parameter incremented by 1000 reason * is to run the next testcase with a higher CSeq value */ function f_IncCSeq(inout CSeq p_cSeq) runs on ServerSyncComp { p_cSeq.seqNumber := p_cSeq.seqNumber + 1000; return }; // end f_IncCSeq function f_IncCSeq(inout CSeq p_cSeq) runs on ServerSyncComp { p_cSeq.seqNumber := p_cSeq.seqNumber + 1000; } // end f_IncCSeq }//end group auxSipFunction group syncCommands { const charstring c_syncSip_Isup := "syncSipIsup"; }//end group syncCommands group cfUp { /** * * @desc Creates test configuration of Ims and Isup component * @param p_imsComponen ims component * @param p_isupBiccComponent isup component * @desc Creates test configuration of 2 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component */ function f_cf_2imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2) runs on ServerSyncComp { function f_cf_2imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2 )runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_imsComponent1 := ImsComponent.create ; p_imsComponent2 := ImsComponent.create ; //Connect&map //Connect connect(p_imsComponent1:syncPort, self:syncPort) ; map(p_imsComponent1:SIPP, system:IMSCN1); // Init test Configuration connect(p_imsComponent2:syncPort, self:syncPort) ; // Map map(p_imsComponent1:SIPP, system:IMSCN1); // Init test Configuration map(p_imsComponent2:SIPP, system:IMSCN2); // Init test Configuration f_setVerdict(v_ret); }//end f_cf_2imsUp /** * @desc Creates test configuration of 3 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component * @param p_imsComponent3 third IMS component */ function f_cf_3imsUp( out ImsComponent p_imsComponent1, out ImsComponent p_imsComponent2, out ImsComponent p_imsComponent3 )runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Create p_imsComponent1 := ImsComponent.create ; p_imsComponent2 := ImsComponent.create ; //Connect connect(p_imsComponent1:syncPort, self:syncPort) ; connect(p_imsComponent2:syncPort, self:syncPort) ; connect(p_imsComponent3:syncPort, self:syncPort) ; //Map map(p_imsComponent1:SIPP, system:IMSCN1); map(p_imsComponent2:SIPP, system:IMSCN2); map(p_imsComponent2:SIPP, system:IMSCN3); f_setVerdict(v_ret); }//end f_cf_3imsUp }//end group cfUp group cfDown { /** * * @desc Deletes test configuration of Ims and Isup component * @param p_imsComponen ims component * @param p_isupBiccComponent isup component * @desc Deletes test configuration of 2 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component */ function f_cf_2imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2) runs on ServerSyncComp { var FncRetCode v_ret; f_serverWaitForAllClientsToStop(); function f_cf_2imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2 ) runs on ServerSyncComp { //Variables v_ret := e_success; var FncRetCode v_ret := e_success; //Wait for clients f_serverWaitForAllClientsToStop(); //Disconnect disconnect(p_imsComponent1:syncPort, self:syncPort) ; disconnect(p_imsComponent2:syncPort, self:syncPort) ; Loading @@ -93,11 +119,36 @@ //Unmap unmap(p_imsComponent1:SIPP, system:IMSCN1); unmap(p_imsComponent2:SIPP, system:IMSCN2); }//end f_cf_2imsDown } //end group cfDown /** * @desc Deletes test configuration of 3 IMS components * @param p_imsComponent1 first IMS component * @param p_imsComponent2 second IMS component * @param p_imsComponent3 third IMS component */ function f_cf_3imsDown( in ImsComponent p_imsComponent1, in ImsComponent p_imsComponent2, in ImsComponent p_imsComponent3 ) runs on ServerSyncComp { //Variables var FncRetCode v_ret := e_success; //Wait for clients f_serverWaitForAllClientsToStop(); //Disconnect disconnect(p_imsComponent1:syncPort, self:syncPort); disconnect(p_imsComponent2:syncPort, self:syncPort); disconnect(p_imsComponent3:syncPort, self:syncPort); //Unmap unmap(p_imsComponent1:SIPP, system:IMSCN1); unmap(p_imsComponent2:SIPP, system:IMSCN2); unmap(p_imsComponent2:SIPP, system:IMSCN3); }//end f_cf_2imsDown } //end group cfDown } // end module AtsNIT_SipSip_TestConfiguration No newline at end of file