Commit 4fad8d13 authored by mogos's avatar mogos
Browse files

added version 2 of the MSD ASN.1

parent c54c4d68
Loading
Loading
Loading
Loading
+39 −42
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(AUTOMATIC, ANY);

            f_verifyMSD(ANY_AUTOMATIC_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -155,7 +155,7 @@ module AtsECall_IVS_Testcases {
            vc_eCallKind := ANY;
            f_acceptCall(PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -226,7 +226,7 @@ module AtsECall_IVS_Testcases {
            vc_eCallKind := ANY;
            f_acceptCall(PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            v_button := f_messageBoxYesNo("Verify", "Was the handsfree equipment disabled in the crash test/simulation?");
            if (v_button == c_mbNo) {
@@ -301,7 +301,7 @@ module AtsECall_IVS_Testcases {
                vc_eCallKind := ANY;
                f_acceptCall(PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER);
  
                f_verifyMSD(PX_ECALL_MESSAGE);
                f_verifyMSD();

                f_clearDown(NETWORK, c_now);

@@ -344,7 +344,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(MANUAL, ANY);

            f_verifyMSD(ANY_MANUAL_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -387,7 +387,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(AUTOMATIC, ANY);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -433,7 +433,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(MANUAL, ANY);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -479,7 +479,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(AUTOMATIC, ANY);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -525,7 +525,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(MANUAL, ANY);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -585,11 +585,11 @@ 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_mnoExpect(mw_callIncoming(PX_MODEM_INSTANCE, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER));
            f_callControlExpect(mw_callIncoming(PX_MODEM_INSTANCE, ?, PX_IVS_PHONE_NUMBER, PX_PSAP_PHONE_NUMBER));
            callControl.send(m_callAccept(PX_MODEM_INSTANCE));
            f_mnoExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));
            f_callControlExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -633,7 +633,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall();

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();
            
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -925,7 +925,6 @@ module AtsECall_IVS_Testcases {
         *  </table>
         */
        testcase CTP_1_1_11_1() runs on PsapMtc system PsapSystem {
            template ECallMessageUnion expandedECalMessage := f_expandMsd(PX_ECALL_MESSAGE);

            // Test component configuration
            f_configIvsUp(c_defaultPsapSimulatorConfiguration);
@@ -933,7 +932,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(AUTOMATIC, EMERGENCY);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            // Postamble
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));
@@ -962,7 +961,6 @@ module AtsECall_IVS_Testcases {
         *  </table>
         */
        testcase CTP_1_1_12_1() runs on PsapMtc system PsapSystem {
            template ECallMessageUnion expandedECalMessage := f_expandMsd(PX_ECALL_MESSAGE);

            // Test component configuration
            f_configIvsUp(c_defaultPsapSimulatorConfiguration);
@@ -970,7 +968,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(MANUAL, EMERGENCY);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            // Postamble
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));
@@ -1000,7 +998,6 @@ module AtsECall_IVS_Testcases {
         *  </table>
         */
        testcase CTP_1_1_13_1() runs on PsapMtc system PsapSystem {
            template ECallMessageUnion expandedECalMessage := f_expandMsd(PX_ECALL_MESSAGE);

            // Test component configuration
            f_configIvsUp(c_defaultPsapSimulatorConfiguration);
@@ -1008,7 +1005,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            // Postamble
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));
@@ -1045,7 +1042,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            // Postamble
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));
@@ -1082,7 +1079,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();
            
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1130,7 +1127,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall();

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();
            
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1141,7 +1138,7 @@ module AtsECall_IVS_Testcases {

            modem.send(m_inbandRequestMsd(PX_MODEM_INSTANCE));

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();
            
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));
      
@@ -1236,7 +1233,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1372,7 +1369,7 @@ module AtsECall_IVS_Testcases {
            // Network clear down
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1391,9 +1388,9 @@ module AtsECall_IVS_Testcases {

            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_mnoExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), PX_TIMEOUT, true);
            f_callControlExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), 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",
@@ -1444,12 +1441,12 @@ module AtsECall_IVS_Testcases {
            // Test Body
            v_feedback := f_establishCall(ANY, TEST);
            if(ischosen(v_feedback.event)) {
                v_callEstablished := v_feedback.mnoEvent.callEstablished;
                v_callEstablished := v_feedback.callEvent.callEstablished;
            }
            
            t_t2.start;

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1516,9 +1513,9 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_mnoExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), PX_TIMEOUT, true);
            f_callControlExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), 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",
@@ -1590,9 +1587,9 @@ module AtsECall_IVS_Testcases {
                });

            callControl.send(m_callCreate(PX_MODEM_INSTANCE, PX_IVS_PHONE_NUMBER));
            f_mnoExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));
            f_callControlExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();
            
            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1650,7 +1647,7 @@ module AtsECall_IVS_Testcases {
            // Precondition: Call-back is in progress
            f_establishCall();

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1680,7 +1677,7 @@ module AtsECall_IVS_Testcases {
            }

            callControl.send(m_callCreate(PX_MODEM_INSTANCE, PX_IVS_PHONE_NUMBER));
            f_mnoExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));
            f_callControlExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));

            // Test Body

@@ -1703,7 +1700,7 @@ module AtsECall_IVS_Testcases {

            modem.send(m_inbandRequestMsd(PX_MODEM_INSTANCE));

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1765,9 +1762,9 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall();

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_mnoExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), PX_TIMEOUT, true);
            f_callControlExpect(mw_callHangUp(PX_MODEM_INSTANCE, ?), PX_TIMEOUT, true);

            adapterControl.send(m_setAutomaticAlAck(PX_MODEM_INSTANCE, true, c_positiveAlAck));
            f_adapterExpect(mw_anyConfigChanged);
@@ -1775,7 +1772,7 @@ module AtsECall_IVS_Testcases {
            t_callbackDelay.start;

            callControl.send(m_callCreate(PX_MODEM_INSTANCE, PX_IVS_PHONE_NUMBER));
            f_mnoExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));
            f_callControlExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));

            f_userVerify("Was the call-back automatically answered by the IVS?",
                "Call answered automatically",
@@ -1820,7 +1817,7 @@ module AtsECall_IVS_Testcases {
            // Test Body
            f_establishCall(ANY, TEST);

            f_verifyMSD(PX_ECALL_MESSAGE);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1869,7 +1866,7 @@ module AtsECall_IVS_Testcases {
            // Postamble: eCall has been successfully terminated by the PSAP
            f_establishCall(ANY, TEST);

            f_verifyMSD(ANY_DECODED_ECALL);
            f_verifyMSD();

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

@@ -1900,7 +1897,7 @@ module AtsECall_IVS_Testcases {
            }

            callControl.send(m_callCreate(PX_MODEM_INSTANCE, PX_IVS_PHONE_NUMBER));
            f_mnoExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));
            f_callControlExpect(mw_callEstablished(PX_MODEM_INSTANCE, ?));

            f_expectFeedback(mw_callVoiceConnectionEstablished(PX_MODEM_INSTANCE));

+227 −123

File changed.

Preview size limit exceeded, changes collapsed.

+74 −49
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@
 */
module LibItsECall_Pixits {
    
    import from MSDASN1Module language "ASN.1:1997" all
    with {
        encode "MSDEncode";
    };
    import from LibItsECall_TypesAndValues all;
    
    /**
@@ -63,60 +67,81 @@ module LibItsECall_Pixits {
    modulepar float PX_TIMEOUT := 30.0;
    
    /**
     * @desc Default eCall message
     */
    modulepar ECallMessageUnion PX_ECALL_MESSAGE := {
        decoded := {
            id := 1,
            msd := {
                msdStructure := {
                    messageIdentifier := 1,
                    control_ := {
                        automaticActivation := false,
                        testCall := true,
                        positionCanBeTrusted := true,
                        vehicleType := passengerVehicleClassM1
                    },
                    vehicleIdentificationNumber := {
     * @desc Vehicle type
     */
    modulepar VehicleType PX_VEHICLE_TYPE := passengerVehicleClassM1;
    
    /**
     * @desc Vehicle VIN number
     */
    modulepar VIN PX_VIN := {
        isowmi := "AAA",
        isovds := "AAAAAA",
        isovisModelyear := "A",
        isovisSeqPlant := "A123456"
                    },
                    vehiclePropulsionStorageType := {
    }
    
    /**
     * @desc Vehicle propulsion storage type
     */
    modulepar VehiclePropulsionStorageType PX_VEHICLE_PROPULSION_STORAGE_TYPE := {
        gasolineTankPresent := true,
                        dieselTankPresent := omit,
                        compressedNaturalGas := omit,
                        liquidPropaneGas := omit,
                        electricEnergyStorage := true,
                        hydrogenStorage := omit
                    },
                    timestamp := 123456789,
                    vehicleLocation := {
                        positionLatitude := 173881200,
                        positionLongitude := 41822520
                    },
                    vehicleDirection := 14,
                    recentVehicleLocationN1 := {
                        latitudeDelta := 10,
                        longitudeDelta := -10
                    },
                    recentVehicleLocationN2 := {
                        latitudeDelta := 10,
                        longitudeDelta := -20
                    },
                    numberOfPassengers := 2
                },
                optionalAdditionalData := omit
        dieselTankPresent := false,
        compressedNaturalGas := false,
        liquidPropaneGas := false,
        electricEnergyStorage := false,
        hydrogenStorage := false,
        otherStorage := false
    }

    /**
     * @desc Vehicle location
     */
    modulepar VehicleLocation PX_VEHICLE_LOCATION := {
        positionLatitude := 0,
        positionLongitude := 0
    }

    /**
     * @desc Vehicle direction
     */
    modulepar _0MSDStructure1 PX_VEHICLE_DIRECTION := 0;
    
    /**
     * @desc Recent location 1
     */
    modulepar VehicleLocationDelta PX_RECENT_VEHICLE_LOCATION_N1 := {
        latitudeDelta := 0,
        longitudeDelta := 0
    }
	
    /**
     * @desc Recent location 2
     */
    modulepar VehicleLocationDelta PX_RECENT_VEHICLE_LOCATION_N2 := {
        latitudeDelta := 0,
        longitudeDelta := 0
    }

    /**
     * @desc Vehicle passenger number
     */
    modulepar _0MSDStructure2 PX_NUMBER_OF_PASSENGERS := 1;
    
    /**
     * @desc Additional data
     */
    modulepar AdditionalData PX_ADDITIONAL_DATA := {
        oid := objid { 0 },
        data := ''O
    }
    
    /**
     * @desc Malformed eCall message
     */
    modulepar ECallMessageUnion PX_BAD_ECALL_MESSAGE := {
        encoded := '0123456789'O
    modulepar ECallMessage PX_BAD_ECALL_MESSAGE := {
        msdVersion := c_msdVersion,
        msd := '0123456789'O
    }
    
    group ivs {
+5 −51
Original line number Diff line number Diff line
@@ -23,57 +23,11 @@ module LibItsECall_Templates {
    };

    /**
     * @desc Template for any decoded eCall nmessage
     * @desc Receive template for any eCall message
     */
    template ECallMessageUnion ANY_DECODED_ECALL := { decoded := ? }
    
    /**
     * @desc Template for any automatic eCall
     */
    template ECallMessageUnion ANY_AUTOMATIC_ECALL modifies ANY_DECODED_ECALL :=  {
        decoded := {
            msd := {
                msdStructure := {
                    control_ := {
                        automaticActivation := true
                    }
                }
            }
        }
    }

    /**
     * @desc Template for any manual eCall
     */
    template ECallMessageUnion ANY_MANUAL_ECALL modifies ANY_DECODED_ECALL :=  {
        decoded := {
            msd := {
                msdStructure := {
                    control_ := {
                        automaticActivation := false
                    }
                }
            }
        }
    }

    /**
     * @desc Same as expandMsd but only works on values
     *
     * @return ECallMessageUnion with the decoded field set (if the input is valid), otherwise unchanged
     */
    function f_expandMsdValue(in ECallMessageUnion p_eCallMessageUnion) return ECallMessageUnion {
        // expand msd that was given as encoded if valid, otherwise leave as is
        if (ischosen(p_eCallMessageUnion.encoded)) {
            var ECallMessage v_msd;
            var bitstring v_encoded := oct2bit(p_eCallMessageUnion.encoded);
            
            if (decvalue(v_encoded, v_msd) == 0) {
                p_eCallMessageUnion.decoded := v_msd;
            }
        }

        return p_eCallMessageUnion;
    template ECallMessage mw_anyECallMessage := {
        msdVersion := ?,
        msd := ?
    }
    
    group eventTemplates {
@@ -112,7 +66,7 @@ module LibItsECall_Templates {
        template Event mw_inbandMsdReceived (
            template(present) integer p_worker,
            template(present) charstring p_time := ?,
            template(present) ECallMessageUnion p_eCallMessage := ?
            template(present) ECallMessage p_eCallMessage := ?
        ) := {
            inbandMsdReceived := {
                worker := p_worker,
+5 −1
Original line number Diff line number Diff line
@@ -14,6 +14,10 @@
 */
module LibItsECall_TestSystem {

    import from MSDASN1Module language "ASN.1:1997" all
    with {
        encode "MSDEncode";
    };
    import from LibItsECall_TypesAndValues all;
    import from LibLogger all;
    import from LibUserInterface all;
@@ -93,7 +97,7 @@ module LibItsECall_TestSystem {
         * @member vc_eCallMessage
         */
        type component IvsMtc extends ECallMtc {
            var ECallMessageUnion vc_eCallMessage;
            var ECallMessage vc_eCallMessage;
        }

        /**
Loading