Commit 8cf3c6dd authored by berge's avatar berge
Browse files

Removed "advanced parameterization" features (TTCN-3 extension)

parent 738ba60d
Loading
Loading
Loading
Loading
+33 −28
Original line number Diff line number Diff line
@@ -538,9 +538,9 @@ module AtsECall_IVS_Testcases {
                "Not all components of the IVS, which are necessary for an eCall, are available and not influenced by the previously-running communication (HMI, Audio,...)",
                c_mbYes);

            f_expectFeedback<CallIncomingEvent>(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL));
            f_expectFeedback(mw_callIncoming(PX_WORKER, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER, EXTERNAL));
            eCallControl.send(m_callAccept(PX_WORKER));
            f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
            f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL));

            f_verifyMSD(PX_ECALL_MESSAGE);

@@ -775,7 +775,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger manual or automatic eCall");

            f_expectFeedback<InbandNackSentEvent>(mw_inbandNackSent(PX_WORKER));
            f_expectFeedback(mw_inbandNackSent(PX_WORKER));

            f_clearDown(NETWORK, NOW);

@@ -810,6 +810,7 @@ module AtsECall_IVS_Testcases {
            // Local variables
            template ConfigParameters v_locaPsapSimCfg modifies c_defaultPsapSimulatorConfiguration := {inbandDirection := PUSH, ignoreSendSignal := true}
            var CallEstablishedEvent v_callEstablishedEvent;
            var Event v_event;
            var InbandSendSignalReceivedEvent v_lastSendSignal;
            var integer v_diff;
            timer t_guard := PX_T3_TIMER * 2.0;
@@ -823,7 +824,8 @@ module AtsECall_IVS_Testcases {
            // start listening for start signal
            t_guard.start;
            alt {
                [] eCallFeedback.receive(mw_inbandSendSignalReceived(PX_WORKER, ?)) -> value v_lastSendSignal {
                [] eCallFeedback.receive(mw_inbandSendSignalReceived(PX_WORKER, ?)) -> value v_event {
                    v_lastSendSignal := v_event.inbandSendSignalReceived;
                    repeat;
                }

@@ -1121,7 +1123,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<CallVoiceConnectionEstablishedEvent>(mw_callVoiceConnectionEstablished(PX_WORKER));
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER));

            f_userVerify("Was 2-way voice communication possible after T5 has expired?",
                "2-way speech was possible between the IVS and PSAP test point",
@@ -1206,6 +1208,7 @@ module AtsECall_IVS_Testcases {
            
            // Local variables
            var integer v_nacksSent := 0;
            var Event v_event;
            var InbandNackSentEvent v_lastNack;
            var TimerExpiredEvent v_t8Expired;
            var integer v_lastNackDelta;
@@ -1220,11 +1223,13 @@ module AtsECall_IVS_Testcases {

            t.start;
            alt {
                [] eCallFeedback.receive(mw_t8Expired(PX_WORKER)) -> value v_t8Expired {
                [] eCallFeedback.receive(mw_t8Expired(PX_WORKER)) -> value v_event {
                    v_t8Expired := v_event.timerExpired;
                    t.stop;
                }

                [] eCallFeedback.receive(mw_inbandNackSent(PX_WORKER)) -> value v_lastNack {
                [] eCallFeedback.receive(mw_inbandNackSent(PX_WORKER)) -> value v_event {
                    v_lastNack := v_event.inbandNackSent;
                    v_nacksSent := v_nacksSent + 1;

                    t.start;
@@ -1250,7 +1255,7 @@ module AtsECall_IVS_Testcases {
                }
            }

            f_expectFeedback<CallVoiceConnectionEstablishedEvent>(mw_callVoiceConnectionEstablished(PX_WORKER));
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER));

            f_userVerify("Was 2-way voice communication possible after T7 has expired?",
                "2-way speech was possible between the IVS and PSAP test point",
@@ -1294,7 +1299,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE), PX_TIMEOUT, true);
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE), PX_TIMEOUT, true);

            f_clearDown(NETWORK, NOW);

@@ -1304,15 +1309,15 @@ module AtsECall_IVS_Testcases {
                c_mbYes);

            eCallControl.send(m_setAutomaticAlAck(PX_WORKER, true, CLEAR_DOWN_AL_ACK));
            f_expectFeedback<ConfigChangedEvent>(ConfigChangedEvent:?);
            f_expectFeedback(mw_anyConfigChanged);

            f_userAction("Trigger eCall");

            f_establishCall();

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));

            f_expectFeedback<CallHangUpEvent>(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);
            f_expectFeedback(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);

            f_userVerify("Is the IVS cleared down?",
                "IVS cleared down the call following receipt of an AL ACK CLEAR DOWN message from the PSAP",
@@ -1429,9 +1434,9 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));

            f_expectFeedback<CallHangUpEvent>(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);
            f_expectFeedback(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);

            f_userVerify("Is a record of the received application layer acknowledgment (AL-ACK) and time stamp, sent from the PSAP test point, stored in the IVS?",
                "A record of the received time stamped AL-ACK has been stored in the IVS",
@@ -1478,12 +1483,12 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));

            f_expectFeedback<CallHangUpEvent>(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);
            f_expectFeedback(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);

            eCallControl.send(m_setAutomaticAlAck(PX_WORKER, true, POSITIVE_AL_ACK));
            f_expectFeedback<ConfigChangedEvent>(ConfigChangedEvent:?);
            f_expectFeedback(mw_anyConfigChanged);

            uiPort.send(ShowMessageBox: {
                    title := "Callback",
@@ -1509,7 +1514,7 @@ module AtsECall_IVS_Testcases {
            }

            eCallControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER));
            f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
            f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL));

            f_verifyMSD(ANY_DECODED_ECALL);

@@ -1590,17 +1595,17 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));

            f_expectFeedback<CallHangUpEvent>(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);
            f_expectFeedback(mw_callHangUp(PX_WORKER, ?, EXTERNAL), PX_TIMEOUT, true);

            eCallControl.send(m_setAutomaticAlAck(PX_WORKER, true, POSITIVE_AL_ACK));
            f_expectFeedback<ConfigChangedEvent>(ConfigChangedEvent:?);
            f_expectFeedback(mw_anyConfigChanged);

            t_callbackDelay.start;

            eCallControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER));
            f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
            f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL));

            f_userVerify("Was the call-back automatically answered by the IVS?",
                "Call answered automatically",
@@ -1692,7 +1697,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall("Trigger eCall");

            f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));
            f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, PX_ECALL_MESSAGE));

            f_clearDown(NETWORK, NOW);

@@ -1720,9 +1725,9 @@ module AtsECall_IVS_Testcases {
            }

            eCallControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER));
            f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
            f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL));

            f_expectFeedback<CallVoiceConnectionEstablishedEvent>(mw_callVoiceConnectionEstablished(PX_WORKER));
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER));

            f_userVerify("Is 2-way speech possible?",
                "2-way speech possible",
@@ -1782,7 +1787,7 @@ module AtsECall_IVS_Testcases {
            //
            f_establishCall("Trigger eCall");

            f_expectFeedback<CallVoiceConnectionEstablishedEvent>(mw_callVoiceConnectionEstablished(PX_WORKER), PX_TIMEOUT, true);
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER), PX_TIMEOUT, true);

            f_clearDown(NETWORK, NOW);

@@ -1798,7 +1803,7 @@ module AtsECall_IVS_Testcases {
                });

            eCallControl.send(m_callCreate(PX_WORKER, PX_IVS_PHONE_NUMBER));
            f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
            f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL));

            f_verifyMSD(ANY_DECODED_ECALL);

+86 −78

File changed.

Preview size limit exceeded, changes collapsed.

+33 −103
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
        var CallEstablishedEvent v_callEstablishedEvent;
        timer t := PX_TIMEOUT;

        if (getverdict() == fail or getverdict() == inconc) {
        if (getverdict == fail or getverdict == inconc) {
            return null;
        }

@@ -67,13 +67,14 @@

        eCallControl.send(m_callAccept(PX_WORKER));
  
        return f_expectFeedback<CallEstablishedEvent>(mw_callEstablished(PX_WORKER, ?, EXTERNAL));
        v_callEstablishedEvent := f_expectFeedback(mw_callEstablished(PX_WORKER, ?, EXTERNAL)).callEstablished;  
        return v_callEstablishedEvent;
    }
    
    function f_verifyMSD(in template(present) ECallMessageUnion p_expectedEcallMessage) runs on PsapMtc {
        f_expectFeedback<InbandMsdReceivedEvent>(mw_inbandMsdReceived(PX_WORKER, ?, f_toTemplate(p_expectedEcallMessage)));
        f_expectFeedback(mw_inbandMsdReceived(PX_WORKER, ?, f_toTemplate(p_expectedEcallMessage)));

        f_expectFeedback<CallVoiceConnectionEstablishedEvent>(mw_callVoiceConnectionEstablished(PX_WORKER));
        f_expectFeedback(mw_callVoiceConnectionEstablished(PX_WORKER));
    }
    
    /**
@@ -95,32 +96,13 @@
        }
        else {
            eCallControl.send(m_setAutomaticAlAck(PX_WORKER, true, CLEAR_DOWN_AL_ACK));
            f_expectFeedback<ConfigChangedEvent>(ConfigChangedEvent:?);
            f_expectFeedback(mw_anyConfigChanged);

            eCallControl.send(m_inbandRequestMsd(PX_WORKER));
            f_verifyMSD(PX_ECALL_MESSAGE);
        }
    }
    
    /**
    * @desc Decodes the encoded eCallMessage if it valid and sets the decoded field of ECallMessageUnion,
    * otherwise the ECallMessageUnion is unchanged.
    *
    * @return ECallMessageUnion with the decoded field set (if the input is valid), otherwise unchanged
    */
    function f_expandMsd(in template(present) ECallMessageUnion p_eCallMessageUnion) return template(present) ECallMessageUnion {
        // expand msd that was given as encoded if valid, otherwise leave as is
        if (ischosen(p_eCallMessageUnion.encoded) and isvalue(p_eCallMessageUnion.encoded)) {
            var ECallMessage v_msd;

            if (decvalue(oct2bit(p_eCallMessageUnion.encoded), v_msd) == 0) {
                p_eCallMessageUnion.decoded := v_msd;
            }
        }

        return p_eCallMessageUnion;
    }

    function f_setMSD(ECallMessageUnion p_eCall) runs on IvsMtc {
        var ConfigParameters v_newConfig := {eCallMessage := p_eCall};

@@ -128,7 +110,7 @@
    }

    function f_verifyMsdSentSuccesfully(template(present) AckValueType p_alAckValue := POSITIVE_AL_ACK) runs on IvsMtc {
        f_expectFeedback<InbandStartSignalReceivedEvent>(mw_inbandStartSignalReceived(p_worker := PX_WORKERS[0].id, p_reliable := true));
        f_expectFeedback(mw_inbandStartSignalReceived(p_worker := PX_WORKERS[0].id, p_reliable := true));

        f_verifyAckReceived(p_alAckValue);

@@ -179,59 +161,7 @@
        return p_eCallMessageUnion;
    }
    
    /**
    * @desc Generates a template from the given
    *
    * @return ECallMessageUnion with the decoded field set (if the input is valid), otherwise unchanged
    */
    function f_toTemplate(in template(present) ECallMessageUnion p_eCallMessage) return template(present) ECallMessageUnion {
        p_eCallMessage := f_expandMsd(p_eCallMessage);

        if (ischosen(p_eCallMessage.decoded)) {
            var template(present) ECallMessageUnion v_finalECallMessageTemplate;

            template ECallMessageUnion mw_noIdentifier modifies p_eCallMessage  := {
                decoded := {
                    id := ?,
                    msd := {
                        msdStructure := {
                            messageIdentifier := ?,
                            timestamp := ?,
                            numberOfPassengers := *
                        },
                        optionalAdditionalData := *
                    }
                }
            };

            v_finalECallMessageTemplate := mw_noIdentifier;

            if (PX_IGNORE_MSD_POSITION) {
                template(present) ECallMessageUnion mw_tmp modifies v_finalECallMessageTemplate := {
                    decoded := {
                        msd := {
                            msdStructure := {
                                control_ := {
                                    positionCanBeTrusted := ?//,
                                },
                                vehicleLocation := ?,
                                vehicleDirection := ?,
                                recentVehicleLocationN1 := *,
                                recentVehicleLocationN2 := *
                            }
                        }
                    }
                };

                v_finalECallMessageTemplate := mw_tmp;
            }

            return v_finalECallMessageTemplate;
        }
        else {
            return p_eCallMessage;
        }
    }

    altstep a_unexpectedEvents() runs on PsapMtc {
        var CallAbortedEvent v_callAborted;
@@ -274,18 +204,18 @@
    }
      
    function f_setSimulatorConfiguration(in ConfigParameters p_configuration) runs on PsapMtc {
        var ConfigParameters v_finalConfig := modifies p_configuration := {
            t4Timer := PX_T4_TIMER,
            t6Timer := PX_T6_TIMER,
            t8Timer := PX_T8_TIMER,
            internalSubscriber := PX_INTERNAL_SUBSCRIBER
        }

		// Final configuration
	    p_configuration.t4Timer := PX_T4_TIMER;
        p_configuration.t6Timer := PX_T6_TIMER;
        p_configuration.t8Timer := PX_T8_TIMER;
        p_configuration.internalSubscriber := PX_INTERNAL_SUBSCRIBER;

        eCallControl.send(m_setConfig(PX_WORKER, {mode := IVS}));
        f_expectFeedback<ConfigChangedEvent>(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true);
        f_expectFeedback(p_e := mw_ivsConfigChanged(PX_WORKER, ?, ?), p_ignoreOtherMessages := true);

        eCallControl.send(m_setConfig(PX_WORKER, v_finalConfig));
        f_expectFeedback<ConfigChangedEvent>(p_e := mw_psapConfigChanged(PX_WORKER, ?, v_finalConfig), p_ignoreOtherMessages := true);
        eCallControl.send(m_setConfig(PX_WORKER, p_configuration));
        f_expectFeedback(p_e := mw_psapConfigChanged(PX_WORKER, ?, p_configuration), p_ignoreOtherMessages := true);
    }

/**
@@ -296,27 +226,27 @@
*/
    function f_setSimulatorConfiguration2(in WorkerConf p_workerConf, in ConfigParameters p_configuration) runs on IvsMtc {
        var ECallMessageUnion v_eCallMessageExpanded := f_expandMsd(p_configuration.eCallMessage);
        var ConfigParameters v_finalConfig := modifies p_configuration := {
            t3Timer := PX_T3_TIMER,
            t5Timer := PX_T5_TIMER,
            t6Timer := PX_T6_TIMER,
            t7Timer := PX_T7_TIMER,
            internalSubscriber := p_workerConf.internalSubscriber,
            eCallMessage := v_eCallMessageExpanded
        }
        
        // Final configuration
        p_configuration.t3Timer := PX_T3_TIMER;
        p_configuration.t5Timer := PX_T5_TIMER;
        p_configuration.t6Timer := PX_T6_TIMER;
        p_configuration.t7Timer := PX_T7_TIMER;
        p_configuration.internalSubscriber := p_workerConf.internalSubscriber;
        p_configuration.eCallMessage := v_eCallMessageExpanded;

        vc_eCallMessage := v_eCallMessageExpanded;

        eCallControl.send(m_setConfig(PX_WORKERS[0].id, {mode := PSAP}));
        f_expectFeedback<ConfigChangedEvent>(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, ?), p_ignoreOtherMessages := true);
        f_expectFeedback(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, ?), p_ignoreOtherMessages := true);

        eCallControl.send(m_setConfig(PX_WORKERS[0].id, v_finalConfig));
        f_expectFeedback<ConfigChangedEvent>(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, v_finalConfig), p_ignoreOtherMessages := true);
        eCallControl.send(m_setConfig(PX_WORKERS[0].id, p_configuration));
        f_expectFeedback(p_e := mw_ivsConfigChanged(p_workerConf.id, ?, p_configuration), p_ignoreOtherMessages := true);
    }

    function f_expectFeedback<EventType>(template EventType p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on ECallMtc return EventType {
    function f_expectFeedback(template Event p_e, float p_event_timeout := PX_TIMEOUT, in boolean p_ignoreOtherMessages := false) runs on ECallMtc return Event {
        timer t := p_event_timeout;
        var EventType v_received := null;
        var Event v_received := null;

        if (getverdict() == fail or getverdict() == inconc) {
            return v_received;
@@ -352,7 +282,7 @@
    
        altstep a_default_behaviour() runs on IvsMtc {
            var CallAbortedEvent v_callAborted;
            var TimerExpiredEvent v_timerExpired;
            var Event v_timerExpired;

            [] eCallFeedback.receive(LogMessage:?) {
                repeat;
@@ -403,7 +333,7 @@
            }

            [] eCallFeedback.receive(mw_timerExpired(p_worker := PX_WORKERS[0].id)) -> value v_timerExpired {
                f_stopTestcase(fail, "Timer " & v_timerExpired.name & " expired");
                f_stopTestcase(fail, "Timer " & v_timerExpired.timerExpired.name & " expired");
            }

            [] eCallFeedback.receive(mw_callHangUp(PX_WORKERS[0].id, ?, EXTERNAL)) {
+260 −140

File changed.

Preview size limit exceeded, changes collapsed.

+26 −3
Original line number Diff line number Diff line
@@ -116,6 +116,29 @@ module LibItsECall_TypesAndValues {
        
        group events {

            type union Event {
                ConfigChangedEvent                  configChanged,
                InbandMsdReceivedEvent              inbandMsdReceived,
                InbandLlAckSentEvent                inbandLlAckSent,
                InbandLlAckReceivedEvent            inbandLlAckReceived,
                InbandAlAckSentEvent                inbandAlAckSent,
                InbandAlAckReceivedEvent            inbandAlAckReceived,
                InbandStateChangedEvent             inbandStateChanged,
                InbandSendSignalReceivedEvent       inbandSendSignalReceived,
                InbandNackSentEvent                 inbandNackSent,
                InbandNackReceivedEvent             inbandNackReceived,
                CallCanceledEvent                   callCanceled,
                CallIncomingEvent                   callIncoming,
                CallOutgoingEvent                   callOutgoing,
                CallEstablishedEvent                callEstablished,
                CallRejectedEvent                   callRejected,
                CallHangUpEvent                     callHangUp,
                CallAbortedEvent                    callAborted,
                CallVoiceConnectionEstablishedEvent callVoiceConnectionEstablished,
                InbandStartSignalReceivedEvent      inbandStartSignalReceived,
                TimerExpiredEvent                   timerExpired
            }
            
            type record ConfigChangedEvent {
                integer worker,
                charstring time,
@@ -398,7 +421,7 @@ module LibItsECall_TypesAndValues {
                charstring to_,
                CallRefType callRef
            } with {
                variant "call_create"
                variant "call_create";
                variant (worker) "worker";
                variant (to_) "to";
                variant (callRef) "call-ref";
@@ -408,7 +431,7 @@ module LibItsECall_TypesAndValues {
                integer worker,
                CallRefType callRef
            } with {
                variant "call_cancel"
                variant "call_cancel";
                variant (worker) "worker";
                variant (callRef) "call-ref";
            }
Loading