Commit 1364d110 authored by garciay's avatar garciay
Browse files

ASN.1 Changes due to latest asn1c github version

Enhance UdpLayer
Bug fixed on CAM/DENM/BTP layers (TODO GeoNetworking LAYER)
Validation basic test cases for CAM/DENM/GeoNetworking
parent 7754aded
Loading
Loading
Loading
Loading
+34 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ module TestCodec_DENM {
        var bitstring v_encMsg;
        var UtDenmUpdate v_decMsg;
        var integer v_res := 0;
        var bitstring v_expEncMsg := oct2bit('12400001B207000A005E28CBC883005B0000'O);
        var bitstring v_expEncMsg := oct2bit('12400001B207000A005E28CBC883000000005B0000000000000000'O);
        var template (value) SituationContainer v_situation := m_situation(CauseCodeType_vehicleBreakdown_, VehicleBreakdownSubCauseCode_unavailable_);
        var template (value) UtDenmUpdate v_update := m_utUpdateEvent(m_tsActionId(10), v_situation);
        
@@ -230,6 +230,39 @@ module TestCodec_DENM {
        setverdict(pass, "Encoding passed.");
      } // End of tc_Denm_UtDenmUpdate_1

      /**
       * @desc Validate template Denm/UtDenmUpdate
       * @verdict Pass on success, Fail otherwise
       */
      testcase tc_Denm_UtDenmUpdate_2() runs on TCType system TCType {
        var bitstring v_encMsg;
        var UtDenmUpdate v_decMsg;
        var integer v_res := 0;
        var bitstring v_expEncMsg := oct2bit('12060001B207000A005E28CBC88300000000000000000040002000'O);
        var template (value) UtDenmUpdate v_update := m_utUpdateEvent(
                                                                      m_tsActionId(10),
                                                                      -, -, -, -, -, -,
                                                                      32, 64
                                                                      );
        
        // Encode template
        v_update.detectionTime := 404411369603;
        log("Encode template ", valueof(v_update));
        v_encMsg := encvalue(v_update);
        log("Encoded message:  ", bit2oct(v_encMsg));
        // Check result
        if (not isbound(v_encMsg)) {
          setverdict(fail, "Encoding failed!");
          stop;
        }
        if (not match(v_encMsg, v_expEncMsg)) {
          log("Expected message: ", bit2oct(valueof(v_expEncMsg)));
          setverdict(fail, "Encoding failed, not the expected result!");
          stop;
        }
        setverdict(pass, "Encoding passed.");
      } // End of tc_Denm_UtDenmUpdate_2

      /**
       * @desc Validate decoding of Denm/UtDenmTriggerResult
       * @verdict Pass on success, Fail otherwise
+1 −1

File changed.

Contains only whitespace changes.