Loading ttcn/dPMR_ExtFunctions.ttcn +4 −4 Original line number Diff line number Diff line /* * @author STF 340 * @version $vx.x.x$ Loading @@ -19,9 +18,10 @@ module dPMR_ExtFunctions { //@Desc: fx_calcDialString calculates and returns the dialstring // that corresponds to the specified address. /* * @desc: fx_calcDialString calculates and returns the dialstring * that corresponds to the specified address. */ external function fx_calcDialString( CSFAddress p_addr ) return DialString; Loading ttcn/dPMR_Functions.ttcn +182 −118 Original line number Diff line number Diff line Loading @@ -25,12 +25,15 @@ group initFunctions { /* * @desc Init the Mse */ function f_initMse() runs on Simu { vc_mse.useAllCallCommonId := e_noAllCall; vc_mse.iutId := f_createMsAddress(); //(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_IUT) vc_mse.testerId := f_createMsAddress();//(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_TESTER) vc_mse.iutId := f_createMsAddress(true /* its IUT */); vc_mse.testerId := f_createMsAddress(false /* its not IUT (its Tester) */); vc_mse.iutIdUP := f_msAddress2Upper(vc_mse.iutId); vc_mse.iutIdLP := f_msAddress2Lower(vc_mse.iutId); vc_mse.testerIdUP := f_msAddress2Upper(vc_mse.testerId); Loading @@ -42,8 +45,8 @@ runs on Simu { vc_mse.useAllCallCommonId := p_useAllCallCommonId; vc_mse.iutId := f_createMsAddress(); //(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_IUT) vc_mse.testerId := f_createMsAddress();//(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_TESTER) vc_mse.iutId := f_createMsAddress(true /* its IUT */); vc_mse.testerId := f_createMsAddress(false /* its not IUT (its Tester) */); vc_mse.iutIdUP := f_msAddress2Upper(vc_mse.iutId); vc_mse.iutIdLP := f_msAddress2Lower(vc_mse.iutId); vc_mse.testerIdUP := f_msAddress2Upper(vc_mse.testerId); Loading @@ -60,32 +63,43 @@ * @desc The ISF MSUT is configured to use PXT_APPLICABLE_COMMON_ID. * An CSF MSUT does not need to be configured. It will receive * in the Header frame the CalledId and OwnId. * @param p_cc is the CoulourCode used */ function f_msConfigureRx(ColourCode p_cc) runs on Simu return FncRetCode { var FncRetCode v_ret := e_success; if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_msConfig_Ut( m_msCfgParamsIsfRx( p_cc, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); v_ret := f_msConfig_Ut( m_msCfgParamsIsfPoliteRx( p_cc, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } return v_ret; }//end f_msConfigureRx /* * @desc The ISF MSUT is configured to use PXT_APPLICABLE_COMMON_ID. * An CSF MSUT does not need to be configured. It will receive * in the Header frame the CalledId and OwnId. * @param p_cc is the CoulourCode used * @param p_politeLvl is the Polite level used * @param p_callType is the CallType used */ function f_msConfigureTx(ColourCode p_cc, PoliteLvl p_politeLvl, CallType p_callType) runs on Simu return FncRetCode { var FncRetCode v_ret := e_success; if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_iutMsTxInit_Ut(m_msCfgParamsIsfTx(p_cc, p_politeLvl, p_callType, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } v_ret := f_iutMsTxInit_Ut(m_msCfgParamsIsfPoliteTx(p_cc, p_politeLvl, p_callType, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } else { v_ret := f_iutMsTxInit_Ut(m_msCfgParamsCsfTx(p_cc, p_politeLvl, p_callType, fx_calcDialString(PXT_CSF_ADDRESS_TESTER)), v_ret); v_ret := f_iutMsTxInit_Ut(m_msCfgParamsCsfPoliteTx(p_cc, p_politeLvl, p_callType, fx_calcDialString(PXT_CSF_ADDRESS_TESTER)), v_ret); } return v_ret; }//end f_msConfigureTx }//end configFunctions /* * @desc Configure Upper Tester * @param p_msCfgParams MS config parameters * @param p_ret the return code */ function f_msConfig_Ut( template MsCfgParams p_msCfgParams , FncRetCode p_ret ) runs on Ut return FncRetCode{ if(p_ret != e_success){ Loading @@ -111,12 +125,14 @@ } return e_error; } // end f_msConfig_Ut } //end configFunctions //@Desc: f_iutMsTxInit_Ut is used to prepare the MS for transmission and // sets the following parameters // ColourCode // PoliteLvl (PoliteAll, PoliteCc, Impolite) // CallType (Voice, DataTp1, DataTp2, DataTp2) /* * @desc f_iutMsTxInit_Ut is used to prepare the MS for transmission and * sets the following parameters * @param p_msCfgParams MS config parameters * @param p_ret the return code */ function f_iutMsTxInit_Ut(template MsCfgParams p_msCfgParams, FncRetCode p_ret) runs on Ut return FncRetCode{ Loading Loading @@ -147,9 +163,12 @@ } //end f_iutMsTxInit_Ut //@Desc: f_iutMsAction_Ut is used to ask IUT ms to do following actions // Action Type:= PressPtt, DekeyPtt, /* * @desc: f_iutMsAction_Ut is used to ask IUT ms to do following actions * Action Type:= PressPtt, DekeyPtt, * @param p_msActParams MS config parameters * @param p_ret the return code */ function f_iutMsAction_Ut(template MsActParams p_msActParams, FncRetCode p_ret) runs on Ut return FncRetCode{ Loading @@ -161,10 +180,12 @@ } //end f_iutMsAction_Ut //@Desc: f_getCommonId returns the Common ID from an ISF address. // This function shall be called only with a ISF address, if called with // an CSF address it will return the reserved Common ID value 0. /* * @desc f_getCommonId returns the Common ID from an ISF address. * This function shall be called only with a ISF address, if called with * an CSF address it will return the reserved Common ID value 0. * @param p_msAddress where to get the Common Id */ function f_getCommonId( MsAddress p_msAddress ) runs on Ut return Common_ID { Loading @@ -177,98 +198,141 @@ group converterFunctions { /* * @desc f_getColourCode returns the Colour Code for ISF or CSF */ function f_getColourCode () runs on Simu return ColourCode { //TODO JP implement var ColourCode v_cc := { isfColourCode := '11111'B }; //if (PIC_ISF_OR_CSF) var ColourCode v_cc; if (PIC_ISF_OR_CSF == e_isf) { if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_0) { v_cc := { isfColourCode := c_grpAcf1 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_1) { v_cc := { isfColourCode := c_grpAcf2 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_2) { v_cc := { isfColourCode := c_grpAcf3 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_3) { v_cc := { isfColourCode := c_grpAcf4 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_4) { v_cc := { isfColourCode := c_grpAcf5 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_5) { v_cc := { isfColourCode := c_grpAcf6 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_6) { v_cc := { isfColourCode := c_grpAcf7 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_7) { v_cc := { isfColourCode := c_grpAcf8 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_8) { v_cc := { isfColourCode := c_grpAcf9 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_9) { v_cc := { isfColourCode := c_grpAcf10 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_10) { v_cc := { isfColourCode := c_grpAcf11 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_11) { v_cc := { isfColourCode := c_grpAcf12 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_12) { v_cc := { isfColourCode := c_grpAcf13 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_13) { v_cc := { isfColourCode := c_grpAcf14 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_14) { v_cc := { isfColourCode := c_grpAcf15 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_15) { v_cc := { isfColourCode := c_grpAcf16 };} } else { // e_csf if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_0) { v_cc := { csfColourCode := c_grpBcf1 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_1) { v_cc := { csfColourCode := c_grpBcf2 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_2) { v_cc := { csfColourCode := c_grpBcf3 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_3) { v_cc := { csfColourCode := c_grpBcf4 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_4) { v_cc := { csfColourCode := c_grpBcf5 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_5) { v_cc := { csfColourCode := c_grpBcf6 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_6) { v_cc := { csfColourCode := c_grpBcf7 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_7) { v_cc := { csfColourCode := c_grpBcf8 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_8) { v_cc := { csfColourCode := c_grpBcf9 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_9) { v_cc := { csfColourCode := c_grpBcf10 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_10) { v_cc := { csfColourCode := c_grpBcf11 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_11) { v_cc := { csfColourCode := c_grpBcf12 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_12) { v_cc := { csfColourCode := c_grpBcf13 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_13) { v_cc := { csfColourCode := c_grpBcf14 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_14) { v_cc := { csfColourCode := c_grpBcf15 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_15) { v_cc := { csfColourCode := c_grpBcf16 };} } return v_cc; } //end f_getColourCode function f_createMsAddress() /* * @desc f_createMsAddress returns an MsAddress. * * @param a booloan if the unit is IUT * @remark This function should perhaps be rewritten (split) , and the enumerated type UseAllCallCommonId removed */ function f_createMsAddress( boolean p_testingEntityIsIUT) runs on Simu return MsAddress { //TODO JP implement return {csfAddress := int2bit(12,24)} }//end f_createCalledId var MsAddress v_retAdr; if (PIC_ISF_OR_CSF == e_isf) { var ISFAddress v_retIsfAdr; if ((p_testingEntityIsIUT and ((vc_mse.useAllCallCommonId == e_iutUsesAllCallCommonId) or (vc_mse.useAllCallCommonId == e_testerAndIutUseAllCallCommonId))) or ((not p_testingEntityIsIUT) and ((vc_mse.useAllCallCommonId == e_testerUsesAllCallCommonId) or (vc_mse.useAllCallCommonId == e_testerAndIutUseAllCallCommonId)))) { v_retIsfAdr.common_ID := c_allCall; } else { v_retIsfAdr.common_ID := int2bit(PXT_APPLICABLE_COMMON_ID,c_commonIdLength); } v_retIsfAdr.fixedPart := c_isfFixedPart; v_retAdr := { isfAddress := v_retIsfAdr} } else { // e_csf v_retAdr := { csfAddress := f_getCsfAddress(p_testingEntityIsIUT) }; } return v_retAdr; }//end f_createMsAddress /* * @desc f_getCsfAddress returns an CSFAddress. * * @param a booloan if the unit is IUT * @remark This function should perhaps be rewritten (split) , and the enumerated type UseAllCallCommonId removed */ function f_getCsfAddress (boolean p_testingEntityIsIUT) runs on Simu return CSFAddress { var CSFAddress v_ret; if (p_testingEntityIsIUT) { v_ret :=PXT_CSF_ADDRESS_IUT; } else { // its for tester v_ret :=PXT_CSF_ADDRESS_TESTER; } return v_ret; } }//end converterFunctions group UtilityFunctions { //TODO JP chnage name to f_msAddress... /* * @desc f_msAddress2Upper returns upper part of the MsAddress. * * @param MsAddress */ function f_msAddress2Upper(MsAddress p_msAddress) return Bit12 { /* if (ischosen(p_calledId.isfAddress)) { var Common_Id v_commonId := p_calledId.isfAddress.common_ID; if (ischosen(p_msAddress.isfAddress)) { var bitstring v_bs_commanId := p_msAddress.isfAddress.common_ID; var bitstring v_bs_fixedPart := p_msAddress.isfAddress.fixedPart; return (v_bs_commanId << 4) or4b (v_bs_fixedPart >> 8); } else {//csf var bitstring v_bs_commanId := p_msAddress.csfAddress; return v_bs_commanId >> 12; } //var CalledIdUP p_tmp := CalledIdUP(p_calledId & 'FFF000'H); var CalledId t1 := p_calledId; var MSAddress t2 := p_calledId; var ISFAddress t3 := t2.isfAddress; var Common_ID t4 := t3.common_ID var FixedPart t5 := t3.fixedPart; var CalledIdUP retval; var CalledIdUP tmp; retval := '000000000000'B; retval := retval or4b t4; tmp := t5 and4b '1111000000000000'B; tmp := tmp >> 12; retval := retval or4b tmp; return retval; // nn := p_calledId; // oo := nn and4b 'FFF000'H; // return oo; */ return int2bit(0,12); } function f_msAddress2Lower(MsAddress p_msAddress) return Bit12 { /* var CalledId t1 := p_calledId; var MSAddress t2 := p_calledId; var ISFAddress t3 := t2.isfAddress; var Common_ID t4 := t3.common_ID var FixedPart t5 := t3.fixedPart; var CalledIdUP retval; var CalledIdUP tmp; retval := '000000000000'B; retval := retval or4b t4; tmp := t5 and4b '1111000000000000'B; tmp := tmp >> 12; retval := retval or4b tmp; return retval; */ return int2bit(0,12); /* * @desc f_msAddress2Upper returns lower part of the MsAddress. * * @param MsAddress */ function f_msAddress2Lower(MsAddress p_msAddress) return Bit12 { if (ischosen(p_msAddress.isfAddress)) { var bitstring v_bs_commanId := p_msAddress.isfAddress.common_ID; var bitstring v_bs_fixedPart := p_msAddress.isfAddress.fixedPart; return v_bs_fixedPart and4b c_lowerPartSelector; } else {//csf var bitstring v_bs_commanId := p_msAddress.csfAddress; return v_bs_commanId and4b c_lowerPartSelector; } } } //end UtilityFunctions Loading ttcn/dPMR_Messages.ttcn +1 −1 Original line number Diff line number Diff line /* * @author STF 340 * @version $vx.x.x$ *..@desc This module defines message types for digfital Public Mobile * @desc This module defines message types for digfital Public Mobile Radio (dPMR) upper Dynamic Link Layer (DLL) message. Message information elements are defined in the dPMR_types module. * @see dPMR_types Loading ttcn/dPMR_Pics.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ module dPMR_Pics { /* * @desc: Is the IUT an ISF or CSF entity? * @remark: see PICS, Table A.1/1. * @desc Is the IUT an ISF or CSF entity? * @remark see PICS, Table A.1/1. */ modulepar {Entity PIC_ISF_OR_CSF := e_isf} Loading ttcn/dPMR_Pixits.ttcn +53 −66 Original line number Diff line number Diff line Loading @@ -15,109 +15,96 @@ module dPMR_Pixits { import from dPMR_Values all; /* * @desc: ISF Channel Number to be used in ISF test cases. * @remark: see clause 6.1.5 * @desc ISF Channel Number to be used in ISF test cases. * @remark see clause 6.1.5 */ modulepar {IsfChannelNr PXT_ISF_CHANNEL_NR := e_isfChannelNr_0 } /* * @desc: ISF Channel Number to be used in ISF test cases. * @remark: see clause 6.1.5 * @desc ISF Channel Number to be used in CSF test cases. * @remark see clause 6.1.5 */ modulepar {CsfChannelNr PXT_CSF_CHANNEL_NR := e_csfChannelNr_0 } // @desc: Voice Test Tone for frame 1, 2, 3 and 4, must be chosen // They consist each of 4x72 bits of data, =288 bits /* * @desc Voice Test Tone for frame 1, 2, 3 and 4, must be chosen * They consist each of 4x72 bits of data, =288 bits */ modulepar {Payload PXT_VOICE_TEST_TONE_F1} modulepar {Payload PXT_VOICE_TEST_TONE_F2} modulepar {Payload PXT_VOICE_TEST_TONE_F3} modulepar {Payload PXT_VOICE_TEST_TONE_F4} // @desc: Type of call /* * @desc Type of call */ modulepar { CallType PXT_CALL_TYPE := e_voiceGrp } // @desc: Applicable Common Id used for ISF only /* * @desc Applicable Common Id used for ISF only */ modulepar {ApplicableCommonId PXT_APPLICABLE_COMMON_ID := 1} // @desc: Applicable Common Id used for ISF only /* * @desc Address of the Tester */ modulepar {CSFAddress PXT_CSF_ADDRESS_TESTER := '111111110000000000000001'B } /* * @desc Address of the IUT */ modulepar {CSFAddress PXT_CSF_ADDRESS_IUT := '111111110000000000000001'B } // @desc: Address value of IUT // modulepar {MSAddress PXT_TE_ADDRESS := { csfAddress := '111111110000000000000001'B }} // Note this value shall be overwritten. Only valid for CSF // @desc: Address value of IUT // modulepar {MSAddress PXT_IUT_ADDRESS := { csfAddress := '111111110000000000000001'B }} // Note this value shall be overwritten. Only valid for CSF // @desc: Value of IUT Address // modulepar {CalledId PXT_CALLED_ID} //:= {isfAddress := {commonID := '11111111'B, fixedPart := '0000000000000000'B}}} // @desc: Value of Tester Address // modulepar {OwnId PXT_OWN_ID } //:= '111111110000000000000001'B} // THE FOLLOWING 4 ADDRESS VALUES SHOULED BE DELETED AND REPLACED BY THE // TWO GENERAL ADDRESSES ABOVE // @desc: Value of IUT Address when TE transmits // modulepar {CalledId PXT_TE_TX_CALLED_ID := '111111110000000000000000'B} // @desc: Value of Tester Address when TE transmits // modulepar {OwnId PXT_TE_TX_OWN_ID := '111111110000000000000001'B} // @desc: Value of Tester Address when IUT transmits // modulepar {CalledId PXT_IUT_TX_CALLED_ID := '111111110000000000000000'B} // @desc: Value of IUT Address when IUT transmits // modulepar {OwnId PXT_IUT_TX_OWN_ID := '111111110000000000000001'B} // @desc: The politeness level to be used by the IUT attempts to transmit /* * @desc The politeness level to be used by the IUT attempts to transmit */ modulepar {PoliteLvl PXT_POLITE_LVL := e_impolite} // @desc: The ISF common ID used by IUT /* * @desc The ISF common ID used by IUT */ modulepar {Common_ID PXT_ISF_COM_ID := '00000001'B} // @desc: The Dialstring of the CSF address to be dialled by the IUT /* * @desc The Dialstring of the CSF address to be dialled by the IUT */ modulepar { DialString PXT_CSF_DIALSTRING := "1234567" } // @desc: Max Time of IUT sending back response of configuration/action's func/msg /* * @desc Max Time of IUT sending back response of configuration/action's func/msg */ modulepar {float PXT_MAX_TIME_CFG_ACT_RLY := 200E-3} // Value To be checked !!! /* @desc Guard timer to control a reaction from the IUT to a stimulus sent by the tester (e.g. a message). On expiry of this timer, the IUT is considered not to be be able to send the expected response /* * @desc Guard timer to control a reaction from the IUT to a stimulus sent by the tester (e.g. a message). * On expiry of this timer, the IUT is considered not to be be able to send the expected response */ modulepar {float PXT_TAC := 2.0} // @desc Guard timer to control a non-reaction from the IUT to a stimulus sent by the tester (e.g. a message). // On expiry of this timer, it is considered that, as it is expected in the test purpose, // the IUT has not responded to the stimulus /* * @desc Guard timer to control a non-reaction from the IUT to a stimulus sent by the tester (e.g. a message). * On expiry of this timer, it is considered that, as it is expected in the test purpose, * the IUT has not responded to the stimulus */ modulepar {float PXT_TNOAC := 5.0} // @desc Wait for an implicit send. This guard timer is used to limitated the time where the tester is waiting // for the response of the IUT that is triggered out by an action from the test operator. // On expiry of this timer, it is considered that the action will not succeed, and thus the test case will be terminated. /* * @desc Wait for an implicit send. This guard timer is used to limitated the time where the tester is waiting * for the response of the IUT that is triggered out by an action from the test operator. * On expiry of this timer, it is considered that the action will not succeed, and thus the test case will be terminated. */ modulepar {float PXT_TWAIT := 60.0} // @desc: Time of Max Case Execution /* * @desc Time of Max Case Execution */ modulepar {float PXT_MAX_CASE_EXEC_PERIOD := 5000E-3} } // end module dPMR_Pixits Loading
ttcn/dPMR_ExtFunctions.ttcn +4 −4 Original line number Diff line number Diff line /* * @author STF 340 * @version $vx.x.x$ Loading @@ -19,9 +18,10 @@ module dPMR_ExtFunctions { //@Desc: fx_calcDialString calculates and returns the dialstring // that corresponds to the specified address. /* * @desc: fx_calcDialString calculates and returns the dialstring * that corresponds to the specified address. */ external function fx_calcDialString( CSFAddress p_addr ) return DialString; Loading
ttcn/dPMR_Functions.ttcn +182 −118 Original line number Diff line number Diff line Loading @@ -25,12 +25,15 @@ group initFunctions { /* * @desc Init the Mse */ function f_initMse() runs on Simu { vc_mse.useAllCallCommonId := e_noAllCall; vc_mse.iutId := f_createMsAddress(); //(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_IUT) vc_mse.testerId := f_createMsAddress();//(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_TESTER) vc_mse.iutId := f_createMsAddress(true /* its IUT */); vc_mse.testerId := f_createMsAddress(false /* its not IUT (its Tester) */); vc_mse.iutIdUP := f_msAddress2Upper(vc_mse.iutId); vc_mse.iutIdLP := f_msAddress2Lower(vc_mse.iutId); vc_mse.testerIdUP := f_msAddress2Upper(vc_mse.testerId); Loading @@ -42,8 +45,8 @@ runs on Simu { vc_mse.useAllCallCommonId := p_useAllCallCommonId; vc_mse.iutId := f_createMsAddress(); //(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_IUT) vc_mse.testerId := f_createMsAddress();//(PIC_ISF_OR_CSF, vc_mse.useAllCallCommonId, PXT_APPLICABLE_COMMON_ID,PXT_CSF_ADDRESS_TESTER) vc_mse.iutId := f_createMsAddress(true /* its IUT */); vc_mse.testerId := f_createMsAddress(false /* its not IUT (its Tester) */); vc_mse.iutIdUP := f_msAddress2Upper(vc_mse.iutId); vc_mse.iutIdLP := f_msAddress2Lower(vc_mse.iutId); vc_mse.testerIdUP := f_msAddress2Upper(vc_mse.testerId); Loading @@ -60,32 +63,43 @@ * @desc The ISF MSUT is configured to use PXT_APPLICABLE_COMMON_ID. * An CSF MSUT does not need to be configured. It will receive * in the Header frame the CalledId and OwnId. * @param p_cc is the CoulourCode used */ function f_msConfigureRx(ColourCode p_cc) runs on Simu return FncRetCode { var FncRetCode v_ret := e_success; if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_msConfig_Ut( m_msCfgParamsIsfRx( p_cc, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); v_ret := f_msConfig_Ut( m_msCfgParamsIsfPoliteRx( p_cc, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } return v_ret; }//end f_msConfigureRx /* * @desc The ISF MSUT is configured to use PXT_APPLICABLE_COMMON_ID. * An CSF MSUT does not need to be configured. It will receive * in the Header frame the CalledId and OwnId. * @param p_cc is the CoulourCode used * @param p_politeLvl is the Polite level used * @param p_callType is the CallType used */ function f_msConfigureTx(ColourCode p_cc, PoliteLvl p_politeLvl, CallType p_callType) runs on Simu return FncRetCode { var FncRetCode v_ret := e_success; if (PIC_ISF_OR_CSF == e_isf) { v_ret := f_iutMsTxInit_Ut(m_msCfgParamsIsfTx(p_cc, p_politeLvl, p_callType, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } v_ret := f_iutMsTxInit_Ut(m_msCfgParamsIsfPoliteTx(p_cc, p_politeLvl, p_callType, int2bit(PXT_APPLICABLE_COMMON_ID,8)), v_ret); } else { v_ret := f_iutMsTxInit_Ut(m_msCfgParamsCsfTx(p_cc, p_politeLvl, p_callType, fx_calcDialString(PXT_CSF_ADDRESS_TESTER)), v_ret); v_ret := f_iutMsTxInit_Ut(m_msCfgParamsCsfPoliteTx(p_cc, p_politeLvl, p_callType, fx_calcDialString(PXT_CSF_ADDRESS_TESTER)), v_ret); } return v_ret; }//end f_msConfigureTx }//end configFunctions /* * @desc Configure Upper Tester * @param p_msCfgParams MS config parameters * @param p_ret the return code */ function f_msConfig_Ut( template MsCfgParams p_msCfgParams , FncRetCode p_ret ) runs on Ut return FncRetCode{ if(p_ret != e_success){ Loading @@ -111,12 +125,14 @@ } return e_error; } // end f_msConfig_Ut } //end configFunctions //@Desc: f_iutMsTxInit_Ut is used to prepare the MS for transmission and // sets the following parameters // ColourCode // PoliteLvl (PoliteAll, PoliteCc, Impolite) // CallType (Voice, DataTp1, DataTp2, DataTp2) /* * @desc f_iutMsTxInit_Ut is used to prepare the MS for transmission and * sets the following parameters * @param p_msCfgParams MS config parameters * @param p_ret the return code */ function f_iutMsTxInit_Ut(template MsCfgParams p_msCfgParams, FncRetCode p_ret) runs on Ut return FncRetCode{ Loading Loading @@ -147,9 +163,12 @@ } //end f_iutMsTxInit_Ut //@Desc: f_iutMsAction_Ut is used to ask IUT ms to do following actions // Action Type:= PressPtt, DekeyPtt, /* * @desc: f_iutMsAction_Ut is used to ask IUT ms to do following actions * Action Type:= PressPtt, DekeyPtt, * @param p_msActParams MS config parameters * @param p_ret the return code */ function f_iutMsAction_Ut(template MsActParams p_msActParams, FncRetCode p_ret) runs on Ut return FncRetCode{ Loading @@ -161,10 +180,12 @@ } //end f_iutMsAction_Ut //@Desc: f_getCommonId returns the Common ID from an ISF address. // This function shall be called only with a ISF address, if called with // an CSF address it will return the reserved Common ID value 0. /* * @desc f_getCommonId returns the Common ID from an ISF address. * This function shall be called only with a ISF address, if called with * an CSF address it will return the reserved Common ID value 0. * @param p_msAddress where to get the Common Id */ function f_getCommonId( MsAddress p_msAddress ) runs on Ut return Common_ID { Loading @@ -177,98 +198,141 @@ group converterFunctions { /* * @desc f_getColourCode returns the Colour Code for ISF or CSF */ function f_getColourCode () runs on Simu return ColourCode { //TODO JP implement var ColourCode v_cc := { isfColourCode := '11111'B }; //if (PIC_ISF_OR_CSF) var ColourCode v_cc; if (PIC_ISF_OR_CSF == e_isf) { if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_0) { v_cc := { isfColourCode := c_grpAcf1 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_1) { v_cc := { isfColourCode := c_grpAcf2 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_2) { v_cc := { isfColourCode := c_grpAcf3 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_3) { v_cc := { isfColourCode := c_grpAcf4 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_4) { v_cc := { isfColourCode := c_grpAcf5 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_5) { v_cc := { isfColourCode := c_grpAcf6 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_6) { v_cc := { isfColourCode := c_grpAcf7 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_7) { v_cc := { isfColourCode := c_grpAcf8 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_8) { v_cc := { isfColourCode := c_grpAcf9 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_9) { v_cc := { isfColourCode := c_grpAcf10 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_10) { v_cc := { isfColourCode := c_grpAcf11 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_11) { v_cc := { isfColourCode := c_grpAcf12 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_12) { v_cc := { isfColourCode := c_grpAcf13 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_13) { v_cc := { isfColourCode := c_grpAcf14 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_14) { v_cc := { isfColourCode := c_grpAcf15 };} if (PXT_ISF_CHANNEL_NR == e_isfChannelNr_15) { v_cc := { isfColourCode := c_grpAcf16 };} } else { // e_csf if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_0) { v_cc := { csfColourCode := c_grpBcf1 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_1) { v_cc := { csfColourCode := c_grpBcf2 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_2) { v_cc := { csfColourCode := c_grpBcf3 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_3) { v_cc := { csfColourCode := c_grpBcf4 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_4) { v_cc := { csfColourCode := c_grpBcf5 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_5) { v_cc := { csfColourCode := c_grpBcf6 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_6) { v_cc := { csfColourCode := c_grpBcf7 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_7) { v_cc := { csfColourCode := c_grpBcf8 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_8) { v_cc := { csfColourCode := c_grpBcf9 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_9) { v_cc := { csfColourCode := c_grpBcf10 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_10) { v_cc := { csfColourCode := c_grpBcf11 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_11) { v_cc := { csfColourCode := c_grpBcf12 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_12) { v_cc := { csfColourCode := c_grpBcf13 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_13) { v_cc := { csfColourCode := c_grpBcf14 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_14) { v_cc := { csfColourCode := c_grpBcf15 };} if (PXT_CSF_CHANNEL_NR == e_csfChannelNr_15) { v_cc := { csfColourCode := c_grpBcf16 };} } return v_cc; } //end f_getColourCode function f_createMsAddress() /* * @desc f_createMsAddress returns an MsAddress. * * @param a booloan if the unit is IUT * @remark This function should perhaps be rewritten (split) , and the enumerated type UseAllCallCommonId removed */ function f_createMsAddress( boolean p_testingEntityIsIUT) runs on Simu return MsAddress { //TODO JP implement return {csfAddress := int2bit(12,24)} }//end f_createCalledId var MsAddress v_retAdr; if (PIC_ISF_OR_CSF == e_isf) { var ISFAddress v_retIsfAdr; if ((p_testingEntityIsIUT and ((vc_mse.useAllCallCommonId == e_iutUsesAllCallCommonId) or (vc_mse.useAllCallCommonId == e_testerAndIutUseAllCallCommonId))) or ((not p_testingEntityIsIUT) and ((vc_mse.useAllCallCommonId == e_testerUsesAllCallCommonId) or (vc_mse.useAllCallCommonId == e_testerAndIutUseAllCallCommonId)))) { v_retIsfAdr.common_ID := c_allCall; } else { v_retIsfAdr.common_ID := int2bit(PXT_APPLICABLE_COMMON_ID,c_commonIdLength); } v_retIsfAdr.fixedPart := c_isfFixedPart; v_retAdr := { isfAddress := v_retIsfAdr} } else { // e_csf v_retAdr := { csfAddress := f_getCsfAddress(p_testingEntityIsIUT) }; } return v_retAdr; }//end f_createMsAddress /* * @desc f_getCsfAddress returns an CSFAddress. * * @param a booloan if the unit is IUT * @remark This function should perhaps be rewritten (split) , and the enumerated type UseAllCallCommonId removed */ function f_getCsfAddress (boolean p_testingEntityIsIUT) runs on Simu return CSFAddress { var CSFAddress v_ret; if (p_testingEntityIsIUT) { v_ret :=PXT_CSF_ADDRESS_IUT; } else { // its for tester v_ret :=PXT_CSF_ADDRESS_TESTER; } return v_ret; } }//end converterFunctions group UtilityFunctions { //TODO JP chnage name to f_msAddress... /* * @desc f_msAddress2Upper returns upper part of the MsAddress. * * @param MsAddress */ function f_msAddress2Upper(MsAddress p_msAddress) return Bit12 { /* if (ischosen(p_calledId.isfAddress)) { var Common_Id v_commonId := p_calledId.isfAddress.common_ID; if (ischosen(p_msAddress.isfAddress)) { var bitstring v_bs_commanId := p_msAddress.isfAddress.common_ID; var bitstring v_bs_fixedPart := p_msAddress.isfAddress.fixedPart; return (v_bs_commanId << 4) or4b (v_bs_fixedPart >> 8); } else {//csf var bitstring v_bs_commanId := p_msAddress.csfAddress; return v_bs_commanId >> 12; } //var CalledIdUP p_tmp := CalledIdUP(p_calledId & 'FFF000'H); var CalledId t1 := p_calledId; var MSAddress t2 := p_calledId; var ISFAddress t3 := t2.isfAddress; var Common_ID t4 := t3.common_ID var FixedPart t5 := t3.fixedPart; var CalledIdUP retval; var CalledIdUP tmp; retval := '000000000000'B; retval := retval or4b t4; tmp := t5 and4b '1111000000000000'B; tmp := tmp >> 12; retval := retval or4b tmp; return retval; // nn := p_calledId; // oo := nn and4b 'FFF000'H; // return oo; */ return int2bit(0,12); } function f_msAddress2Lower(MsAddress p_msAddress) return Bit12 { /* var CalledId t1 := p_calledId; var MSAddress t2 := p_calledId; var ISFAddress t3 := t2.isfAddress; var Common_ID t4 := t3.common_ID var FixedPart t5 := t3.fixedPart; var CalledIdUP retval; var CalledIdUP tmp; retval := '000000000000'B; retval := retval or4b t4; tmp := t5 and4b '1111000000000000'B; tmp := tmp >> 12; retval := retval or4b tmp; return retval; */ return int2bit(0,12); /* * @desc f_msAddress2Upper returns lower part of the MsAddress. * * @param MsAddress */ function f_msAddress2Lower(MsAddress p_msAddress) return Bit12 { if (ischosen(p_msAddress.isfAddress)) { var bitstring v_bs_commanId := p_msAddress.isfAddress.common_ID; var bitstring v_bs_fixedPart := p_msAddress.isfAddress.fixedPart; return v_bs_fixedPart and4b c_lowerPartSelector; } else {//csf var bitstring v_bs_commanId := p_msAddress.csfAddress; return v_bs_commanId and4b c_lowerPartSelector; } } } //end UtilityFunctions Loading
ttcn/dPMR_Messages.ttcn +1 −1 Original line number Diff line number Diff line /* * @author STF 340 * @version $vx.x.x$ *..@desc This module defines message types for digfital Public Mobile * @desc This module defines message types for digfital Public Mobile Radio (dPMR) upper Dynamic Link Layer (DLL) message. Message information elements are defined in the dPMR_types module. * @see dPMR_types Loading
ttcn/dPMR_Pics.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ module dPMR_Pics { /* * @desc: Is the IUT an ISF or CSF entity? * @remark: see PICS, Table A.1/1. * @desc Is the IUT an ISF or CSF entity? * @remark see PICS, Table A.1/1. */ modulepar {Entity PIC_ISF_OR_CSF := e_isf} Loading
ttcn/dPMR_Pixits.ttcn +53 −66 Original line number Diff line number Diff line Loading @@ -15,109 +15,96 @@ module dPMR_Pixits { import from dPMR_Values all; /* * @desc: ISF Channel Number to be used in ISF test cases. * @remark: see clause 6.1.5 * @desc ISF Channel Number to be used in ISF test cases. * @remark see clause 6.1.5 */ modulepar {IsfChannelNr PXT_ISF_CHANNEL_NR := e_isfChannelNr_0 } /* * @desc: ISF Channel Number to be used in ISF test cases. * @remark: see clause 6.1.5 * @desc ISF Channel Number to be used in CSF test cases. * @remark see clause 6.1.5 */ modulepar {CsfChannelNr PXT_CSF_CHANNEL_NR := e_csfChannelNr_0 } // @desc: Voice Test Tone for frame 1, 2, 3 and 4, must be chosen // They consist each of 4x72 bits of data, =288 bits /* * @desc Voice Test Tone for frame 1, 2, 3 and 4, must be chosen * They consist each of 4x72 bits of data, =288 bits */ modulepar {Payload PXT_VOICE_TEST_TONE_F1} modulepar {Payload PXT_VOICE_TEST_TONE_F2} modulepar {Payload PXT_VOICE_TEST_TONE_F3} modulepar {Payload PXT_VOICE_TEST_TONE_F4} // @desc: Type of call /* * @desc Type of call */ modulepar { CallType PXT_CALL_TYPE := e_voiceGrp } // @desc: Applicable Common Id used for ISF only /* * @desc Applicable Common Id used for ISF only */ modulepar {ApplicableCommonId PXT_APPLICABLE_COMMON_ID := 1} // @desc: Applicable Common Id used for ISF only /* * @desc Address of the Tester */ modulepar {CSFAddress PXT_CSF_ADDRESS_TESTER := '111111110000000000000001'B } /* * @desc Address of the IUT */ modulepar {CSFAddress PXT_CSF_ADDRESS_IUT := '111111110000000000000001'B } // @desc: Address value of IUT // modulepar {MSAddress PXT_TE_ADDRESS := { csfAddress := '111111110000000000000001'B }} // Note this value shall be overwritten. Only valid for CSF // @desc: Address value of IUT // modulepar {MSAddress PXT_IUT_ADDRESS := { csfAddress := '111111110000000000000001'B }} // Note this value shall be overwritten. Only valid for CSF // @desc: Value of IUT Address // modulepar {CalledId PXT_CALLED_ID} //:= {isfAddress := {commonID := '11111111'B, fixedPart := '0000000000000000'B}}} // @desc: Value of Tester Address // modulepar {OwnId PXT_OWN_ID } //:= '111111110000000000000001'B} // THE FOLLOWING 4 ADDRESS VALUES SHOULED BE DELETED AND REPLACED BY THE // TWO GENERAL ADDRESSES ABOVE // @desc: Value of IUT Address when TE transmits // modulepar {CalledId PXT_TE_TX_CALLED_ID := '111111110000000000000000'B} // @desc: Value of Tester Address when TE transmits // modulepar {OwnId PXT_TE_TX_OWN_ID := '111111110000000000000001'B} // @desc: Value of Tester Address when IUT transmits // modulepar {CalledId PXT_IUT_TX_CALLED_ID := '111111110000000000000000'B} // @desc: Value of IUT Address when IUT transmits // modulepar {OwnId PXT_IUT_TX_OWN_ID := '111111110000000000000001'B} // @desc: The politeness level to be used by the IUT attempts to transmit /* * @desc The politeness level to be used by the IUT attempts to transmit */ modulepar {PoliteLvl PXT_POLITE_LVL := e_impolite} // @desc: The ISF common ID used by IUT /* * @desc The ISF common ID used by IUT */ modulepar {Common_ID PXT_ISF_COM_ID := '00000001'B} // @desc: The Dialstring of the CSF address to be dialled by the IUT /* * @desc The Dialstring of the CSF address to be dialled by the IUT */ modulepar { DialString PXT_CSF_DIALSTRING := "1234567" } // @desc: Max Time of IUT sending back response of configuration/action's func/msg /* * @desc Max Time of IUT sending back response of configuration/action's func/msg */ modulepar {float PXT_MAX_TIME_CFG_ACT_RLY := 200E-3} // Value To be checked !!! /* @desc Guard timer to control a reaction from the IUT to a stimulus sent by the tester (e.g. a message). On expiry of this timer, the IUT is considered not to be be able to send the expected response /* * @desc Guard timer to control a reaction from the IUT to a stimulus sent by the tester (e.g. a message). * On expiry of this timer, the IUT is considered not to be be able to send the expected response */ modulepar {float PXT_TAC := 2.0} // @desc Guard timer to control a non-reaction from the IUT to a stimulus sent by the tester (e.g. a message). // On expiry of this timer, it is considered that, as it is expected in the test purpose, // the IUT has not responded to the stimulus /* * @desc Guard timer to control a non-reaction from the IUT to a stimulus sent by the tester (e.g. a message). * On expiry of this timer, it is considered that, as it is expected in the test purpose, * the IUT has not responded to the stimulus */ modulepar {float PXT_TNOAC := 5.0} // @desc Wait for an implicit send. This guard timer is used to limitated the time where the tester is waiting // for the response of the IUT that is triggered out by an action from the test operator. // On expiry of this timer, it is considered that the action will not succeed, and thus the test case will be terminated. /* * @desc Wait for an implicit send. This guard timer is used to limitated the time where the tester is waiting * for the response of the IUT that is triggered out by an action from the test operator. * On expiry of this timer, it is considered that the action will not succeed, and thus the test case will be terminated. */ modulepar {float PXT_TWAIT := 60.0} // @desc: Time of Max Case Execution /* * @desc Time of Max Case Execution */ modulepar {float PXT_MAX_CASE_EXEC_PERIOD := 5000E-3} } // end module dPMR_Pixits