Commit 84d62c8c authored by petersenj's avatar petersenj
Browse files

Updated unnecessary if statement in f_TC_voiceTx_MS01

Implemented Test Case 0405_02
parent 07babc33
Loading
Loading
Loading
Loading
+32 −13
Original line number Diff line number Diff line
@@ -157,12 +157,6 @@
		} // end template m_callOrSrvReq


		template EndFrame m_endFrame ( template EndInformation p_endInfo ) := {
			frameSync3 := c_fs3,
			endInformation0 := p_endInfo,
			endInformation1 := p_endInfo
		} // end template m_EndFrame 


	} // end group MessageTemplates

@@ -215,6 +209,20 @@
			headerInformation1 := p_headerInformation
		} // end template mw_acknowledgementAckOnConnectReq

		template EndFrame m_endFrame ( in template EndInformation p_endInfo ) := {
			frameSync3 := c_fs3,
			endInformation0 := p_endInfo,
			endInformation1 := p_endInfo
		} // end template m_EndFrame 

		template AckFrame m_sendAck ( in template HeaderInformation p_ackInfo, 
												 ColourCode        p_cc) := {
			preamble := c_preamble,
			frameSync1 := c_fs1,
			headerInformation0 := p_ackInfo,
			colourCode := p_cc,
			headerInformation1 := p_ackInfo
		} // end template m_EndFrame 

	} // end group FrameTemplates

@@ -353,6 +361,17 @@
					isfCidAddr := omit ,
					utActParams := p_utActParameter
				}
	template UtRequest m_msVoiceWithAutomaticConnectionRequest_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_msCfgParamsCsfPoliteRx( ChannelNumber p_channelNumber, DialString p_dialstr ) := {
			  		channelNr := p_channelNumber,
+180 −33
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ module dPMR_TestCases {
				//Configuration Up
				f_cfMseUp(v_mse, v_ut);

				//Test body  // TODO JP check with Sebastian... Exactly the same testcase as 0801_1 since the templates checks the frames received
				//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));

@@ -136,6 +136,29 @@ module dPMR_TestCases {
				f_cfMseDown(v_mse, v_ut);
			} // end TC_PMR_0405_01

			/**
			* @param p_cc The colour code (channel) used
			*/
			testcase TC_PMR_0405_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  
				v_mse.start(f_TC_VoiceWithAutomaticConnectionRequestTx_MS01(p_cc));
				v_ut.start(f_TC_msVoiceWithAutomaticConnectionRequest(p_cc)); 

				// synchronize both PTCs
				f_serverSync2ClientsAndStop({c_prDone, c_tbDone});

				// Configuration Down
				f_cfMseDown(v_mse, v_ut);
			} // end TC_PMR_0405_02

			/**
			* @param p_cc The colour code (channel) used
@@ -353,7 +376,6 @@ module dPMR_TestCases {
			// Variables
			var FncRetCode v_ret := e_success;
			var UInt16 v_sfCount := 0;
			var boolean v_headerReceived := false;
			var default defvar;


@@ -373,8 +395,6 @@ module dPMR_TestCases {
													vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p),
				                                    p_cc))
				{
						if (not(v_headerReceived)) {
							v_headerReceived := true;
					alt {
					  [] dp1Port.receive(m_superFrame( mw_frame1Voice(vc_mse.testerIdUP ),
								                                 mw_frame2Voice(vc_mse.testerIdLP, p_cc),
@@ -383,8 +403,8 @@ module dPMR_TestCases {
						{
							v_sfCount := v_sfCount + 1; 
							if (v_sfCount <= c_maxNbrOfSfs) {
												repeat; }
											else {   // transmission exceeds max length for a single voice transmission
								repeat; 
							} else {   // transmission exceeds max length for a single voice transmission
								tc_ac.stop;
								log("**** f_TC_voiceTx_MS01: Too many Super frames received in a single voice burst ****");
								setverdict(inconc);
@@ -394,25 +414,117 @@ module dPMR_TestCases {
						{
							tc_ac.stop ;
							if (v_sfCount > 0) {
												setverdict(pass); }
											else {
								setverdict(pass);
							} else {
								log("**** f_TC_voiceTx_MS01: Error: No voice super frames received between header and end frame. ****");
								setverdict(inconc);
							} 
						}				
									[] tc_ac.timeout {
					  [] tc_ac.timeout
					  	{
							log("**** f_TC_voiceTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
							setverdict(fail);	
						}
					} // end alt
				} 
						else {
							log("**** f_TC_voiceTx_MS01: Error:  More headers received before voice super frames ****");
			  [] tc_ac.timeout
			  	{
					log("**** f_TC_voiceTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
					setverdict(fail);	
				}
			} // end alt
			f_clientSyncAndVerdict(c_tbDone, v_ret);

			deactivate;

		} // end function f_TC_voiceTx_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,
		* @param 	p_cc Colour Code
		*/
		function f_TC_VoiceWithAutomaticConnectionRequestTx_MS01 ( ColourCode p_cc )
		runs on Mse {
			// Variables
			var FncRetCode v_ret := e_success;
			var UInt16 v_sfCount := 0;
			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 fix here to do Header/end *send ack* header/payload/end
			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)))
						{
							dp1Port.send(	m_sendAck(m_headerInformation(e_ack,
														vc_mse.testerId, 
														vc_mse.iutId,
														e_voice, 
														e_p2p), p_cc));
							alt {
							  [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx(vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc))
								{
									alt {
									  [] dp1Port.receive(m_superFrame( mw_frame1Voice(vc_mse.testerIdUP ),
														                                 mw_frame2Voice(vc_mse.testerIdLP, p_cc),
																					     mw_frame3Voice(vc_mse.iutIdUP),
																					     mw_frame4Voice(vc_mse.iutIdLP,p_cc)))
										{
											v_sfCount := v_sfCount + 1; 
											if (v_sfCount <= c_maxNbrOfSfs)
											{
												repeat;
											} else {   // transmission exceeds max length for a single voice transmission
												tc_ac.stop;
												log("**** f_TC_VoiceWithAutomaticConnectionRequestTx_MS01: Too many Super frames received in a single voice burst ****");
												setverdict(inconc);
											}
										}				
									  [] dp1Port.receive(m_endFrame(mw_endInformation(e_noAckReq)))
										{
											tc_ac.stop ;
											if (v_sfCount > 0)
											{
												setverdict(pass);
											} else {
												log("**** f_TC_VoiceWithAutomaticConnectionRequestTx_MS01: Error: No voice super frames received between header and end frame. ****");
												setverdict(inconc);
											} 
										}				
				[] tc_ac.timeout {
						log("**** f_TC_voiceTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
									  [] tc_ac.timeout
									  	{
											log("**** f_TC_VoiceWithAutomaticConnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
											setverdict(fail);	
										}
									} // end alt
								} 
							  [] tc_ac.timeout
							  	{
									log("**** f_TC_VoiceWithAutomaticConnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
									setverdict(fail);	
								}
							} // end alt
						}
					} // end alt
				} 
			  [] tc_ac.timeout
				{
					log("**** f_TC_VoiceWithAutomaticConnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
					setverdict(fail);	
				}
			} // end alt
@@ -420,7 +532,7 @@ module dPMR_TestCases {

			deactivate;

		} // end function f_TC_voiceTx_MS01
		} // end function f_TC_VoiceWithAutomaticConnectionRequestTx_MS01

		/**
		* @desc	Check that a manual Connection Request is sent from the IUT
@@ -680,6 +792,41 @@ module dPMR_TestCases {

			}//end f_TC_msMakeManualConnectionRequest

	}//end ut_TC_Functions
					   /**
			* @desc This function commands Tester to make voice with automatic Connection Request.
			* @param 	p_cc Colour Code
			*/
			function f_TC_msVoiceWithAutomaticConnectionRequest(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, 
				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_msVoiceWithAutomaticConnectionRequest_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																								c_defaultPeerToPeerAddress , 
																								e_makeVoiceWithAutmaticConnectionRequest));
				//v_ret := f_handshake_Ut(m_msAct_utReq);
				//if (v_ret != e_success) {f_clientSyncAndVerdict(c_tbDone, v_ret);}

				//Default
				deactivate;

			}//end f_TC_msVoiceWithAutomaticConnectionRequest


	}//end group ut_TC_Functions

} // end module dPMR_TestCases
+2 −1
Original line number Diff line number Diff line
@@ -525,7 +525,8 @@ module dPMR_Types {
			e_statusMessageReceived (1), 	//Have you received a status message?
		   	e_testToneReceived (2),			//Have you heard a test tone?
		   	e_testToneNotReceived (3), 		//Have you NOT heard a test tone?
			e_makeManualConnectionRequest (4) // Make a manual Connection Request
			e_makeManualConnectionRequest (4), // Make a manual Connection Request
			e_makeVoiceWithAutmaticConnectionRequest (5) // Make a voice with Connection Request
		}

		// ------------ MS configuration parameters ---------------