Commit 6bd355ae authored by petersenj's avatar petersenj
Browse files

Implemented TC 0407_2 and changed some templates

parent e182488d
Loading
Loading
Loading
Loading
+51 −5
Original line number Diff line number Diff line
@@ -200,6 +200,52 @@
		} // end template mw_frame4Voice

		
		template Frame1 mw_frame1dataT1 ( CalledIdUP p_calledIdUP )  := {
			frameSync := c_fs2,
			frameNumber := e_frame1,
			calledIdUP := p_calledIdUP,
	   		communicationsMode := e_dataT1,
	        commsFormat := ?,
	        reserved2bit := c_reserved2bits,
	        slowData := c_slowDataInVoiceEmpty,
	        payload := ?
		} // end template mw_frame1Voice

	  	template Frame2 mw_frame2dataT1 ( CalledIdLP p_calledIdLP, ColourCode p_cc)  := {
			colourCode := p_cc,
			frameNumber := e_frame2,
			calledIdLP := p_calledIdLP,
	   		communicationsMode := e_dataT1,
	        commsFormat := ?,
	        reserved2bit := c_reserved2bits,
	        slowData := ?,
	        payload := ?
		} // end template mw_frame2Voice
 

	  	template Frame3 mw_frame3dataT1 ( OwnIdUP p_ownIdUP )  := {
			frameSync := c_fs2,
			frameNumber := e_frame3,
			ownIdUP := p_ownIdUP,
	   		communicationsMode := e_dataT1,
	        commsFormat := ?,
	        reserved2bit := c_reserved2bits,
	        slowData := ?,
	        payload := ?
		} // end template mw_frame3Voice


	  	template Frame4 mw_frame4dataT1 ( OwnIdLP p_ownIdLP, ColourCode p_cc)  := {
			colourCode := p_cc,
			frameNumber := e_frame4,
			ownIdLP := p_ownIdLP,
	   		communicationsMode := e_dataT1,
	        commsFormat := ?,
	        reserved2bit := c_reserved2bits,
	        slowData := ?,
	        payload := ?
		} // end template mw_frame4Voice

		template CallOrSrvReq m_callOrSrvReq( template HeaderFrame p_headerFrame ,
											  template EndFrame p_endFrame ) := {
				extHdrFrameList := omit ,
@@ -346,10 +392,10 @@
	  		reserved2bit := c_reserved2bits,
	  		callInformation := { 
			ciInformationNormalOrPws :=c_ciInformationNormal }
		} // end m_headerInformation
		} // end m_packetDataHeaderInformation

		
	 	template HeaderInformation  mw_headerInformationVoiceTx ( MsAddress p_calledId , 
	 	template HeaderInformation  mw_headerInformationTx ( MsAddress p_calledId , 
													      		  MsAddress    p_ownId, 
													      		  CommunicationsMode p_commMode,
													          	  CommsFormat p_commFormat
@@ -442,7 +488,7 @@
			utActParams := omit
		}

		template UtRequest m_msPressPttThenDekeyPtt_utRequest( ChannelNumber p_channelNumber, 
		template UtRequest m_commandISFCSF_utRequest( ChannelNumber p_channelNumber, 
		                                                       in template DialString p_dialstr ,
		                                                       in template Common_ID p_commonId, 
		                                                       UtActParams p_utActParameter) := {
@@ -450,11 +496,11 @@
					politeLvl  := omit ,
					callType   := omit ,
					dialString := p_dialstr,
					isfCidAddr := omit ,
					isfCidAddr := p_commonId ,
					utActParams := p_utActParameter
				}

	template UtRequest m_msMakeManualConnectionRequest_utRequest( ChannelNumber p_channelNumber, 
	template UtRequest m_commandCSF_utRequest( ChannelNumber p_channelNumber, 
		                                                       in template DialString p_dialstr ,
		                                                       UtActParams p_utActParameter) := {
			  		channelNr := p_channelNumber,
+200 −86
Original line number Diff line number Diff line
@@ -254,8 +254,8 @@ module dPMR_TestCases {
				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)); 
				v_mse.start(f_TC_T1DataWithAutomaticDisconnectionRequestTx_MS01(p_cc));
				v_ut.start(f_TC_msT1DataWithAutomaticDisconnectionRequest(p_cc)); 

				// synchronize both PTCs
				f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
@@ -529,13 +529,13 @@ module dPMR_TestCases {

			//Test Body
			tc_ac.start ;
			if (not f_handleVoiceConnectionRequest(p_cc)) {
			if (not f_handleConnectionRequest(p_cc, e_voice)) {
				tc_ac.stop ;
				log("**** f_TC_voiceTx_MS01: Error: Connection Request handling error. ****");
				setverdict(inconc);
			}
			alt {
			  [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx(
			  [] dp1Port.receive(m_headerFrame(mw_headerInformationTx(
													vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p),
				                                    p_cc))
				{
@@ -609,7 +609,7 @@ module dPMR_TestCases {
			//Test Body
			tc_ac.start ; 
			alt {
			  [] dp1Port.receive(m_headerFrame(mw_headerInformationVoiceTx(
			  [] dp1Port.receive(m_headerFrame(mw_headerInformationTx(
													vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p),
				                                    p_cc))
				{
@@ -622,7 +622,7 @@ module dPMR_TestCases {
														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))
							  [] dp1Port.receive(m_headerFrame(mw_headerInformationTx(vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p), p_cc))
								{
									alt {
									  [] dp1Port.receive(m_superFrame( mw_frame1Voice(vc_mse.testerIdUP ),
@@ -679,6 +679,135 @@ module dPMR_TestCases {

		} // end function f_TC_VoiceWithAutomaticConnectionRequestTx_MS01

		/**
		* @desc	Check that a data on T1 transmission from the MS (IUT) consists of a Header Frame, a list of
		*       Super Frames, and an End Frame, and that it is disconnected automatically with the disconnection request
		* @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_T1DataWithAutomaticDisconnectionRequestTx_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 ; 
			if (not f_handleConnectionRequest(p_cc, e_dataT1 )) {
				tc_ac.stop ;
				log("**** f_TC_voiceTx_MS01: Error: Connection Request handling error. ****");
				setverdict(inconc);
			}
			alt {
			  [] dp1Port.receive(m_headerFrame(mw_headerInformationTx(vc_mse.testerId, vc_mse.iutId, e_dataT1, e_p2p), p_cc))
				{
					alt { 
					  [] dp1Port.receive(m_superFrame( mw_frame1dataT1(vc_mse.testerIdUP ),
										               mw_frame2dataT1(vc_mse.testerIdLP, p_cc),
													   mw_frame3dataT1(vc_mse.iutIdUP),
													   mw_frame4dataT1(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_DataWithAutomaticDisconnectionRequestTx_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)
							{
								// receive disconnection request
								alt {
								  [] dp1Port.receive(m_headerFrame(mw_headerConnectRequestTx(
																		vc_mse.testerId, vc_mse.iutId, e_dataT1, 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_dataT1, e_p2p),
												                                    p_cc))
													{
														alt 
														{
														  [] dp1Port.receive(m_endFrame(mw_endInformation(e_AckReq)))
															{
																tc_ac.stop ;
																setverdict(pass); 
															}				
														  [] tc_ac.timeout
														  	{
																log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
																setverdict(fail);	
															}
														} // end alt
													}
												  [] tc_ac.timeout
												  	{
														log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
														setverdict(fail);	
													}
												} // end alt
											}
										  [] tc_ac.timeout
										  	{
												log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
												setverdict(fail);	
											}
										} // end alt
									}
								  [] tc_ac.timeout
								  	{
										log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of Connectio Request ****");
										setverdict(fail);	
									}
								} // end alt
							} else {
								log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Error: No voice super frames received between header and end frame. ****");
								setverdict(inconc);
							} 
						}				
					  [] tc_ac.timeout
					  	{
							log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_MS01: Timeout: TC Timer expiration before reception of complete Voice transmission ****");
							setverdict(fail);	
						}
					} // end alt
				} 
			  [] tc_ac.timeout
			  	{
					log("**** f_TC_DataWithAutomaticDisconnectionRequestTx_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_T1DataWithAutomaticDisconnectionRequestTx_MS01

		/**
		* @desc	Check that a manual Connection Request is sent from the IUT
		*       
@@ -735,7 +864,7 @@ module dPMR_TestCases {


		/**
		* @desc	Check that a manual Disconnection Request is sent from the IUT
		* @desc	Check that a manual Disconnection Request is sent from the IUT on dataT1
		*       
		* @param 	p_cc Colour Code
		*/
@@ -762,7 +891,7 @@ module dPMR_TestCases {
			tc_ac.start ;
			alt {
			  [] dp1Port.receive(m_headerFrame(mw_headerConnectRequestTx(
													vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p),
													vc_mse.testerId, vc_mse.iutId, e_dataT1, e_p2p),
				                                    p_cc))
				{
					alt {
@@ -773,7 +902,7 @@ module dPMR_TestCases {
							alt 
							{
							  [] dp1Port.receive(m_headerFrame(	mw_headerConnectRequestTx(
																vc_mse.testerId, vc_mse.iutId, e_voice, e_p2p),
																vc_mse.testerId, vc_mse.iutId, e_dataT1, e_p2p),
							                                    p_cc))
								{
									alt 
@@ -816,54 +945,6 @@ module dPMR_TestCases {

		} // 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
@@ -871,7 +952,7 @@ module dPMR_TestCases {
		* @param 	p_cc Colour Code
		*/
		// TODO change this tp handle DATA
		function f_handleDataConnectionRequest ( ColourCode p_cc)
		function f_handleConnectionRequest ( ColourCode p_cc,CommunicationsMode p_commMode )
		runs on Mse return boolean{
			// Check status on connection request
			var boolean retval := true;
@@ -882,8 +963,8 @@ module dPMR_TestCases {
				// 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),
				  [] dp1Port.receive(m_headerFrame(mw_headerInformationTx(
														vc_mse.testerId, vc_mse.iutId, p_commMode, e_p2p),
					                                    p_cc))
					{ 
						alt {
@@ -893,7 +974,7 @@ module dPMR_TestCases {
								dp1Port.send(	m_sendAck(m_headerInformation(e_ack,
															vc_mse.testerId, 
															vc_mse.iutId,
															e_voice, 
															p_commMode, 
															e_p2p), p_cc));
							}
						  [] tc_ac.timeout
@@ -1027,11 +1108,11 @@ module dPMR_TestCases {
				if (PIC_ISF_OR_CSF == e_isf) {
					v_ret := f_handshake_Ut(m_msToStandBy_utRequest(f_getChannelNrFromColourCode(p_cc), 
																	  omit, 
																	f_getCommonId(vc_ut.iutId)))
																	  f_getCommonId(vc_ut.iutId)));
				} else { // its e_csf
					v_ret := f_handshake_Ut(m_msToStandBy_utRequest(f_getChannelNrFromColourCode(p_cc), 
																	  fx_calcDialString(PXT_CSF_ADDRESS_IUT), 
																	omit))
																	  omit));
				}

				f_clientSyncAndVerdict(c_prDone, v_ret); 
@@ -1069,12 +1150,12 @@ module dPMR_TestCases {
			
				//Test body//TODO JP make it an f_handshake_Ut(m_testToneDetected_utReq)
				if (PIC_ISF_OR_CSF == e_isf) {
					v_ret := f_handshake_Ut(m_msPressPttThenDekeyPtt_utRequest(	f_getChannelNrFromColourCode(p_cc), 
					v_ret := f_handshake_Ut(m_commandISFCSF_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																		omit , 
																		f_getCommonId(vc_ut.iutId),
																		e_pressPtt));
				} else {
					v_ret := f_handshake_Ut(m_msPressPttThenDekeyPtt_utRequest(	f_getChannelNrFromColourCode(p_cc), 
					v_ret := f_handshake_Ut(m_commandISFCSF_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																		c_defaultCallGroup, 
																		omit , 
																		e_pressPtt));
@@ -1111,7 +1192,7 @@ module dPMR_TestCases {
				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_msMakeManualConnectionRequest_utRequest(	f_getChannelNrFromColourCode(p_cc), 
					v_ret := f_handshake_Ut(m_commandCSF_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																	c_defaultPeerToPeerAddress , 
																	e_makeManualConnectionRequest));
				//v_ret := f_handshake_Ut(m_msAct_utReq);
@@ -1145,7 +1226,7 @@ module dPMR_TestCases {
				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), 
					v_ret := f_handshake_Ut(m_commandCSF_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																	c_defaultPeerToPeerAddress , 
																	e_makeManualDisconnectionRequest));
				//v_ret := f_handshake_Ut(m_msAct_utReq);
@@ -1154,8 +1235,41 @@ module dPMR_TestCases {
				//Default
				deactivate;

			}//end f_TC_msMakeManualConnectionRequest
			}//end f_TC_msMakeManualDisconnectionRequest

 			/**
			* @desc This function commands Tester to make manual Connection Request.
			* @param 	p_cc Colour Code
			*/
			function f_TC_msT1DataWithAutomaticDisconnectionRequest(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_commandCSF_utRequest(f_getChannelNrFromColourCode(p_cc), 
																c_defaultPeerToPeerAddress , 
																e_makeT1DataWithAutomaticDisconnectionRequest));
				//v_ret := f_handshake_Ut(m_msAct_utReq);
				//if (v_ret != e_success) {f_clientSyncAndVerdict(c_tbDone, v_ret);}

				//Default
				deactivate;

			}//end f_TC_msT1DataWithAutomaticDisconnectionRequest
   	   /**
			* @desc This function commands Tester to make voice with automatic Connection Request.
			* @param 	p_cc Colour Code
@@ -1179,7 +1293,7 @@ module dPMR_TestCases {
				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), 
					v_ret := f_handshake_Ut(m_commandCSF_utRequest(	f_getChannelNrFromColourCode(p_cc), 
																	c_defaultPeerToPeerAddress , 
																	e_makeVoiceWithAutmaticConnectionRequest));
				//v_ret := f_handshake_Ut(m_msAct_utReq);