Loading ttcn/AtsECall_IVS_Testcases.ttcn +12 −12 Original line number Diff line number Diff line Loading @@ -586,7 +586,7 @@ module AtsECall_IVS_Testcases { c_mbYes); f_mnoExpect(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)); mno.send(m_callAccept(PX_WORKER)); callControl.send(m_callAccept(PX_WORKER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_verifyMSD(PX_ECALL_MESSAGE); Loading Loading @@ -1284,7 +1284,7 @@ module AtsECall_IVS_Testcases { var TimerExpiredEvent v_t8Expired; var integer v_lastNackDelta; timer t := PX_TIMEOUT; var ModemConfiguration v_locaPsapSimCfg := modifies c_defaultPsapSimulatorConfiguration := {simulateCrcError := true} var ModemConfiguration v_locaPsapSimCfg := modifies c_defaultPsapSimulatorConfiguration := {noAckOfMsd := true} // Test component configuration f_configIvsUp(v_locaPsapSimCfg); Loading Loading @@ -1383,7 +1383,7 @@ module AtsECall_IVS_Testcases { "IVS did not clear down the call following receipt of a clear down message from the network", c_mbYes); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); f_adapterExpect(mw_anyConfigChanged); // AL-ACK clear down Loading Loading @@ -1434,7 +1434,7 @@ module AtsECall_IVS_Testcases { // Local variables var ExpectResult v_feedback; var CallEstablishedEvent v_callEstablished; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; var integer v_diff; timer t_t2 := c_t2_timer + PX_CTP_1_1_16_2_HANG_UP_RANGE; Loading @@ -1454,8 +1454,8 @@ module AtsECall_IVS_Testcases { f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER)); alt { [] mno.receive(mw_anyCallHangUp) -> value v_mnoEvent { v_diff := fx_timeDiff(v_callEstablished.time, v_mnoEvent.callHangUp.time); [] callControl.receive(mw_anyCallHangUp) -> value v_callEvent { v_diff := fx_timeDiff(v_callEstablished.time, v_callEvent.callHangUp.time); if (v_diff < float2int(c_t2_timer * 1000.0 - PX_CTP_1_1_16_2_HANG_UP_RANGE)) { setverdict(fail, "IVS cleared down call before T2 expired") Loading Loading @@ -1593,7 +1593,7 @@ module AtsECall_IVS_Testcases { msgTimeout := MESSAGEBOX_DISPLAY_TIME }); mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_verifyMSD(ANY_DECODED_ECALL); Loading Loading @@ -1661,7 +1661,7 @@ module AtsECall_IVS_Testcases { f_clearDown(NETWORK, 10.0); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); f_adapterExpect(mw_anyConfigChanged); uiPort.send(ShowMessageBox: { Loading @@ -1687,7 +1687,7 @@ module AtsECall_IVS_Testcases { } } mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); // Test Body Loading Loading @@ -1777,12 +1777,12 @@ module AtsECall_IVS_Testcases { f_mnoExpect(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); f_adapterExpect(mw_anyConfigChanged); t_callbackDelay.start; mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_userVerify("Was the call-back automatically answered by the IVS?", Loading Loading @@ -1907,7 +1907,7 @@ module AtsECall_IVS_Testcases { } } mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER)); Loading ttcn/LibItsECall_Functions.ttcn +61 −38 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ module LibItsECall_Functions { import from LibItsECall_TypesAndValues all; import from LibItsECall_Pixits all; import from LibItsECall_Templates all; import from LibItsECall_Pics all; import from MSDASN1Module language "ASN.1:1997" all with { encode "MSDEncode"; Loading Loading @@ -109,7 +110,7 @@ module LibItsECall_Functions { f_mnoExpect(mw_callIncoming(PX_WORKER, ?, p_ivsNumber, p_psapNumber, EXTERNAL)); mno.send(m_callAccept(PX_WORKER)); callControl.send(m_callAccept(PX_WORKER)); v_feedback := f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); if (v_feedback.failure == true) { Loading Loading @@ -166,10 +167,10 @@ module LibItsECall_Functions { t_hangUpTimer.timeout; } mno.send(m_callHangUpC(PX_WORKER)); callControl.send(m_callHangUpC(PX_WORKER)); } else { modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); f_adapterExpect(mw_anyConfigChanged); modem.send(m_inbandRequestMsd(PX_WORKER)); Loading @@ -184,7 +185,7 @@ module LibItsECall_Functions { function f_setMSD(ECallMessageUnion p_eCall) runs on IvsMtc { var ModemConfiguration v_newConfig := {eCallMessage := p_eCall}; modem.send(m_setConfig(PX_WORKERS[0].id, v_newConfig)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, v_newConfig)); } /** Loading Loading @@ -272,10 +273,10 @@ module LibItsECall_Functions { vc_eCallMessage := v_eCallMessageExpanded; //TODO create equivalent for Psap Mtc modem.send(m_setConfig(PX_WORKERS[0].id, v_psapConfig)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, v_psapConfig)); // f_adapterExpect(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, ?), p_ignoreOtherMessages := true); modem.send(m_setConfig(PX_WORKERS[0].id, p_configuration)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, p_configuration)); // f_adapterExpect(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, p_configuration), p_ignoreOtherMessages := true); } Loading Loading @@ -324,9 +325,9 @@ module LibItsECall_Functions { * @param p_ignoreOtherMessages Whether other events shall be ignored or not * @return FeedbackResult Received event if reception is successful, or failure */ function f_mnoExpect(template MnoEvent p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on PsapMtc return ExpectResult { function f_mnoExpect(template CallEvent p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on PsapMtc return ExpectResult { timer t := p_event_timeout; var MnoEvent v_received; var CallEvent v_received; var ExpectResult v_result; v_result.failure := false; Loading @@ -336,12 +337,12 @@ module LibItsECall_Functions { t.start; alt { [] mno.receive(p_e) -> value v_received { [] callControl.receive(p_e) -> value v_received { v_result.mnoEvent := v_received; t.stop; } [p_ignoreOtherMessages] mno.receive { [p_ignoreOtherMessages] callControl.receive { repeat; } Loading Loading @@ -379,7 +380,7 @@ module LibItsECall_Functions { t.stop; } [p_ignoreOtherMessages] mno.receive { [p_ignoreOtherMessages] callControl.receive { repeat; } Loading Loading @@ -450,17 +451,29 @@ module LibItsECall_Functions { } p_eCallMessage.decoded.msd.msdStructure.timestamp := ?; p_eCallMessage.decoded.msd.msdStructure.numberOfPassengers := *; if (not PC_MSD_numberOfPassengers) { p_eCallMessage.decoded.msd.msdStructure.numberOfPassengers := ?; } if (not PC_MSD_optionalAdditionalData) { p_eCallMessage.decoded.msd.optionalAdditionalData := *; } if (PX_IGNORE_MSD_POSITION) { p_eCallMessage.decoded.msd.msdStructure.control_.positionCanBeTrusted := ?; p_eCallMessage.decoded.msd.msdStructure.vehicleLocation := ?; p_eCallMessage.decoded.msd.msdStructure.vehicleDirection := ?; if (not PC_MSD_recentVehicleLocationN1) { p_eCallMessage.decoded.msd.msdStructure.recentVehicleLocationN1 := *; } if (not PC_MSD_recentVehicleLocationN2) { p_eCallMessage.decoded.msd.msdStructure.recentVehicleLocationN2 := *; } } } return p_eCallMessage; } Loading @@ -483,7 +496,7 @@ module LibItsECall_Functions { */ altstep a_defaultIvs() runs on IvsMtc { var Event v_modemEvent; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; [] modem.receive(LogMessage:?) { repeat; Loading Loading @@ -517,30 +530,34 @@ module LibItsECall_Functions { repeat; } [] modem.receive(mw_timerExpired(p_worker := PX_WORKERS[0].id)) -> value v_modemEvent { f_stopPsapTestcase(fail, "Timer " & v_modemEvent.timerExpired.name & " expired"); } [] mno.receive(mw_anyCallOutgoing) { [] callControl.receive(mw_anyCallOutgoing) { repeat; } [] mno.receive(mw_callEstablished(PX_WORKERS[0].id, ?, INTERNAL)) { [] callControl.receive(mw_callEstablished(PX_WORKERS[0].id, ?, INTERNAL)) { repeat; } [] mno.receive(mw_callHangUp(PX_WORKERS[0].id, ?, INTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKERS[0].id, ?, INTERNAL)) { repeat; } [] mno.receive(mw_callHangUp(PX_WORKERS[0].id, ?, EXTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKERS[0].id, ?, EXTERNAL)) { f_stopPsapTestcase(fail, "Unexpected external hang up!"); } [] mno.receive(mw_anyCallRejected) { [] callControl.receive(mw_anyCallRejected) { f_stopPsapTestcase(fail, "Call was rejected!"); } [] mno.receive(mw_anyCallAborted) -> value v_mnoEvent { f_stopPsapTestcase(fail, "Call was aborted: """ & v_mnoEvent.callAborted.reason & """!"); [] callControl.receive(mw_anyCallAborted) -> value v_callEvent { f_stopPsapTestcase(fail, "Call was aborted: """ & v_callEvent.callAborted.reason & """!"); } Loading @@ -561,7 +578,7 @@ module LibItsECall_Functions { */ altstep a_defaultPsap() runs on PsapMtc { var Event v_modemEvent; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; [] uiPort.receive { repeat; Loading Loading @@ -590,18 +607,22 @@ module LibItsECall_Functions { f_stopIvsTestcase(fail, "Switch to voice communication was not expected"); } [] modem.receive(mw_timerExpired(p_worker := PX_WORKERS[0].id)) -> value v_modemEvent { f_stopIvsTestcase(fail, "Timer " & v_modemEvent.timerExpired.name & " expired"); } [] mno.receive(mw_callHangUp(PX_WORKER, ?, EXTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKER, ?, EXTERNAL)) { f_stopIvsTestcase(fail, "Unexpected external hang up!"); } [] mno.receive(mw_anyCallRejected) { [] callControl.receive(mw_anyCallRejected) { f_stopIvsTestcase(fail, "Call was rejected!"); } [] mno.receive(mw_anyCallAborted) -> value v_mnoEvent { f_stopIvsTestcase(fail, "Call was aborted: """ & v_mnoEvent.callAborted.reason & """!"); [] callControl.receive(mw_anyCallAborted) -> value v_callEvent { f_stopIvsTestcase(fail, "Call was aborted: """ & v_callEvent.callAborted.reason & """!"); } Loading @@ -625,6 +646,7 @@ module LibItsECall_Functions { vc_uiComponent := UIComponent.create("UIComponent"); map(vc_logComponent:logPort, system:logPort); map(self:adapterControl, system:adapterControl); connect(self:uiPort, vc_uiComponent:uiPort); activate(a_defaultPsap()); Loading @@ -643,7 +665,7 @@ module LibItsECall_Functions { * @verdict */ function f_configMnoUp(in MnoConfiguration p_mnoConfiguraion := c_defaultMnoConfiguration) runs on PsapMtc { map(self:mno, system:mno); map(self:callControl, system:callControl); } // end f_configMnoUp /** Loading @@ -658,10 +680,10 @@ module LibItsECall_Functions { // Final configuration p_configuration.internalSubscriber := PX_INTERNAL_SUBSCRIBER; modem.send(m_setConfig(PX_WORKER, v_ivsConfig)); adapterControl.send(m_setConfig(PX_WORKER, v_ivsConfig)); f_adapterExpect(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true); modem.send(m_setConfig(PX_WORKER, p_configuration)); adapterControl.send(m_setConfig(PX_WORKER, p_configuration)); f_adapterExpect(p_e := mw_psapConfigChanged(PX_WORKER, ?, p_configuration), p_ignoreOtherMessages := true); vc_initialized := true; Loading @@ -687,6 +709,7 @@ module LibItsECall_Functions { vc_uiComponent.stop; disconnect(self:uiPort, vc_uiComponent:uiPort); unmap(self:adapterControl, system:adapterControl); unmap(vc_logComponent:logPort, system:logPort); } // end f_configIvsDown Loading @@ -696,7 +719,7 @@ module LibItsECall_Functions { * @verdict */ function f_configMnoDown() runs on PsapMtc { unmap(self:mno, system:mno); unmap(self:callControl, system:callControl); } // end f_configMnoDown /** Loading @@ -710,7 +733,7 @@ module LibItsECall_Functions { f_clearDown(NETWORK, c_now); // reset modem state modem.send(m_setConfig(PX_WORKER, v_ivsConfig)); adapterControl.send(m_setConfig(PX_WORKER, v_ivsConfig)); f_adapterExpect(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true); unmap(self:modem, system:modem); Loading Loading @@ -862,12 +885,12 @@ module LibItsECall_Functions { // monitor redial attempts t_redialWindowTimer.start; alt { [] mno.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { [] callControl.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { v_redialAttempted := true; repeat; } [] mno.receive(mw_callCanceled(PX_WORKER, ?, EXTERNAL)) { [] callControl.receive(mw_callCanceled(PX_WORKER, ?, EXTERNAL)) { repeat; } Loading @@ -881,7 +904,7 @@ module LibItsECall_Functions { // no more redial attempts should be registered t_guard.start; alt { [] mno.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { [] callControl.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { setverdict(fail, "Redial attempted after two minutes"); } Loading ttcn/LibItsECall_Templates.ttcn +15 −13 Original line number Diff line number Diff line Loading @@ -357,28 +357,28 @@ module LibItsECall_Templates { /** * @desc Receive template for any CallOutgoing event */ template MnoEvent mw_anyCallOutgoing := { template CallEvent mw_anyCallOutgoing := { callOutgoing := ? } /** * @desc Receive template for any CallRejected event */ template MnoEvent mw_anyCallRejected := { template CallEvent mw_anyCallRejected := { callRejected := ? } /** * @desc Receive template for any CallAborted event */ template MnoEvent mw_anyCallAborted := { template CallEvent mw_anyCallAborted := { callAborted := ? } /** * @desc Receive template for any CallHangUp event */ template MnoEvent mw_anyCallHangUp := { template CallEvent mw_anyCallHangUp := { callHangUp := ? } } Loading @@ -389,7 +389,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callCanceled ( template CallEvent mw_callCanceled ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -409,7 +409,7 @@ module LibItsECall_Templates { * @param p_to Calling ID * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callIncoming ( template CallEvent mw_callIncoming ( template(present) integer p_worker, template(present) charstring p_time, template(present) TelephoneNumber p_from, Loading @@ -433,7 +433,7 @@ module LibItsECall_Templates { * @param p_to Calling ID * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callOutgoing ( template CallEvent mw_callOutgoing ( template(present) integer p_worker, template(present) charstring p_time, template(present) TelephoneNumber p_from, Loading @@ -455,7 +455,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callEstablished ( template CallEvent mw_callEstablished ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -473,7 +473,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callRejected ( template CallEvent mw_callRejected ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -491,7 +491,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callHangUp ( template CallEvent mw_callHangUp ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := ? Loading @@ -510,7 +510,7 @@ module LibItsECall_Templates { * @param p_callRef INTERNAL/EXTERNAL * @param p_reason Abortion description */ template MnoEvent mw_callAborted ( template CallEvent mw_callAborted ( template(present) integer p_worker, template(present) charstring p_time, template(present) CallRefType p_callRef, Loading Loading @@ -631,6 +631,7 @@ module LibItsECall_Templates { inbandDirection := p_parameters.inbandDirection, internalSubscriber := p_parameters.internalSubscriber, ignoreAlClearDown := p_parameters.ignoreAlClearDown, noAckOfMsd := *, simulateCrcError := p_parameters.simulateCrcError, ignoreSendSignal := * } Loading @@ -656,7 +657,7 @@ module LibItsECall_Templates { t3Timer := *, t4Timer := p_parameters.t4Timer, t5Timer := *, t6Timer := p_parameters.t6Timer, t6Timer := *, t7Timer := *, t8Timer := p_parameters.t8Timer, sendNecDisabler := p_parameters.sendNecDisabler, Loading @@ -670,7 +671,8 @@ module LibItsECall_Templates { inbandDirection := p_parameters.inbandDirection, internalSubscriber := p_parameters.internalSubscriber, ignoreAlClearDown := *, simulateCrcError := p_parameters.simulateCrcError, noAckOfMsd := p_parameters.noAckOfMsd, simulateCrcError := *, ignoreSendSignal := p_parameters.ignoreSendSignal } } Loading ttcn/LibItsECall_TestSystem.ttcn +9 −6 Original line number Diff line number Diff line Loading @@ -25,14 +25,14 @@ module LibItsECall_TestSystem { */ type port ModemPort message { in Event, LogMessage; out SetConfigCmd, InbandRequestMsdCmd, InbandSendAlAckCmd; out InbandRequestMsdCmd, InbandSendAlAckCmd; } /** * @desc Telephony network port */ type port MNOPort message { in MnoEvent; type port CallControlPort message { in CallEvent; out CallAcceptCmd, CallHangUpCmd, CallRejectBusyCmd, CallCreateCmd, CallCancelCmd; } Loading Loading @@ -60,7 +60,7 @@ module LibItsECall_TestSystem { port AdapterControlPort adapterControl; port ModemPort modem; port UIPort uiPort; port MNOPort mno; port CallControlPort callControl; var boolean vc_initialized; Loading Loading @@ -105,7 +105,8 @@ module LibItsECall_TestSystem { type component PsapSystem { port ModemPort modem; port LogMessagePort logPort; port MNOPort mno; port CallControlPort callControl; port AdapterControlPort adapterControl; } /** Loading @@ -119,6 +120,8 @@ module LibItsECall_TestSystem { type component IvsSystem { port ModemPort modem; port LogMessagePort logPort; port CallControlPort callControl; port AdapterControlPort adapterControl; } } // end componentDefinitions Loading ttcn/LibItsECall_TypesAndValues.ttcn +25 −15 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
ttcn/AtsECall_IVS_Testcases.ttcn +12 −12 Original line number Diff line number Diff line Loading @@ -586,7 +586,7 @@ module AtsECall_IVS_Testcases { c_mbYes); f_mnoExpect(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)); mno.send(m_callAccept(PX_WORKER)); callControl.send(m_callAccept(PX_WORKER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_verifyMSD(PX_ECALL_MESSAGE); Loading Loading @@ -1284,7 +1284,7 @@ module AtsECall_IVS_Testcases { var TimerExpiredEvent v_t8Expired; var integer v_lastNackDelta; timer t := PX_TIMEOUT; var ModemConfiguration v_locaPsapSimCfg := modifies c_defaultPsapSimulatorConfiguration := {simulateCrcError := true} var ModemConfiguration v_locaPsapSimCfg := modifies c_defaultPsapSimulatorConfiguration := {noAckOfMsd := true} // Test component configuration f_configIvsUp(v_locaPsapSimCfg); Loading Loading @@ -1383,7 +1383,7 @@ module AtsECall_IVS_Testcases { "IVS did not clear down the call following receipt of a clear down message from the network", c_mbYes); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); f_adapterExpect(mw_anyConfigChanged); // AL-ACK clear down Loading Loading @@ -1434,7 +1434,7 @@ module AtsECall_IVS_Testcases { // Local variables var ExpectResult v_feedback; var CallEstablishedEvent v_callEstablished; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; var integer v_diff; timer t_t2 := c_t2_timer + PX_CTP_1_1_16_2_HANG_UP_RANGE; Loading @@ -1454,8 +1454,8 @@ module AtsECall_IVS_Testcases { f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER)); alt { [] mno.receive(mw_anyCallHangUp) -> value v_mnoEvent { v_diff := fx_timeDiff(v_callEstablished.time, v_mnoEvent.callHangUp.time); [] callControl.receive(mw_anyCallHangUp) -> value v_callEvent { v_diff := fx_timeDiff(v_callEstablished.time, v_callEvent.callHangUp.time); if (v_diff < float2int(c_t2_timer * 1000.0 - PX_CTP_1_1_16_2_HANG_UP_RANGE)) { setverdict(fail, "IVS cleared down call before T2 expired") Loading Loading @@ -1593,7 +1593,7 @@ module AtsECall_IVS_Testcases { msgTimeout := MESSAGEBOX_DISPLAY_TIME }); mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_verifyMSD(ANY_DECODED_ECALL); Loading Loading @@ -1661,7 +1661,7 @@ module AtsECall_IVS_Testcases { f_clearDown(NETWORK, 10.0); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); f_adapterExpect(mw_anyConfigChanged); uiPort.send(ShowMessageBox: { Loading @@ -1687,7 +1687,7 @@ module AtsECall_IVS_Testcases { } } mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); // Test Body Loading Loading @@ -1777,12 +1777,12 @@ module AtsECall_IVS_Testcases { f_mnoExpect(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true); modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_positiveAlAck)); f_adapterExpect(mw_anyConfigChanged); t_callbackDelay.start; mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_userVerify("Was the call-back automatically answered by the IVS?", Loading Loading @@ -1907,7 +1907,7 @@ module AtsECall_IVS_Testcases { } } mno.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); callControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER)); f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER)); Loading
ttcn/LibItsECall_Functions.ttcn +61 −38 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ module LibItsECall_Functions { import from LibItsECall_TypesAndValues all; import from LibItsECall_Pixits all; import from LibItsECall_Templates all; import from LibItsECall_Pics all; import from MSDASN1Module language "ASN.1:1997" all with { encode "MSDEncode"; Loading Loading @@ -109,7 +110,7 @@ module LibItsECall_Functions { f_mnoExpect(mw_callIncoming(PX_WORKER, ?, p_ivsNumber, p_psapNumber, EXTERNAL)); mno.send(m_callAccept(PX_WORKER)); callControl.send(m_callAccept(PX_WORKER)); v_feedback := f_mnoExpect(mw_callEstablished(PX_WORKER, ?, EXTERNAL)); if (v_feedback.failure == true) { Loading Loading @@ -166,10 +167,10 @@ module LibItsECall_Functions { t_hangUpTimer.timeout; } mno.send(m_callHangUpC(PX_WORKER)); callControl.send(m_callHangUpC(PX_WORKER)); } else { modem.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); adapterControl.send(m_setAutomaticAlAck(PX_WORKER, true, c_clearDownAlAck)); f_adapterExpect(mw_anyConfigChanged); modem.send(m_inbandRequestMsd(PX_WORKER)); Loading @@ -184,7 +185,7 @@ module LibItsECall_Functions { function f_setMSD(ECallMessageUnion p_eCall) runs on IvsMtc { var ModemConfiguration v_newConfig := {eCallMessage := p_eCall}; modem.send(m_setConfig(PX_WORKERS[0].id, v_newConfig)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, v_newConfig)); } /** Loading Loading @@ -272,10 +273,10 @@ module LibItsECall_Functions { vc_eCallMessage := v_eCallMessageExpanded; //TODO create equivalent for Psap Mtc modem.send(m_setConfig(PX_WORKERS[0].id, v_psapConfig)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, v_psapConfig)); // f_adapterExpect(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, ?), p_ignoreOtherMessages := true); modem.send(m_setConfig(PX_WORKERS[0].id, p_configuration)); adapterControl.send(m_setConfig(PX_WORKERS[0].id, p_configuration)); // f_adapterExpect(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, p_configuration), p_ignoreOtherMessages := true); } Loading Loading @@ -324,9 +325,9 @@ module LibItsECall_Functions { * @param p_ignoreOtherMessages Whether other events shall be ignored or not * @return FeedbackResult Received event if reception is successful, or failure */ function f_mnoExpect(template MnoEvent p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on PsapMtc return ExpectResult { function f_mnoExpect(template CallEvent p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on PsapMtc return ExpectResult { timer t := p_event_timeout; var MnoEvent v_received; var CallEvent v_received; var ExpectResult v_result; v_result.failure := false; Loading @@ -336,12 +337,12 @@ module LibItsECall_Functions { t.start; alt { [] mno.receive(p_e) -> value v_received { [] callControl.receive(p_e) -> value v_received { v_result.mnoEvent := v_received; t.stop; } [p_ignoreOtherMessages] mno.receive { [p_ignoreOtherMessages] callControl.receive { repeat; } Loading Loading @@ -379,7 +380,7 @@ module LibItsECall_Functions { t.stop; } [p_ignoreOtherMessages] mno.receive { [p_ignoreOtherMessages] callControl.receive { repeat; } Loading Loading @@ -450,17 +451,29 @@ module LibItsECall_Functions { } p_eCallMessage.decoded.msd.msdStructure.timestamp := ?; p_eCallMessage.decoded.msd.msdStructure.numberOfPassengers := *; if (not PC_MSD_numberOfPassengers) { p_eCallMessage.decoded.msd.msdStructure.numberOfPassengers := ?; } if (not PC_MSD_optionalAdditionalData) { p_eCallMessage.decoded.msd.optionalAdditionalData := *; } if (PX_IGNORE_MSD_POSITION) { p_eCallMessage.decoded.msd.msdStructure.control_.positionCanBeTrusted := ?; p_eCallMessage.decoded.msd.msdStructure.vehicleLocation := ?; p_eCallMessage.decoded.msd.msdStructure.vehicleDirection := ?; if (not PC_MSD_recentVehicleLocationN1) { p_eCallMessage.decoded.msd.msdStructure.recentVehicleLocationN1 := *; } if (not PC_MSD_recentVehicleLocationN2) { p_eCallMessage.decoded.msd.msdStructure.recentVehicleLocationN2 := *; } } } return p_eCallMessage; } Loading @@ -483,7 +496,7 @@ module LibItsECall_Functions { */ altstep a_defaultIvs() runs on IvsMtc { var Event v_modemEvent; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; [] modem.receive(LogMessage:?) { repeat; Loading Loading @@ -517,30 +530,34 @@ module LibItsECall_Functions { repeat; } [] modem.receive(mw_timerExpired(p_worker := PX_WORKERS[0].id)) -> value v_modemEvent { f_stopPsapTestcase(fail, "Timer " & v_modemEvent.timerExpired.name & " expired"); } [] mno.receive(mw_anyCallOutgoing) { [] callControl.receive(mw_anyCallOutgoing) { repeat; } [] mno.receive(mw_callEstablished(PX_WORKERS[0].id, ?, INTERNAL)) { [] callControl.receive(mw_callEstablished(PX_WORKERS[0].id, ?, INTERNAL)) { repeat; } [] mno.receive(mw_callHangUp(PX_WORKERS[0].id, ?, INTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKERS[0].id, ?, INTERNAL)) { repeat; } [] mno.receive(mw_callHangUp(PX_WORKERS[0].id, ?, EXTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKERS[0].id, ?, EXTERNAL)) { f_stopPsapTestcase(fail, "Unexpected external hang up!"); } [] mno.receive(mw_anyCallRejected) { [] callControl.receive(mw_anyCallRejected) { f_stopPsapTestcase(fail, "Call was rejected!"); } [] mno.receive(mw_anyCallAborted) -> value v_mnoEvent { f_stopPsapTestcase(fail, "Call was aborted: """ & v_mnoEvent.callAborted.reason & """!"); [] callControl.receive(mw_anyCallAborted) -> value v_callEvent { f_stopPsapTestcase(fail, "Call was aborted: """ & v_callEvent.callAborted.reason & """!"); } Loading @@ -561,7 +578,7 @@ module LibItsECall_Functions { */ altstep a_defaultPsap() runs on PsapMtc { var Event v_modemEvent; var MnoEvent v_mnoEvent; var CallEvent v_callEvent; [] uiPort.receive { repeat; Loading Loading @@ -590,18 +607,22 @@ module LibItsECall_Functions { f_stopIvsTestcase(fail, "Switch to voice communication was not expected"); } [] modem.receive(mw_timerExpired(p_worker := PX_WORKERS[0].id)) -> value v_modemEvent { f_stopIvsTestcase(fail, "Timer " & v_modemEvent.timerExpired.name & " expired"); } [] mno.receive(mw_callHangUp(PX_WORKER, ?, EXTERNAL)) { [] callControl.receive(mw_callHangUp(PX_WORKER, ?, EXTERNAL)) { f_stopIvsTestcase(fail, "Unexpected external hang up!"); } [] mno.receive(mw_anyCallRejected) { [] callControl.receive(mw_anyCallRejected) { f_stopIvsTestcase(fail, "Call was rejected!"); } [] mno.receive(mw_anyCallAborted) -> value v_mnoEvent { f_stopIvsTestcase(fail, "Call was aborted: """ & v_mnoEvent.callAborted.reason & """!"); [] callControl.receive(mw_anyCallAborted) -> value v_callEvent { f_stopIvsTestcase(fail, "Call was aborted: """ & v_callEvent.callAborted.reason & """!"); } Loading @@ -625,6 +646,7 @@ module LibItsECall_Functions { vc_uiComponent := UIComponent.create("UIComponent"); map(vc_logComponent:logPort, system:logPort); map(self:adapterControl, system:adapterControl); connect(self:uiPort, vc_uiComponent:uiPort); activate(a_defaultPsap()); Loading @@ -643,7 +665,7 @@ module LibItsECall_Functions { * @verdict */ function f_configMnoUp(in MnoConfiguration p_mnoConfiguraion := c_defaultMnoConfiguration) runs on PsapMtc { map(self:mno, system:mno); map(self:callControl, system:callControl); } // end f_configMnoUp /** Loading @@ -658,10 +680,10 @@ module LibItsECall_Functions { // Final configuration p_configuration.internalSubscriber := PX_INTERNAL_SUBSCRIBER; modem.send(m_setConfig(PX_WORKER, v_ivsConfig)); adapterControl.send(m_setConfig(PX_WORKER, v_ivsConfig)); f_adapterExpect(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true); modem.send(m_setConfig(PX_WORKER, p_configuration)); adapterControl.send(m_setConfig(PX_WORKER, p_configuration)); f_adapterExpect(p_e := mw_psapConfigChanged(PX_WORKER, ?, p_configuration), p_ignoreOtherMessages := true); vc_initialized := true; Loading @@ -687,6 +709,7 @@ module LibItsECall_Functions { vc_uiComponent.stop; disconnect(self:uiPort, vc_uiComponent:uiPort); unmap(self:adapterControl, system:adapterControl); unmap(vc_logComponent:logPort, system:logPort); } // end f_configIvsDown Loading @@ -696,7 +719,7 @@ module LibItsECall_Functions { * @verdict */ function f_configMnoDown() runs on PsapMtc { unmap(self:mno, system:mno); unmap(self:callControl, system:callControl); } // end f_configMnoDown /** Loading @@ -710,7 +733,7 @@ module LibItsECall_Functions { f_clearDown(NETWORK, c_now); // reset modem state modem.send(m_setConfig(PX_WORKER, v_ivsConfig)); adapterControl.send(m_setConfig(PX_WORKER, v_ivsConfig)); f_adapterExpect(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true); unmap(self:modem, system:modem); Loading Loading @@ -862,12 +885,12 @@ module LibItsECall_Functions { // monitor redial attempts t_redialWindowTimer.start; alt { [] mno.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { [] callControl.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { v_redialAttempted := true; repeat; } [] mno.receive(mw_callCanceled(PX_WORKER, ?, EXTERNAL)) { [] callControl.receive(mw_callCanceled(PX_WORKER, ?, EXTERNAL)) { repeat; } Loading @@ -881,7 +904,7 @@ module LibItsECall_Functions { // no more redial attempts should be registered t_guard.start; alt { [] mno.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { [] callControl.receive(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL)) { setverdict(fail, "Redial attempted after two minutes"); } Loading
ttcn/LibItsECall_Templates.ttcn +15 −13 Original line number Diff line number Diff line Loading @@ -357,28 +357,28 @@ module LibItsECall_Templates { /** * @desc Receive template for any CallOutgoing event */ template MnoEvent mw_anyCallOutgoing := { template CallEvent mw_anyCallOutgoing := { callOutgoing := ? } /** * @desc Receive template for any CallRejected event */ template MnoEvent mw_anyCallRejected := { template CallEvent mw_anyCallRejected := { callRejected := ? } /** * @desc Receive template for any CallAborted event */ template MnoEvent mw_anyCallAborted := { template CallEvent mw_anyCallAborted := { callAborted := ? } /** * @desc Receive template for any CallHangUp event */ template MnoEvent mw_anyCallHangUp := { template CallEvent mw_anyCallHangUp := { callHangUp := ? } } Loading @@ -389,7 +389,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callCanceled ( template CallEvent mw_callCanceled ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -409,7 +409,7 @@ module LibItsECall_Templates { * @param p_to Calling ID * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callIncoming ( template CallEvent mw_callIncoming ( template(present) integer p_worker, template(present) charstring p_time, template(present) TelephoneNumber p_from, Loading @@ -433,7 +433,7 @@ module LibItsECall_Templates { * @param p_to Calling ID * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callOutgoing ( template CallEvent mw_callOutgoing ( template(present) integer p_worker, template(present) charstring p_time, template(present) TelephoneNumber p_from, Loading @@ -455,7 +455,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callEstablished ( template CallEvent mw_callEstablished ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -473,7 +473,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callRejected ( template CallEvent mw_callRejected ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := EXTERNAL Loading @@ -491,7 +491,7 @@ module LibItsECall_Templates { * @param p_time Event timestamp * @param p_callRef INTERNAL/EXTERNAL */ template MnoEvent mw_callHangUp ( template CallEvent mw_callHangUp ( template(present) integer p_worker, template(present) charstring p_time := ?, template(present) CallRefType p_callRef := ? Loading @@ -510,7 +510,7 @@ module LibItsECall_Templates { * @param p_callRef INTERNAL/EXTERNAL * @param p_reason Abortion description */ template MnoEvent mw_callAborted ( template CallEvent mw_callAborted ( template(present) integer p_worker, template(present) charstring p_time, template(present) CallRefType p_callRef, Loading Loading @@ -631,6 +631,7 @@ module LibItsECall_Templates { inbandDirection := p_parameters.inbandDirection, internalSubscriber := p_parameters.internalSubscriber, ignoreAlClearDown := p_parameters.ignoreAlClearDown, noAckOfMsd := *, simulateCrcError := p_parameters.simulateCrcError, ignoreSendSignal := * } Loading @@ -656,7 +657,7 @@ module LibItsECall_Templates { t3Timer := *, t4Timer := p_parameters.t4Timer, t5Timer := *, t6Timer := p_parameters.t6Timer, t6Timer := *, t7Timer := *, t8Timer := p_parameters.t8Timer, sendNecDisabler := p_parameters.sendNecDisabler, Loading @@ -670,7 +671,8 @@ module LibItsECall_Templates { inbandDirection := p_parameters.inbandDirection, internalSubscriber := p_parameters.internalSubscriber, ignoreAlClearDown := *, simulateCrcError := p_parameters.simulateCrcError, noAckOfMsd := p_parameters.noAckOfMsd, simulateCrcError := *, ignoreSendSignal := p_parameters.ignoreSendSignal } } Loading
ttcn/LibItsECall_TestSystem.ttcn +9 −6 Original line number Diff line number Diff line Loading @@ -25,14 +25,14 @@ module LibItsECall_TestSystem { */ type port ModemPort message { in Event, LogMessage; out SetConfigCmd, InbandRequestMsdCmd, InbandSendAlAckCmd; out InbandRequestMsdCmd, InbandSendAlAckCmd; } /** * @desc Telephony network port */ type port MNOPort message { in MnoEvent; type port CallControlPort message { in CallEvent; out CallAcceptCmd, CallHangUpCmd, CallRejectBusyCmd, CallCreateCmd, CallCancelCmd; } Loading Loading @@ -60,7 +60,7 @@ module LibItsECall_TestSystem { port AdapterControlPort adapterControl; port ModemPort modem; port UIPort uiPort; port MNOPort mno; port CallControlPort callControl; var boolean vc_initialized; Loading Loading @@ -105,7 +105,8 @@ module LibItsECall_TestSystem { type component PsapSystem { port ModemPort modem; port LogMessagePort logPort; port MNOPort mno; port CallControlPort callControl; port AdapterControlPort adapterControl; } /** Loading @@ -119,6 +120,8 @@ module LibItsECall_TestSystem { type component IvsSystem { port ModemPort modem; port LogMessagePort logPort; port CallControlPort callControl; port AdapterControlPort adapterControl; } } // end componentDefinitions Loading
ttcn/LibItsECall_TypesAndValues.ttcn +25 −15 File changed.Preview size limit exceeded, changes collapsed. Show changes