Loading ttcn/TestCodec/TestCodec_DENM.ttcn +34 −1 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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 Loading ttcn/TestCodec/TestCodec_CAM.ttcn +1 −1 File changed.Contains only whitespace changes. Show changes Loading
ttcn/TestCodec/TestCodec_DENM.ttcn +34 −1 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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 Loading