Loading ttcn/dPMR_Pics.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -22,5 +22,8 @@ module dPMR_Pics { * @remark see PICS, Table A.1/1. */ modulepar {Entity PIC_ISF_OR_CSF := e_isf} modulepar {ConnectionRequestConfigurability PIC_CONNECTION_REQUEST_CONFIGURABILITY := e_ConnectionRequestNotConfigurable} modulepar {VoiceConnectionRequestStatus PIC_VOICE_CONNECTION_REQUEST_CONFIG := e_voiceNonConnectionRequest} modulepar {DataConnectionRequestStatus PIC_DATA_CONNECTION_REQUEST_CONFIG := e_dataNonConnectionRequest} } // end module dPMR_PICS ttcn/dPMR_Pixits.ttcn +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,10 @@ module dPMR_Pixits { modulepar {Payload PXT_VOICE_TEST_TONE_F3} modulepar {Payload PXT_VOICE_TEST_TONE_F4} modulepar {Payload PXT_DATA_T1_F1} modulepar {Payload PXT_DATA_T1_F2} modulepar {Payload PXT_DATA_T1_F3} modulepar {Payload PXT_DATA_T1_F4} } // end InputData group AddressesAndIdsUsed { Loading Loading @@ -97,4 +101,8 @@ module dPMR_Pixits { */ modulepar {float PXT_MAX_CASE_EXEC_PERIOD := 5000E-3} } // end dPMR_Timers group dPMR_ConnectionRequestSettings { modulepar {VoiceConnectionRequestStatus PXT_VOICE_CONNECTION_REQUEST_CONFIG := e_voiceNonConnectionRequest} modulepar {DataConnectionRequestStatus PXT_DATA_CONNECTION_REQUEST_CONFIG := e_dataNonConnectionRequest} } } // end module dPMR_Pixits ttcn/dPMR_Templates.ttcn +125 −10 Original line number Diff line number Diff line Loading @@ -101,6 +101,57 @@ payload := p_payload } // end tamplate m_frame4AudibleTestTone template Frame1 m_frame1T1Data (CalledIdUP p_calledIdUP, Payload p_payload) := { frameSync := c_fs2, frameNumber := e_frame1, calledIdUP := p_calledIdUP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame1T1Data template Frame2 m_frame2T1Data ( CalledIdLP p_calledIdLP, Payload p_payload, ColourCode p_cc) := { colourCode := p_cc, frameNumber := e_frame2, calledIdLP := p_calledIdLP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame2T1Data template Frame3 m_frame3T1Data ( OwnIdUP p_ownIdUP, Payload p_payload) := { frameSync := c_fs2, frameNumber := e_frame3, ownIdUP := p_ownIdUP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame3T1Data template Frame4 m_frame4T1Data ( OwnIdLP p_ownIdLP, Payload p_payload, ColourCode p_cc) := { colourCode := p_cc, frameNumber := e_frame4, ownIdLP := p_ownIdLP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end tamplate m_frame4T1Data template Frame1 mw_frame1Voice ( CalledIdUP p_calledIdUP ) := { frameSync := c_fs2, frameNumber := e_frame1, Loading Loading @@ -156,6 +207,8 @@ endFrame := p_endFrame } // end template m_callOrSrvReq //template T1Data } // end group MessageTemplates Loading @@ -163,7 +216,7 @@ group FrameTemplates { // This template should be deleted and replaced by the general template m_headerFrame // TODO JP This template should be deleted and replaced by the general template m_headerFrame template HeaderFrame m_headerFrameConnectReq (in template HeaderInformation p_headerInformation, ColourCode p_cc) := { preamble := c_preamble, Loading @@ -184,20 +237,43 @@ } // end template m_headerFrameConnectReq template EndInformation m_endInformation := { template PacketDataHeader m_packetDataHeaderFrame (in template HeaderInformation p_headerInformation, ColourCode p_cc) := { preamble := c_preamble, frameSync4 := c_fs4, headerInformation0 := p_headerInformation, colourCode := p_cc, headerInformation1 := p_headerInformation } // end template m_headerFrameConnectReq template EndInformation m_endInformationAck := { endType := e_endFrame , ackRequest := e_AckReq, txWait := e_noSpecTime, statusMessage := c_dummyStatusValue, reserved4bit := c_reserved4bits } // end template m_endInformation } // end template m_endInformationAck template EndInformation m_endInformationNoAck := { endType := e_endFrame , ackRequest := e_noAckReq, txWait := e_noSpecTime, statusMessage := c_dummyStatusValue, reserved4bit := c_reserved4bits } // end template m_endInformationNoAck template EndFrame m_endFrameConnectReq := { template EndFrame m_endFrameAck := { frameSync3 := c_fs3, endInformation0 := m_endInformationAck, endInformation1 := m_endInformationAck } // end template m_endFrameAck template EndFrame m_endFrameNoAck := { frameSync3 := c_fs3, endInformation0 := m_endInformation, endInformation1 := m_endInformation } // end template m_endFrameConnectReq endInformation0 := m_endInformationNoAck, endInformation1 := m_endInformationNoAck } // end template m_endFrameNoAck template AckFrame mw_acknowledgementAckOnConnectReq( in template HeaderInformation p_headerInformation, Loading Loading @@ -227,7 +303,6 @@ } // end group FrameTemplates group InformationElementTemplates { template HeaderInformation m_headerInformation( HeaderType p_hdrTp, MsAddress p_calledId , MsAddress p_ownId, Loading @@ -244,6 +319,34 @@ ciInformationNormalOrPws :=c_ciInformationNormal } } // end m_headerInformation /* type record PacketDataHeaderInformation { HeaderType headerType, MsAddress calledId, MsAddress ownId, CommunicationsMode communicationsMode, CommsFormat commsFormat, Reserved2bit reserved2bit, CallInformation callInformation } */ template PacketDataHeaderInformation m_packetDataHeaderInformation(HeaderType p_hdrTp, MsAddress p_calledId , MsAddress p_ownId, CommunicationsMode p_commMode, CommsFormat p_commFormat ) := { headerType := p_hdrTp, calledId := p_calledId, ownId := p_ownId, communicationsMode := p_commMode, commsFormat := p_commFormat, reserved2bit := c_reserved2bits, callInformation := { ciInformationNormalOrPws :=c_ciInformationNormal } } // end m_headerInformation template HeaderInformation mw_headerInformationVoiceTx ( MsAddress p_calledId , Loading Loading @@ -361,6 +464,18 @@ isfCidAddr := omit , utActParams := p_utActParameter } template UtRequest m_msMakeManualDisconnectionRequest_utRequest( ChannelNumber p_channelNumber, in template DialString p_dialstr , UtActParams p_utActParameter) := { channelNr := p_channelNumber, politeLvl := omit , callType := omit , dialString := p_dialstr, isfCidAddr := omit , utActParams := p_utActParameter } template UtRequest m_msVoiceWithAutomaticConnectionRequest_utRequest( ChannelNumber p_channelNumber, in template DialString p_dialstr , UtActParams p_utActParameter) := { Loading @@ -384,7 +499,7 @@ //TODO JP //TODO JP is this used? template UtRequest m_msAct_utReq( ChannelNumber p_channelNumber) := { channelNr := p_channelNumber, politeLvl := omit , Loading ttcn/dPMR_TestCases.ttcn +376 −12 Original line number Diff line number Diff line Loading @@ -126,8 +126,8 @@ module dPMR_TestCases { f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_ConnectionRequestTx_MS01(p_cc));/*f_TC_voiceTx_MS01(p_cc)*/ v_ut.start(f_TC_msMakeManualConnectionRequest(p_cc)); //f_TC_msPressPttThenDekeyPtt_UT(p_cc)); v_mse.start(f_TC_ConnectionRequestTx_MS01(p_cc)); v_ut.start(f_TC_msMakeManualConnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); Loading Loading @@ -186,6 +186,85 @@ module dPMR_TestCases { } // end TC_PMR_0406_01 /** * @param p_cc The colour code (channel) used */ testcase TC_PMR_0406_02(ColourCode p_cc) runs on ServerSyncComp system TestAdapter { //Variables var Mse v_mse; var Ut v_ut; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_ackOnT1Data_MS01(p_cc)); v_ut.start(f_TC_msToStandby_UT( p_cc )); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); } // end TC_PMR_0405_02 /** * @param p_cc The colour code (channel) used */ testcase TC_PMR_0407_01( ColourCode p_cc ) runs on ServerSyncComp system TestAdapter { var Mse v_mse; var Ut v_ut; var FncRetCode v_ret := e_success; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_DisconnectionRequestTx_MS01(p_cc)); v_ut.start(f_TC_msMakeManualDisconnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); } // end TC_PMR_0405_01 /** * @param p_cc The colour code (channel) used */ //**************************************** TBD //* testcase TC_PMR_0407_02( ColourCode p_cc ) runs on ServerSyncComp system TestAdapter { var Mse v_mse; var Ut v_ut; var FncRetCode v_ret := e_success; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body // TODO JP v_mse.start(f_TC_DataWithAutomaticDisconnectionRequestTx_MS01(p_cc)); // TODO JP v_ut.start(f_TC_msDataWithAutomaticDisconnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); //**************************************** } // end TC_PMR_0406_01 group SuperFrame { group Voice { Loading Loading @@ -262,7 +341,7 @@ module dPMR_TestCases { m_frame4AudibleTestTone(vc_mse.testerIdLP, PXT_VOICE_TEST_TONE_F4, p_cc) ) ), m_endFrameConnectReq) m_endFrameNoAck) ); f_clientSyncAndVerdict(c_tbDone, v_ret); Loading Loading @@ -308,7 +387,7 @@ module dPMR_TestCases { m_frame4AudibleTestTone(vc_mse.testerIdLP, PXT_VOICE_TEST_TONE_F4, p_cc) ) ), m_endFrameConnectReq) m_endFrameNoAck) ); f_clientSyncAndVerdict(c_tbDone, v_ret); Loading Loading @@ -343,7 +422,7 @@ module dPMR_TestCases { m_headerFrameConnectReq( m_headerInformation(e_connReqHeader, vc_mse.iutId, vc_mse.testerId, e_voice, e_p2p), p_cc), m_endFrameConnectReq) m_endFrameAck) ); alt { [] dp1Port.receive(mw_acknowledgementAckOnConnectReq( Loading @@ -366,6 +445,66 @@ module dPMR_TestCases { } // end f_TC_ackOnConnectionRequest_MS01 /** * @desc Checks that the MS responds with an ACK when receiving T1 data and ack req in endframe. * @param p_cc Colour Code */ function f_TC_ackOnT1Data_MS01( ColourCode p_cc ) runs on Mse{ // Variables var FncRetCode v_ret := e_success; var default defvar; //Test System Parameters f_initMse(); //Default defvar := activate(a_dftMse()); //Preamble f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; // TODO JP is it ok to use three sen instead of on embedded? dp1Port.send( m_payloadTransmission( m_packetDataHeaderFrame( m_headerInformation( e_commStartHeader, vc_mse.iutId, vc_mse.testerId, e_dataT1, e_p2p), p_cc), m_superFrameListWith4SuperFrames( m_superFrame( m_frame1T1Data(vc_mse.testerIdUP, PXT_DATA_T1_F1), m_frame2T1Data(vc_mse.testerIdLP, PXT_DATA_T1_F2, p_cc), m_frame3T1Data(vc_mse.iutIdUP, PXT_DATA_T1_F3), m_frame4T1Data(vc_mse.iutIdLP, PXT_DATA_T1_F4,p_cc))), m_endFrameAck)); alt { [] dp1Port.receive(mw_acknowledgementAckOnConnectReq( m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc) ) { tc_ac.stop; setverdict(pass); } [] tc_ac.timeout { log("**** f_TC_ackOnConnectionRequest_MS01: Timeout: TC Timer expiration before reception of Acknowledgement ****"); setverdict(fail); } } // end alt //no Postamble deactivate; } // end f_TC_ackOnConnectionRequest_MS01 /** * @desc Check that a voice transmission from the MS (IUT) consists of a Header Frame, a list of * Super Frames, and an End Frame, Loading @@ -390,6 +529,11 @@ module dPMR_TestCases { //Test Body tc_ac.start ; if (not f_handleVoiceConnectionRequest(p_cc)) { tc_ac.stop ; log("**** f_TC_voiceTx_MS01: Error: Connection Request handling error. ****"); setverdict(inconc); } alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), Loading Loading @@ -444,6 +588,7 @@ module dPMR_TestCases { * Super Frames, and an End Frame, * @param p_cc Colour Code */ // TODO JP this must be check if it is configurable.. implies to ask UT set it, if not configurable, the TC may not be applicable, if not set! function f_TC_VoiceWithAutomaticConnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse { // Variables Loading @@ -462,7 +607,7 @@ module dPMR_TestCases { f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; // TODO JP fix here to do Header/end *send ack* header/payload/end tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), Loading Loading @@ -539,6 +684,7 @@ module dPMR_TestCases { * * @param p_cc Colour Code */ // TODO JP check if ok.. This should be ok, but if not configurable the TC may not be applicable function f_TC_ConnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse{ // Variables Loading Loading @@ -587,6 +733,189 @@ module dPMR_TestCases { } // end function f_TC_ConnectionRequestTx_MS01 /** * @desc Check that a manual Disconnection Request is sent from the IUT * * @param p_cc Colour Code */ // TODO JP check if ok.. This should be ok, but if not configurable the TC may not be applicable function f_TC_DisconnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse{ // Variables var FncRetCode v_ret := e_success; var UInt16 v_sfCount := 0; var boolean v_headerReceived := false; var default defvar; //Test System Parameters f_initMse(); //Default defvar := activate(a_dftMse()); //Preamble f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerConnectRequestTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; setverdict(pass); alt { [] dp1Port.receive(m_headerFrame( mw_headerConnectRequestTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; setverdict(pass); } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_ConnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of Connectio Request ****"); setverdict(fail); } } // end alt f_clientSyncAndVerdict(c_tbDone, v_ret); deactivate; } // end function f_TC_DisconnectionRequestTx_MS01 /** * @desc handle different cases of Connection Requests settings for voice * * @param p_cc Colour Code */ function f_handleVoiceConnectionRequest ( ColourCode p_cc) runs on Mse return boolean{ // Check status on connection request var boolean retval := true; if (((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestNotConfigurable) and (PIC_VOICE_CONNECTION_REQUEST_CONFIG == e_voiceConnectionRequest)) or ((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestConfigurable) and (PXT_VOICE_CONNECTION_REQUEST_CONFIG == e_voiceConnectionRequest))){ // receive connection request and send an ack tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; dp1Port.send( m_sendAck(m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)); } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } return retval; } // end function f_handleVoiceConnectionRequest /** * @desc handle different cases of Connection Requests settings for data * * @param p_cc Colour Code */ // TODO change this tp handle DATA function f_handleDataConnectionRequest ( ColourCode p_cc) runs on Mse return boolean{ // Check status on connection request var boolean retval := true; if (((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestNotConfigurable) and (PIC_DATA_CONNECTION_REQUEST_CONFIG == e_dataConnectionRequest)) or ((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestConfigurable) and (PXT_DATA_CONNECTION_REQUEST_CONFIG == e_dataConnectionRequest))){ // receive connection request and send an ack tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; dp1Port.send( m_sendAck(m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)); } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } return retval; } // end functionf_handleDataConnectionRequest }//end commonTCFunctions Loading Loading @@ -639,6 +968,7 @@ module dPMR_TestCases { * * @param p_cc Colour Code */ // TODO JP check with SM if this is ok, actually the UT will wait for a NON event (no voice) function f_TC_msWaitVoiceNotReceived_UT( ColourCode p_cc) runs on Ut{ //Variables Loading Loading @@ -693,7 +1023,7 @@ module dPMR_TestCases { //Default defvar := activate(a_dftUt()); //Preamble //Preamble // TODO JP check if we can configure the ConnReqMode here if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_handshake_Ut(m_msToStandBy_utRequest(f_getChannelNrFromColourCode(p_cc), omit, Loading Loading @@ -733,7 +1063,7 @@ module dPMR_TestCases { //Preamble // TODO JP SM FK Why should this have a polite level, f_TC_msToStandby_UT(p_cc); f_TC_msToStandby_UT(p_cc); // TODO JP check if we can configure the ConnReqMode here f_clientSyncAndVerdict(c_prDone, v_ret); Loading Loading @@ -775,7 +1105,7 @@ module dPMR_TestCases { defvar := activate(a_dftUt()); //Preamble // TODO JP SM FK Why should this have a polite level, // TODO JP SM FK Why should this have a polite level, // TODO JP check if we can configure the ConnReqMode here f_TC_msToStandby_UT(p_cc); f_clientSyncAndVerdict(c_prDone, v_ret); Loading @@ -792,6 +1122,40 @@ module dPMR_TestCases { }//end f_TC_msMakeManualConnectionRequest /** * @desc This function commands Tester to make manual Connection Request. * @param p_cc Colour Code */ function f_TC_msMakeManualDisconnectionRequest(ColourCode p_cc) runs on Ut{ //Variables var FncRetCode v_ret := e_success; var default defvar; //Test System Parameters f_initUt(); //Default defvar := activate(a_dftUt()); //Preamble // TODO JP SM FK Why should this have a polite level, // TODO JP check if we can configure the ConnReqMode here f_TC_msToStandby_UT(p_cc); f_clientSyncAndVerdict(c_prDone, v_ret); //Test body//TODO JP make it an f_handshake_Ut(m_testToneDetected_utReq) v_ret := f_handshake_Ut(m_msMakeManualDisconnectionRequest_utRequest( f_getChannelNrFromColourCode(p_cc), c_defaultPeerToPeerAddress , e_makeManualDisconnectionRequest)); //v_ret := f_handshake_Ut(m_msAct_utReq); //if (v_ret != e_success) {f_clientSyncAndVerdict(c_tbDone, v_ret);} //Default deactivate; }//end f_TC_msMakeManualConnectionRequest /** * @desc This function commands Tester to make voice with automatic Connection Request. * @param p_cc Colour Code Loading @@ -808,7 +1172,7 @@ module dPMR_TestCases { //Default defvar := activate(a_dftUt()); //Preamble //Preamble // TODO JP check if we can configure the ConnReqMode here // TODO JP SM FK Why should this have a polite level, f_TC_msToStandby_UT(p_cc); Loading ttcn/dPMR_Types.ttcn +41 −22 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
ttcn/dPMR_Pics.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -22,5 +22,8 @@ module dPMR_Pics { * @remark see PICS, Table A.1/1. */ modulepar {Entity PIC_ISF_OR_CSF := e_isf} modulepar {ConnectionRequestConfigurability PIC_CONNECTION_REQUEST_CONFIGURABILITY := e_ConnectionRequestNotConfigurable} modulepar {VoiceConnectionRequestStatus PIC_VOICE_CONNECTION_REQUEST_CONFIG := e_voiceNonConnectionRequest} modulepar {DataConnectionRequestStatus PIC_DATA_CONNECTION_REQUEST_CONFIG := e_dataNonConnectionRequest} } // end module dPMR_PICS
ttcn/dPMR_Pixits.ttcn +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,10 @@ module dPMR_Pixits { modulepar {Payload PXT_VOICE_TEST_TONE_F3} modulepar {Payload PXT_VOICE_TEST_TONE_F4} modulepar {Payload PXT_DATA_T1_F1} modulepar {Payload PXT_DATA_T1_F2} modulepar {Payload PXT_DATA_T1_F3} modulepar {Payload PXT_DATA_T1_F4} } // end InputData group AddressesAndIdsUsed { Loading Loading @@ -97,4 +101,8 @@ module dPMR_Pixits { */ modulepar {float PXT_MAX_CASE_EXEC_PERIOD := 5000E-3} } // end dPMR_Timers group dPMR_ConnectionRequestSettings { modulepar {VoiceConnectionRequestStatus PXT_VOICE_CONNECTION_REQUEST_CONFIG := e_voiceNonConnectionRequest} modulepar {DataConnectionRequestStatus PXT_DATA_CONNECTION_REQUEST_CONFIG := e_dataNonConnectionRequest} } } // end module dPMR_Pixits
ttcn/dPMR_Templates.ttcn +125 −10 Original line number Diff line number Diff line Loading @@ -101,6 +101,57 @@ payload := p_payload } // end tamplate m_frame4AudibleTestTone template Frame1 m_frame1T1Data (CalledIdUP p_calledIdUP, Payload p_payload) := { frameSync := c_fs2, frameNumber := e_frame1, calledIdUP := p_calledIdUP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame1T1Data template Frame2 m_frame2T1Data ( CalledIdLP p_calledIdLP, Payload p_payload, ColourCode p_cc) := { colourCode := p_cc, frameNumber := e_frame2, calledIdLP := p_calledIdLP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame2T1Data template Frame3 m_frame3T1Data ( OwnIdUP p_ownIdUP, Payload p_payload) := { frameSync := c_fs2, frameNumber := e_frame3, ownIdUP := p_ownIdUP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end template m_frame3T1Data template Frame4 m_frame4T1Data ( OwnIdLP p_ownIdLP, Payload p_payload, ColourCode p_cc) := { colourCode := p_cc, frameNumber := e_frame4, ownIdLP := p_ownIdLP, communicationsMode := e_dataT1, commsFormat := e_p2p, reserved2bit := c_reserved2bits, slowData := c_slowDataInVoiceEmpty, payload := p_payload } // end tamplate m_frame4T1Data template Frame1 mw_frame1Voice ( CalledIdUP p_calledIdUP ) := { frameSync := c_fs2, frameNumber := e_frame1, Loading Loading @@ -156,6 +207,8 @@ endFrame := p_endFrame } // end template m_callOrSrvReq //template T1Data } // end group MessageTemplates Loading @@ -163,7 +216,7 @@ group FrameTemplates { // This template should be deleted and replaced by the general template m_headerFrame // TODO JP This template should be deleted and replaced by the general template m_headerFrame template HeaderFrame m_headerFrameConnectReq (in template HeaderInformation p_headerInformation, ColourCode p_cc) := { preamble := c_preamble, Loading @@ -184,20 +237,43 @@ } // end template m_headerFrameConnectReq template EndInformation m_endInformation := { template PacketDataHeader m_packetDataHeaderFrame (in template HeaderInformation p_headerInformation, ColourCode p_cc) := { preamble := c_preamble, frameSync4 := c_fs4, headerInformation0 := p_headerInformation, colourCode := p_cc, headerInformation1 := p_headerInformation } // end template m_headerFrameConnectReq template EndInformation m_endInformationAck := { endType := e_endFrame , ackRequest := e_AckReq, txWait := e_noSpecTime, statusMessage := c_dummyStatusValue, reserved4bit := c_reserved4bits } // end template m_endInformation } // end template m_endInformationAck template EndInformation m_endInformationNoAck := { endType := e_endFrame , ackRequest := e_noAckReq, txWait := e_noSpecTime, statusMessage := c_dummyStatusValue, reserved4bit := c_reserved4bits } // end template m_endInformationNoAck template EndFrame m_endFrameConnectReq := { template EndFrame m_endFrameAck := { frameSync3 := c_fs3, endInformation0 := m_endInformationAck, endInformation1 := m_endInformationAck } // end template m_endFrameAck template EndFrame m_endFrameNoAck := { frameSync3 := c_fs3, endInformation0 := m_endInformation, endInformation1 := m_endInformation } // end template m_endFrameConnectReq endInformation0 := m_endInformationNoAck, endInformation1 := m_endInformationNoAck } // end template m_endFrameNoAck template AckFrame mw_acknowledgementAckOnConnectReq( in template HeaderInformation p_headerInformation, Loading Loading @@ -227,7 +303,6 @@ } // end group FrameTemplates group InformationElementTemplates { template HeaderInformation m_headerInformation( HeaderType p_hdrTp, MsAddress p_calledId , MsAddress p_ownId, Loading @@ -244,6 +319,34 @@ ciInformationNormalOrPws :=c_ciInformationNormal } } // end m_headerInformation /* type record PacketDataHeaderInformation { HeaderType headerType, MsAddress calledId, MsAddress ownId, CommunicationsMode communicationsMode, CommsFormat commsFormat, Reserved2bit reserved2bit, CallInformation callInformation } */ template PacketDataHeaderInformation m_packetDataHeaderInformation(HeaderType p_hdrTp, MsAddress p_calledId , MsAddress p_ownId, CommunicationsMode p_commMode, CommsFormat p_commFormat ) := { headerType := p_hdrTp, calledId := p_calledId, ownId := p_ownId, communicationsMode := p_commMode, commsFormat := p_commFormat, reserved2bit := c_reserved2bits, callInformation := { ciInformationNormalOrPws :=c_ciInformationNormal } } // end m_headerInformation template HeaderInformation mw_headerInformationVoiceTx ( MsAddress p_calledId , Loading Loading @@ -361,6 +464,18 @@ isfCidAddr := omit , utActParams := p_utActParameter } template UtRequest m_msMakeManualDisconnectionRequest_utRequest( ChannelNumber p_channelNumber, in template DialString p_dialstr , UtActParams p_utActParameter) := { channelNr := p_channelNumber, politeLvl := omit , callType := omit , dialString := p_dialstr, isfCidAddr := omit , utActParams := p_utActParameter } template UtRequest m_msVoiceWithAutomaticConnectionRequest_utRequest( ChannelNumber p_channelNumber, in template DialString p_dialstr , UtActParams p_utActParameter) := { Loading @@ -384,7 +499,7 @@ //TODO JP //TODO JP is this used? template UtRequest m_msAct_utReq( ChannelNumber p_channelNumber) := { channelNr := p_channelNumber, politeLvl := omit , Loading
ttcn/dPMR_TestCases.ttcn +376 −12 Original line number Diff line number Diff line Loading @@ -126,8 +126,8 @@ module dPMR_TestCases { f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_ConnectionRequestTx_MS01(p_cc));/*f_TC_voiceTx_MS01(p_cc)*/ v_ut.start(f_TC_msMakeManualConnectionRequest(p_cc)); //f_TC_msPressPttThenDekeyPtt_UT(p_cc)); v_mse.start(f_TC_ConnectionRequestTx_MS01(p_cc)); v_ut.start(f_TC_msMakeManualConnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); Loading Loading @@ -186,6 +186,85 @@ module dPMR_TestCases { } // end TC_PMR_0406_01 /** * @param p_cc The colour code (channel) used */ testcase TC_PMR_0406_02(ColourCode p_cc) runs on ServerSyncComp system TestAdapter { //Variables var Mse v_mse; var Ut v_ut; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_ackOnT1Data_MS01(p_cc)); v_ut.start(f_TC_msToStandby_UT( p_cc )); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); } // end TC_PMR_0405_02 /** * @param p_cc The colour code (channel) used */ testcase TC_PMR_0407_01( ColourCode p_cc ) runs on ServerSyncComp system TestAdapter { var Mse v_mse; var Ut v_ut; var FncRetCode v_ret := e_success; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body v_mse.start(f_TC_DisconnectionRequestTx_MS01(p_cc)); v_ut.start(f_TC_msMakeManualDisconnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); } // end TC_PMR_0405_01 /** * @param p_cc The colour code (channel) used */ //**************************************** TBD //* testcase TC_PMR_0407_02( ColourCode p_cc ) runs on ServerSyncComp system TestAdapter { var Mse v_mse; var Ut v_ut; var FncRetCode v_ret := e_success; //Configuration Up f_cfMseUp(v_mse, v_ut); //Test body // TODO JP v_mse.start(f_TC_DataWithAutomaticDisconnectionRequestTx_MS01(p_cc)); // TODO JP v_ut.start(f_TC_msDataWithAutomaticDisconnectionRequest(p_cc)); // synchronize both PTCs f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Configuration Down f_cfMseDown(v_mse, v_ut); //**************************************** } // end TC_PMR_0406_01 group SuperFrame { group Voice { Loading Loading @@ -262,7 +341,7 @@ module dPMR_TestCases { m_frame4AudibleTestTone(vc_mse.testerIdLP, PXT_VOICE_TEST_TONE_F4, p_cc) ) ), m_endFrameConnectReq) m_endFrameNoAck) ); f_clientSyncAndVerdict(c_tbDone, v_ret); Loading Loading @@ -308,7 +387,7 @@ module dPMR_TestCases { m_frame4AudibleTestTone(vc_mse.testerIdLP, PXT_VOICE_TEST_TONE_F4, p_cc) ) ), m_endFrameConnectReq) m_endFrameNoAck) ); f_clientSyncAndVerdict(c_tbDone, v_ret); Loading Loading @@ -343,7 +422,7 @@ module dPMR_TestCases { m_headerFrameConnectReq( m_headerInformation(e_connReqHeader, vc_mse.iutId, vc_mse.testerId, e_voice, e_p2p), p_cc), m_endFrameConnectReq) m_endFrameAck) ); alt { [] dp1Port.receive(mw_acknowledgementAckOnConnectReq( Loading @@ -366,6 +445,66 @@ module dPMR_TestCases { } // end f_TC_ackOnConnectionRequest_MS01 /** * @desc Checks that the MS responds with an ACK when receiving T1 data and ack req in endframe. * @param p_cc Colour Code */ function f_TC_ackOnT1Data_MS01( ColourCode p_cc ) runs on Mse{ // Variables var FncRetCode v_ret := e_success; var default defvar; //Test System Parameters f_initMse(); //Default defvar := activate(a_dftMse()); //Preamble f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; // TODO JP is it ok to use three sen instead of on embedded? dp1Port.send( m_payloadTransmission( m_packetDataHeaderFrame( m_headerInformation( e_commStartHeader, vc_mse.iutId, vc_mse.testerId, e_dataT1, e_p2p), p_cc), m_superFrameListWith4SuperFrames( m_superFrame( m_frame1T1Data(vc_mse.testerIdUP, PXT_DATA_T1_F1), m_frame2T1Data(vc_mse.testerIdLP, PXT_DATA_T1_F2, p_cc), m_frame3T1Data(vc_mse.iutIdUP, PXT_DATA_T1_F3), m_frame4T1Data(vc_mse.iutIdLP, PXT_DATA_T1_F4,p_cc))), m_endFrameAck)); alt { [] dp1Port.receive(mw_acknowledgementAckOnConnectReq( m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc) ) { tc_ac.stop; setverdict(pass); } [] tc_ac.timeout { log("**** f_TC_ackOnConnectionRequest_MS01: Timeout: TC Timer expiration before reception of Acknowledgement ****"); setverdict(fail); } } // end alt //no Postamble deactivate; } // end f_TC_ackOnConnectionRequest_MS01 /** * @desc Check that a voice transmission from the MS (IUT) consists of a Header Frame, a list of * Super Frames, and an End Frame, Loading @@ -390,6 +529,11 @@ module dPMR_TestCases { //Test Body tc_ac.start ; if (not f_handleVoiceConnectionRequest(p_cc)) { tc_ac.stop ; log("**** f_TC_voiceTx_MS01: Error: Connection Request handling error. ****"); setverdict(inconc); } alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), Loading Loading @@ -444,6 +588,7 @@ module dPMR_TestCases { * Super Frames, and an End Frame, * @param p_cc Colour Code */ // TODO JP this must be check if it is configurable.. implies to ask UT set it, if not configurable, the TC may not be applicable, if not set! function f_TC_VoiceWithAutomaticConnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse { // Variables Loading @@ -462,7 +607,7 @@ module dPMR_TestCases { f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; // TODO JP fix here to do Header/end *send ack* header/payload/end tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), Loading Loading @@ -539,6 +684,7 @@ module dPMR_TestCases { * * @param p_cc Colour Code */ // TODO JP check if ok.. This should be ok, but if not configurable the TC may not be applicable function f_TC_ConnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse{ // Variables Loading Loading @@ -587,6 +733,189 @@ module dPMR_TestCases { } // end function f_TC_ConnectionRequestTx_MS01 /** * @desc Check that a manual Disconnection Request is sent from the IUT * * @param p_cc Colour Code */ // TODO JP check if ok.. This should be ok, but if not configurable the TC may not be applicable function f_TC_DisconnectionRequestTx_MS01 ( ColourCode p_cc ) runs on Mse{ // Variables var FncRetCode v_ret := e_success; var UInt16 v_sfCount := 0; var boolean v_headerReceived := false; var default defvar; //Test System Parameters f_initMse(); //Default defvar := activate(a_dftMse()); //Preamble f_clientSyncAndVerdict(c_prDone, v_ret); //Test Body tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerConnectRequestTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; setverdict(pass); alt { [] dp1Port.receive(m_headerFrame( mw_headerConnectRequestTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; setverdict(pass); } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_DisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); } } // end alt } [] tc_ac.timeout { log("**** f_TC_ConnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of Connectio Request ****"); setverdict(fail); } } // end alt f_clientSyncAndVerdict(c_tbDone, v_ret); deactivate; } // end function f_TC_DisconnectionRequestTx_MS01 /** * @desc handle different cases of Connection Requests settings for voice * * @param p_cc Colour Code */ function f_handleVoiceConnectionRequest ( ColourCode p_cc) runs on Mse return boolean{ // Check status on connection request var boolean retval := true; if (((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestNotConfigurable) and (PIC_VOICE_CONNECTION_REQUEST_CONFIG == e_voiceConnectionRequest)) or ((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestConfigurable) and (PXT_VOICE_CONNECTION_REQUEST_CONFIG == e_voiceConnectionRequest))){ // receive connection request and send an ack tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; dp1Port.send( m_sendAck(m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)); } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } return retval; } // end function f_handleVoiceConnectionRequest /** * @desc handle different cases of Connection Requests settings for data * * @param p_cc Colour Code */ // TODO change this tp handle DATA function f_handleDataConnectionRequest ( ColourCode p_cc) runs on Mse return boolean{ // Check status on connection request var boolean retval := true; if (((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestNotConfigurable) and (PIC_DATA_CONNECTION_REQUEST_CONFIG == e_dataConnectionRequest)) or ((PIC_CONNECTION_REQUEST_CONFIGURABILITY == e_ConnectionRequestConfigurable) and (PXT_DATA_CONNECTION_REQUEST_CONFIG == e_dataConnectionRequest))){ // receive connection request and send an ack tc_ac.start ; alt { [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx( vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)) { alt { [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq))) { tc_ac.stop ; dp1Port.send( m_sendAck(m_headerInformation(e_ack, vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc)); } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } [] tc_ac.timeout { log("**** f_handleVoiceConnectionRequest: Timeout: TC Timer expiration before reception of complete Voice transmission ****"); setverdict(fail); retval := false; } } // end alt } return retval; } // end functionf_handleDataConnectionRequest }//end commonTCFunctions Loading Loading @@ -639,6 +968,7 @@ module dPMR_TestCases { * * @param p_cc Colour Code */ // TODO JP check with SM if this is ok, actually the UT will wait for a NON event (no voice) function f_TC_msWaitVoiceNotReceived_UT( ColourCode p_cc) runs on Ut{ //Variables Loading Loading @@ -693,7 +1023,7 @@ module dPMR_TestCases { //Default defvar := activate(a_dftUt()); //Preamble //Preamble // TODO JP check if we can configure the ConnReqMode here if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_handshake_Ut(m_msToStandBy_utRequest(f_getChannelNrFromColourCode(p_cc), omit, Loading Loading @@ -733,7 +1063,7 @@ module dPMR_TestCases { //Preamble // TODO JP SM FK Why should this have a polite level, f_TC_msToStandby_UT(p_cc); f_TC_msToStandby_UT(p_cc); // TODO JP check if we can configure the ConnReqMode here f_clientSyncAndVerdict(c_prDone, v_ret); Loading Loading @@ -775,7 +1105,7 @@ module dPMR_TestCases { defvar := activate(a_dftUt()); //Preamble // TODO JP SM FK Why should this have a polite level, // TODO JP SM FK Why should this have a polite level, // TODO JP check if we can configure the ConnReqMode here f_TC_msToStandby_UT(p_cc); f_clientSyncAndVerdict(c_prDone, v_ret); Loading @@ -792,6 +1122,40 @@ module dPMR_TestCases { }//end f_TC_msMakeManualConnectionRequest /** * @desc This function commands Tester to make manual Connection Request. * @param p_cc Colour Code */ function f_TC_msMakeManualDisconnectionRequest(ColourCode p_cc) runs on Ut{ //Variables var FncRetCode v_ret := e_success; var default defvar; //Test System Parameters f_initUt(); //Default defvar := activate(a_dftUt()); //Preamble // TODO JP SM FK Why should this have a polite level, // TODO JP check if we can configure the ConnReqMode here f_TC_msToStandby_UT(p_cc); f_clientSyncAndVerdict(c_prDone, v_ret); //Test body//TODO JP make it an f_handshake_Ut(m_testToneDetected_utReq) v_ret := f_handshake_Ut(m_msMakeManualDisconnectionRequest_utRequest( f_getChannelNrFromColourCode(p_cc), c_defaultPeerToPeerAddress , e_makeManualDisconnectionRequest)); //v_ret := f_handshake_Ut(m_msAct_utReq); //if (v_ret != e_success) {f_clientSyncAndVerdict(c_tbDone, v_ret);} //Default deactivate; }//end f_TC_msMakeManualConnectionRequest /** * @desc This function commands Tester to make voice with automatic Connection Request. * @param p_cc Colour Code Loading @@ -808,7 +1172,7 @@ module dPMR_TestCases { //Default defvar := activate(a_dftUt()); //Preamble //Preamble // TODO JP check if we can configure the ConnReqMode here // TODO JP SM FK Why should this have a polite level, f_TC_msToStandby_UT(p_cc); Loading
ttcn/dPMR_Types.ttcn +41 −22 File changed.Preview size limit exceeded, changes collapsed. Show changes