Commits (8)
[submodule "lib/asn1"]
path = lib/asn1
url = https://forge.etsi.org/rep/ITS/asn1/denm_en302637_3.git
branch = testing
/**
* @author ETSI / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsDENM/ItsDenm_TestCases.ttcn $
* $Id: ItsDenm_TestCases.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Testcases for DEN Protocol
* @reference ETSI EN 302 637-3 v1.3.1
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsDenm_TestCases {
// ATS ITS
import from ItsDenm_TpFunctions all;
// LibIts
import from LibItsDenm_TestSystem all;
// 5.2.1
group denMessageTransmission {
// 5.2.1.1
group denMessageFormat {
/**
* @desc Check that protocolVersion is set to 2 and messageID is set to 1
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_Trigger request from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing ITS PDU header,
* containing protocolVersion
* indicating value 2
* and containing messageID
* indicating value 1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSGF/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, Annex B.1
*/
testcase TC_DEN_MSGF_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSGF_BV_01();
} // end TC_DEN_MSGF_BV_01
/**
* @desc Check that sent DENM contains at least one 'trace' DE
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_Trigger request from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing location container
* containing at least one 'trace'
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSGF/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.3.2
*/
testcase TC_DEN_MSGF_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSGF_BV_02();
} // end TC_DEN_MSGF_BV_02
} // end denMessageFormat
// 5.2.1.2
group denEventGeneration {
/**
* @desc Check that DEN Basic Service generates a new DENM on reception of a valid AppDENM_Trigger request
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_Trigger request from the application layer
* }
* then {
* the IUT sends a valid DENM
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.1
*/
testcase TC_DEN_EVGN_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_01();
} // end TC_DEN_EVGN_BV_01
/**
* @desc Check that a new ActionID value is assigned for each newly generated DENM
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several events
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new event
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating an unused value
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.1.1
*/
testcase TC_DEN_EVGN_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_02();
} // end TC_DEN_EVGN_BV_02
/**
* @desc Check that a newly created ActionID contains the StationID of the originating ITS-S that detected the event
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new event
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* containing originatingStationID
* indicating its own StationID
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-03
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.1.1
*/
testcase TC_DEN_EVGN_BV_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_03();
} // end TC_DEN_EVGN_BV_03
/**
* @desc Check that Cause and subcause values included in DENM as provided by application
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_trigger request from the application layer
* containing situation container
* containing eventType
* containing causeCode
* indicating Value1
* containing subCauseCode
* indicating Value2
* }
* then {
* the IUT sends a valid DENM
* containing situation container
* containing eventType
* containing causeCode
* indicating Value1
* containing subCauseCode
* indicating Value2
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 7.1.3
*/
testcase TC_DEN_EVGN_BV_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_04();
} // end TC_DEN_EVGN_BV_04
/**
* @desc Check that referenceTime is set to the current time when generating a DENM for a new event
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several events
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new event
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing referenceTime
* indicating CLT
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-05
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.3
*/
testcase TC_DEN_EVGN_BV_05() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_05();
} // end TC_DEN_EVGN_BV_05
/**
* @desc Check that sequenceNumber is set to a next unused value each time an event is detected
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several events
* and the IUT having generated its last DENM
* containing management container
* containing actionID
* containing sequenceNumber
* indicating SEQ1
* and no active event being associated with sequenceNumber SEQ1 + 1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new event
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* containing sequenceNumber
* indicating SEQ1 + 1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-07
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.1.1, 8.2.1.2
*/
testcase TC_DEN_EVGN_BV_07() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_07();
} // end TC_DEN_EVGN_BV_07
/**
* @desc Check that actionID are generated using newly assigned stationID when a pseudonym change occurs
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several events
* containing management container
* containing actionID
* containing originatingStationID
* indicating STATION_ID_1
* and the IUT having changed its StationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new event
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* containing originatingStationID
* indicating its new StationID
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVGN/BV-10
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.1.2
*/
testcase TC_DEN_EVGN_BV_10() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVGN_BV_10();
} // end TC_DEN_EVGN_BV_10
} // end denEventGeneration
// 5.2.1.3
group denEventUpdate {
/**
* @desc Check that DEN Basic Service generates an update DENM on reception of a valid AppDENM_update request
* <pre>
* PICS Selection: PICS_DENM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_update request from the application layer
* }
* then {
* the IUT sends a valid DENM
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVUP/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.2
*/
testcase TC_DEN_EVUP_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVUP_BV_01();
} // end TC_DEN_EVUP_BV_01
/**
* @desc Check that the actionID is not changed by DENM update, as long as the stationID of the originating ITS-S remains unchanged
* <pre>
* PICS Selection: PICS_DENM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and the IUT not having changed its stationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_update request associated with ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVUP/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.2.2, 8.1.1.1
*/
testcase TC_DEN_EVUP_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVUP_BV_02();
} // end TC_DEN_EVUP_BV_02
/**
* @desc Check that referenceTime is set to the current time when generating a DENM for an updated eventCheck
* <pre>
* PICS Selection: PICS_DENM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing referenceTime
* indicating REFERENCETIME1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_update request associated with ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating CLT > REFERENCETIME1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVUP/BV-03
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.2
*/
testcase TC_DEN_EVUP_BV_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVUP_BV_03();
} // end TC_DEN_EVUP_BV_03
/**
* @desc Check that DEN Basic Service does not send any update DENM if actionID is not in originating ITS-S message table
* <pre>
* PICS Selection: PICS_DENM_UPDATE
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* and the IUT not having sent an event being associated with actionID ACTION_ID1
* containing originatorStationID
* indicating its own stationID
* and containing sequenceNumber
* indicating SEQ1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to update an event associated to ACTION_ID1
* }
* then {
* the IUT does not send any DENM for this event
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVUP/BO-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.1.2
*/
testcase TC_DEN_EVUP_BO_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVUP_BO_04();
} // end TC_DEN_EVUP_BO_04
} // end denEventUpdate
// 5.2.1.4
group denEventTermination {
/**
* @desc Check that DEN Basic Service generates a cancellation DENM when application indicates the
* premature termination of an event for which it is the originator
* <pre>
* PICS Selection: PICS_DENM_CANCELLATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing termination
* indicating value isCancellation
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.2.4, 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_01();
} // end TC_DEN_EVTR_BV_01
/**
* @desc Check that DEN Basic Service generates a negation DENM when application indicates the
* premature termination of an event for which it is not the originator
* <pre>
* PICS Selection: PICS_DENM_NEGATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing originatorStationID
* indicating stationID different from its own stationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing termination
* indicating value isNegation
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.4
*/
testcase TC_DEN_EVTR_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_02();
} // end TC_DEN_EVTR_BV_02
/**
* @desc Check that referenceTime is set to the latest value received for this event in negation DENM
* <pre>
* PICS Selection: PICS_DENM_NEGATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing originatorStationID
* indicating stationID different from its own stationID
* and containing referenceTime
* indicating REFERENCETIME1
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME2 > REFERENCETIME1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating value REFERENCETIME2
* and containing termination
* indicating value isNegation
* }
* }
* </pre>
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-03
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.2.4, 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_03();
} // end TC_DEN_EVTR_BV_03
/**
* @desc Check that situation container, location container and alacarte container are not present in a cancellation DENM
* <pre>
* PICS Selection: PICS_DENM_CANCELLATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing termination
* indicating value isCancellation
* and not containing situation container
* and not containing location container
* and not containing alacarte container
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 7.1.1
*/
testcase TC_DEN_EVTR_BV_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_04();
} // end TC_DEN_EVTR_BV_04
/**
* @desc Check that situation container, location container and alacarte container are not present in a negation DENM
* <pre>
* PICS Selection: PICS_DENM_NEGATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing originatorStationID
* indicating stationID different from its own stationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing termination
* indicating value isNegation
* and not containing situation container
* and not containing location container
* and not containing alacarte container
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-05
* @reference ETSI EN 302 637-3 v1.3.1, clause 7.1.1
*/
testcase TC_DEN_EVTR_BV_05() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_05();
} // end TC_DEN_EVTR_BV_05
/**
* @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in
* originating ITS-S message table or receiving ITS-S message table (own stationID)
* <pre>
* PICS Selection: PICS_DENM_NEGATION OR PICS_DENM_CANCELLATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated several events
* and the IUT not having send event being associated with ACTION_ID1
* containing originatingStationID
* indicating its own stationID
* and containing sequenceNumber
* indicating SEQ1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to terminate an event associated to ACTION_ID1
* containing originatingStationID
* indicating its own stationID
* and containing sequenceNumber
* indicating SEQ1
* }
* then {
* the IUT does not send send any termination DENM for this event
* }
* }
* NOTE: Event associated to ACTION_ID1 cannot be present in receiving ITS-S message
* table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BO-07)
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BO-06
* @reference ETSI EN 302 637-3 v1.3.1, clauses 8.2.2
*/
testcase TC_DEN_EVTR_BO_06() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BO_06();
} // end TC_DEN_EVTR_BO_06
/**
* @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in
* originating ITS-S message table or receiving ITS-S message table (other stationID)
* <pre>
* PICS Selection: PICS_DENM_CANCELLATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received several events
* and the IUT not having received event being associated with ACTION_ID1
* containing originatingStationID
* indicating STATION_ID1 different from its own stationID
* and containing sequenceNumber
* indicating SEQ1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to terminate an event associated to ACTION_ID1
* containing originatingStationID
* indicating STATION_ID1
* and containing sequenceNumber
* indicating SEQ1
* }
* then {
* the IUT does not send send any termination DENM for this event
* }
* }
* NOTE: Event associated to ACTION_ID1 cannot be present in originating ITS-S message table as its
* stationID is not IUT’s stationID (see TP/DEN/EVTR/BO-06)
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BO-07
* @reference ETSI EN 302 637-3 v1.3.1, clauses 8.2.2
*/
testcase TC_DEN_EVTR_BO_07() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BO_07();
} // end TC_DEN_EVTR_BV_07
/**
* @desc Check that referenceTime is set to to the current time when generating a cancellation DENM
* <pre>
* PICS Selection: PICS_DENM_CANCELLATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generated an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_1
* and containing referenceTime
* indicating REFERENCETIME1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_termination request associated with ACTION_ID1 from the application layer
* }
* then {
* the IUT sends a valid DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing termination
* indicating value isCancellation
* and containing referenceTime
* indicating CLT
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVTR/BV-08
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.3
*/
testcase TC_DEN_EVTR_BV_08() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVTR_BV_08();
} // end TC_DEN_EVTR_BV_08
} // end denEventTermination
// 5.2.1.5
group denMessageRepetition {
/**
* @desc Check that DEN Basic Sercive repeats DENM transmission according to repetitionInterval parameter provided by application
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from the application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated an the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_1
* and containing transmissionInterval
* indicating INTERVAL_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with INTERVAL_1
* }
* then {
* the IUT repeats the transmission of the valid DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/TI-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.3 and 8.2.2
*/
testcase TC_DEN_EVRP_TI_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_TI_01();
} // end TC_DEN_EVRP_TI_01
/**
* @desc Check that the repeated DENM is always the most up-to-date message
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from the application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated an the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and the IUT having generated an update of the event associated with ACTION_ID1 modifying partly the event
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with INTERVAL_1
* }
* then {
* the IUT repeats the transmission of the valid DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.2.3 and 8.2.2
*/
testcase TC_DEN_EVRP_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_02();
} // end TC_DEN_EVRP_BV_02
/**
* @desc Check that DEN Basic Service stops retransmitting DENM after event’s validityDuration
* expiration
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_1
* and the IUT having repeated (one or more times) the transmission of the valid DENM associated with ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with DURATION_2
* }
* then {
* the IUT stops the retransmission of the DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-03
* @reference ETSI EN 302 637-3 v1.3.1, clauses 6.1.2.4 and 8.2.2
*/
testcase TC_DEN_EVRP_BV_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_03();
} // end TC_DEN_EVRP_BV_03
/**
* @desc Check that DEN Basic Service stops retransmitting DENM after event’s repetitionDuration
* expiration
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_2
* and the IUT having repeated (one or more times) the transmission of the valid DENM associated with ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with DURATION_2
* }
* then {
* the IUT stops the retransmission of the most up-to-date valid DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_EVRP_BV_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_04();
} // end TC_DEN_EVRP_BV_04
/**
* @desc Check that DEN Basic Service does not repeat transmission of DENM if repetitionInterval is
* not provided by application
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* not containing repetitionInterval
* and the IUT having generated an the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT has detected that repetitionInterval is not provided for the event associated with ACTION_ID1
* }
* then {
* the IUT does not repeat the transmission of the valid DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-05
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.1.2
*/
testcase TC_DEN_EVRP_BV_05() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_05();
} // end TC_DEN_EVRP_BV_05
/**
* @desc Check that DEN Basic Service does not repeat transmission of DENM if repetitionDuration is
* not provided by application
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* not containing repetitionDuration
* and the IUT having generated an the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT has detected that repetitionDuration is not provided for the event associated with ACTION_ID1
* }
* then {
* the IUT does not repeat the transmission of the valid DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-06
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.1.2
*/
testcase TC_DEN_EVRP_BV_06() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_06();
} // end TC_DEN_EVRP_BV_06
/**
* @desc Check that existing actionID in originating ITS-S are updated when stationID is modified
*
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* containing originatororiginatingStationID
* indicating STATION_ID_1
* and containing validityDuration
* indicating DURATION_1
* and the IUT having changed its StationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT changes its StationID and is alerted of expiration of the time associated with INTERVAL_1
* }
* then {
* the IUT repeats the transmission of the valid DENM
* containing management container
* containing actionID
* containing originatingStationID
* indicating its new StationID
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-08
* @reference ETSI EN 302 637-3 v1.3.1, clause 6.1.1.2
*/
testcase TC_DEN_EVRP_BV_08() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_08();
} // end TC_DEN_EVRP_BV_08
/**
* @desc Check that actionID is not modified in repetitions of DENM if stationID is not modified
*
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID_1
* and containing validityDuration
* indicating DURATION_1
* and the IUT not having changed its StationID
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with INTERVAL_1
* }
* then {
* the IUT repeats the transmission of the valid DENM
* containing management container
* containing actionID
* indicating its ACTION_ID_1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-09
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.2
*/
testcase TC_DEN_EVRP_BV_09() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_09();
} // end TC_DEN_EVRP_BV_09
/**
* @desc Check that actionID is not modified in repetitions of DENM if stationID is not modified
*
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1
* and containing validityDuration
* indicating DURATION_2 > DURATION_1
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID_1
* and containing validityDuration
* indicating DURATION_2
* and containing referenceTime
* indicating REFERENCE_TIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with INTERVAL_1
* }
* then {
* the IUT repeats the transmission of the valid DENM
* containing management container
* containing actionID
* indicating its ACTION_ID_1
* and containing referenceTime
* indicating REFERENCE_TIME_1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-10
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.2
*/
testcase TC_DEN_EVRP_BV_10() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_10();
} // end TC_DEN_EVRP_BV_10
/**
* @desc Check that DEN Basic Service stops retransmitting DENM after event's validityDuration expiration,
* when validityDuration was not provided
*
* <pre>
* PICS Selection: PICS_DENM_REPETITION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an AppDENM_trigger request from application layer
* containing repetitionInterval
* indicating INTERVAL_1
* and containing repetitionDuration
* indicating DURATION_1 > defaultValidityDuration
* and not containing validityDuration
* and the IUT having generated the corresponding event
* containing management container
* containing actionID
* indicating ACTION_ID_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the defaultValidityDuration
* }
* then {
* the IUT stops the retransmission of the DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/EVRP/BV-11
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.5
*/
testcase TC_DEN_EVRP_BV_11() runs on ItsDenm system ItsDenmSystem {
f_DEN_EVRP_BV_11();
} // end TC_DEN_EVRP_BV_11
} // end denMessageRepetition
// 5.2.1.6
group denMessageLowerLayerParameters {
/**
* @desc Check that DENM is encapsulated in BTP type B packet
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a DENM is generated
* }
* then {
* the IUT sends a DENM
* encapsulated in a BTP-B packet
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/PAR/BV-01
* @reference EN 302 637-3 clause 5.4.2.2
*/
testcase TC_DEN_PAR_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_PAR_BV_01();
} // end TC_DEN_PAR_BV_01
/**
* @desc Check that DENM is encapsulated in a GBC packet
* <pre>
* PICS Selection: PICS_DENM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* a DENM is generated
* }
* then {
* the IUT sends a DENM
* encapsulated in a GBC packet
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/PAR/BV-02
* @reference EN 302 637-3 clause 5.4.2.2
*/
testcase TC_DEN_PAR_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_PAR_BV_02();
} // end TC_DEN_PAR_BV_02
} // end denMessageLowerLayerParameters
group denMessageSSP {
/**
* @desc Check that IUT does not send a DENM if it is not permitted by signing certificate
*
* <pre>
* PICS Selection: PICS_DENM_GENERATION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* the IUT is authorized to sign DENMs with the certificate
* containing DENM SSP
* not containing pemisions to send trafficCondition cause code
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_trigger request from the application layer
* containing situation container
* containing eventType
* containing causeCode
* indicating trafficCondition
* }
* then {
* the IUT does not send this DENM
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/SSP/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_SSP_BV_01_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_SSP_BV_01_01();
} // end TC_DEN_SSP_BV_01_01
/**
* @desc Check that IUT does not send a DENM if it is not permitted by signing certificate
*
* <pre>
* PICS Selection: PICS_DENM_GENERATION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* the IUT is authorized to sign DENMs with the certificate
* containing DENM SSP
* not containing pemisions to send 'accident' cause code
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppDENM_trigger request from the application layer
* containing situation container
* containing eventType
* containing causeCode
* indicating 'accident'
* }
* then {
* the IUT does not send this DENM
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/SSP/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_SSP_BV_01_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_SSP_BV_01_02();
} // end TC_DEN_SSP_BV_01_02
}
} // end denMessageTransmission
// 5.2.2
group denMessageReception {
/**
* @desc Check that receiving ITS-S transmits DENM to application if it concerns an unknown ActionID and if it is not a termination DENM
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT not having received DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM that is not a termination
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* then {
* the IUT transmits the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BV_01();
} // end TC_DEN_MSRV_BV_01
/**
* @desc Check that receiving ITS-S transmits DENM to application if it concerns a known ActionID
* and referenceTime is greater than highest value received for this ActionID
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_2 greater than REFERENCETIME_1
* }
* then {
* the IUT transmits the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BV_02();
} // end TC_DEN_MSRV_BV_02
/**
* @desc Check that receiving ITS-S discards termination DENM if it concerns an unknown ActionID (own actionID)
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received several events
* and the IUT not having received DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a termination DENM
* containing actionID
* indicating ACTION_ID1
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BO-03
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.3.2
*/
testcase TC_DEN_MSRV_BO_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_03();
} // end TC_DEN_MSRV_BO_03
/**
* @desc Check that receiving ITS-S discards termination DENM if it concerns an unknown ActionID (other actionID)
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* and the IUT having received several events
* and the IUT not having received DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a termination DENM
* containing actionID
* indicating ACTION_ID1
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BO-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.3.2
*/
testcase TC_DEN_MSRV_BO_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_04();
} // end TC_DEN_MSRV_BO_04
/**
* @desc Check that receiving ITS-S discards DENM if referenceTime is lower than highest value received for this ActionID
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_2 lower than REFERENCETIME_1
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BO-05
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.3.2
*/
testcase TC_DEN_MSRV_BO_05() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_05();
} // end TC_DEN_MSRV_BO_05
/**
* @desc Check that receiving ITS-S discards DENM if detectionTime is smaller than highest value received for this ActionID
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* and containing detectionTime
* indicating TIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* and containing detectionTime
* indicating TIME_2 not more recent than TIME_1
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BO-06
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.3.2
*/
testcase TC_DEN_MSRV_BO_06() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_06();
} // end TC_DEN_MSRV_BO_06
/**
* @desc Check that receiving ITS-S transmits DENM to application if it concerns a known ActionID and referenceTime
* is equal to highest received value and detectionTime is more recent
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* and containing detectionTime
* indicating TIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating REFERENCETIME_1
* and containing detectionTime
* indicating TIME_2 more recent than TIME_1
* }
* then {
* the IUT transmits the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-07
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.3.2
*/
testcase TC_DEN_MSRV_BV_07() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BV_07();
} // end TC_DEN_MSRV_BV_07
group denMessageReceptionSSP {
/**
* @desc Check that receiving ITS-S discards DENM for new event
* if SSP value of the signing certificate is not consistent with the causeCode
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured DENM
* containing situation container
* containing eventType
* containing causeCode
* indicating 'trafficCondition'
* containing signing certificate
* containing SSP
* not permitting to send DENM
* containing causeCode
* indicating 'trafficCondition'
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-08-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BO_08_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_08_01();
} // end TC_DEN_MSRV_BO_08_01
/**
* @desc Check that receiving ITS-S discards DENM for new event
* if SSP value of the signing certificate is not consistent with the causeCode
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured DENM
* containing situation container
* containing eventType
* containing causeCode
* indicating 'accident'
* containing signing certificate
* containing SSP
* not permitting to send DENM
* containing causeCode
* indicating 'accident'
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-08-0@reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BO_08_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_08_02();
} // end TC_DEN_MSRV_BO_08_02
/**
* @desc Check that receiving ITS-S discards DENM for existing event
* if SSP value of the signing certificate is not consistent with the causeCode
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a secured DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing situation container
* containing eventType
* containing causeCode
* indicating 'trafficCondition'
* containing signing certificate
* containing SSP
* permitting to send DENM
* containing causeCode
* indicating 'trafficCondition'
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing situation container
* containing eventType
* containing causeCode
* indicating 'trafficCondition'
* containing signing certificate
* containing SSP
* permitting to send DENM
* containing causeCode
* indicating 'trafficCondition'
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-09-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BO_09_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_09_01();
} // end TC_DEN_MSRV_BO_09_01
/**
* @desc Check that receiving ITS-S discards DENM for existing event
* if SSP value of the signing certificate is not consistent with the causeCode
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION AND PICS_IS_IUT_SECURED
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a secured DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing situation container
* containing eventType
* containing causeCode
* indicating 'accident'
* containing signing certificate
* containing SSP
* permitting to send DENM
* containing causeCode
* indicating 'accident'
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a secured DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* containing situation container
* containing eventType
* containing causeCode
* indicating 'accident'
* containing signing certificate
* containing SSP
* permitting to send DENM
* containing causeCode
* indicating 'accident'
* }
* then {
* the IUT discards the DENM
* and the IUT does not forward the DENM content to upper layer
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-09-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.4.2
*/
testcase TC_DEN_MSRV_BO_09_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BO_09_02();
} // end TC_DEN_MSRV_BO_09_02
} // end denMessageReceptionSSP
/**
* @desc Check that receiving ITS-S replies to requestResponseIndication
*
* <pre>
* PICS Selection: PICS_DENM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing alacarte container
* containing ImpactReductionContainer
* containing requestResponseIndication
* indicating request(0)
* }
* then {
* the IUT sends a DENM
* containing management container
* containing actionID
* indicating ACTION_ID2
* and containing alacarte container
* containing ImpactReductionContainer
* containing requestResponseIndication
* indicating response(1)
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/MSRV/BV-10
* @reference ETSI EN 302 637-3 v1.3.1, clause B.40
*/
testcase TC_DEN_MSRV_BV_10() runs on ItsDenm system ItsDenmSystem {
f_DEN_MSRV_BV_10();
} // end TC_DEN_MSRV_BV_10
} // end denMessageReception
// 5.2.3
group denKeepAliveForwarding {
/**
* @desc Check that forwarding ITS-S forwards DENM if no DENM with same ActionId has been received during forwarding delay
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value more than 3 times greater than TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-01
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_01() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_01();
} // end TC_DEN_KAFW_BV_01
/**
* @desc Check that forwarding ITS-S forwards DENM if no DENM with same ActionId and referenceTime greater
* or equal to the last received DENM has been received during forwarding delay
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing referenceTime
* indicating REFERENCETIME_1
* and containing validityDuration
* indicating value more than 3 times greater than TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT having received DENM
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating value REFERENCETIME_2 < REFERENCETIME_1
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* and containing referenceTime
* indicating value REFERENCETIME_3 > REFERENCETIME_1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-02
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_02() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_02();
} // end TC_DEN_KAFW_BV_02
/**
* @desc Check that forwarding delay is set to min(2*transmissionInterval + rnd(0, 150ms), validityDuration)
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1 at a point of time corresponding to
* min ( 2*transmissionInterval + rnd ( 0, 150ms ), validityDuration )
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/TI-03
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.4
*/
testcase TC_DEN_KAFW_TI_03() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_TI_03();
} // end TC_DEN_KAFW_TI_03
/**
* @desc Check that Forwarding ITS-S replaces the ITS PDU header of forwarded DENMs
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value more than 3 times greater than TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* containing ITS PDU header
* containing StationID
* indicating its own stationID
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-04
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.6
*/
testcase TC_DEN_KAFW_BV_04() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_04();
} // end TC_DEN_KAFW_BV_04
/**
* @desc Check that forwarding ITS-S does not change actionID
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value more than 3 times greater than TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM
* containing management container
* containing actionID
* indicating ACTION_ID1
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-05
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.1
*/
testcase TC_DEN_KAFW_BV_05() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_05();
} // end TC_DEN_KAFW_BV_05
/**
* @desc Check that forwarding ITS-S does not change referenceTime
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
* and containing referenceTime
* indicating REFERENCETIME_1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* containing management container
* containing referenceTime
* indicating REFERENCETIME_1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-06
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.2
*/
testcase TC_DEN_KAFW_BV_06() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_06();
} // end TC_DEN_KAFW_BV_06
/**
* @desc Check that forwarding ITS-S does not change termination
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and containing validityDuration
* indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
* and containing termination
* indicating isNegation
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* containing management container
* containing termination
* indicating isNegation
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-07
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.3
*/
testcase TC_DEN_KAFW_BV_07() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_07();
} // end TC_DEN_KAFW_BV_07
/**
* @desc Check that Forwarding ITS-S does not modify management, situation, location and alacarte containers
* when forwarding a DENM
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received a DENM
* containing management container
* indicating MANACEMENTCONTAINER_1
* and containing situation container
* indicating SITUATION_1
* and containing location container
* indicating LOCATION_1
* and containing alacarte container
* indicating ALACARTE_1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the timer T_Forwarding expires
* }
* then {
* the IUT reconstructs and sends the DENM associated to ACTION_ID1
* containing management container
* indicating MANACEMENTCONTAINER_1
* and containing situation container
* indicating SITUATION_1
* and containing location container
* indicating LOCATION_1
* and containing alacarte container
* indicating ALACARTE_1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-08
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.1.6
*/
testcase TC_DEN_KAFW_BV_08() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_08();
} // end TC_DEN_KAFW_BV_08
/**
* @desc Check that forwarding ITS-S stops forwarding DENM after validity expiration
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing validityDuration
* indicating DURATION_1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted of expiration of the time associated with DURATION_1
* }
* then {
* the IUT stops to reconstruct and to send the DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-09
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_09() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_09();
} // end TC_DEN_KAFW_BV_09
/**
* @desc Check that forwarding ITS-S stops forwarding DENM if it is outside relevance area
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having received an event
* containing management container
* containing actionID
* indicating ACTION_ID1
* and containing transmissionInterval
* indicating TRANS_INTERVAL1
* and the IUT having starting timer T_Forwarding for this DENM
* and the IUT not having received further DENM
* containing actionID
* indicating ACTION_ID1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is alerted that its position is now outside of the relevance area associated with ACTION_ID1
* }
* then {
* the IUT stops to reconstruct and to send the DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI 102 869-2 v1.6.1 TP/DEN/KAFW/BV-10
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_10() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_10();
} // end TC_DEN_KAFW_BV_10
/**
* @desc Check that forwarding ITS-S does not forward DENM is transmissionInterval is not present
* <pre>
* PICS Selection: PICS_DENM_KAF
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a DENM
* containing actionID
* indicating ACTION_ID1
* and not containing transmissionInterval
* }
* then {
* the IUT does not reconstruct and send the DENM associated with ACTION_ID1
* }
* }
* </pre>
*
* @see ETSI TS 102 869-2 v1.6.1 TP/DEN/KAFW/BV-10
* @reference ETSI EN 302 637-3 v1.3.1, clause 8.2.2
*/
testcase TC_DEN_KAFW_BV_11() runs on ItsDenm system ItsDenmSystem {
f_DEN_KAFW_BV_11();
} // end TC_DEN_KAFW_BV_11
} // end denKeepAliveForwarding
} // end ItsDenm_TestCases
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsDENM/ItsDenm_TestControl.ttcn $
* $Id: ItsDenm_TestControl.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Test Control file for DENM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsDenm_TestControl {
// ATS DENM
import from ItsDenm_TestCases all;
// LibIts
import from LibItsDenm_Pics all;
// Test Execution
control {
if(PICS_DENM_GENERATION) {
execute(TC_DEN_MSGF_BV_01());
execute(TC_DEN_MSGF_BV_02());
execute(TC_DEN_EVGN_BV_01());
execute(TC_DEN_EVGN_BV_02());
execute(TC_DEN_EVGN_BV_03());
execute(TC_DEN_EVGN_BV_04());
execute(TC_DEN_EVGN_BV_05());
execute(TC_DEN_EVGN_BV_07());
execute(TC_DEN_EVGN_BV_10());
}
if(PICS_DENM_UPDATE) {
execute(TC_DEN_EVUP_BV_01());
execute(TC_DEN_EVUP_BV_02());
execute(TC_DEN_EVUP_BV_03());
execute(TC_DEN_EVUP_BO_04());
}
if(PICS_DENM_CANCELLATION) {
execute(TC_DEN_EVTR_BV_01());
execute(TC_DEN_EVTR_BV_04());
execute(TC_DEN_EVTR_BV_08());
}
if(PICS_DENM_NEGATION) {
execute(TC_DEN_EVTR_BV_02());
execute(TC_DEN_EVTR_BV_03());
execute(TC_DEN_EVTR_BV_05());
}
if(PICS_DENM_NEGATION or PICS_DENM_CANCELLATION) {
execute(TC_DEN_EVTR_BO_06());
execute(TC_DEN_EVTR_BO_07());
}
if(PICS_DENM_REPETITION) {
execute(TC_DEN_EVRP_TI_01());
execute(TC_DEN_EVRP_BV_02());
execute(TC_DEN_EVRP_BV_03());
execute(TC_DEN_EVRP_BV_04());
execute(TC_DEN_EVRP_BV_05());
execute(TC_DEN_EVRP_BV_06());
execute(TC_DEN_EVRP_BV_08());
execute(TC_DEN_EVRP_BV_09());
execute(TC_DEN_EVRP_BV_10());
execute(TC_DEN_EVRP_BV_11());
}
if(PICS_DENM_GENERATION) {
execute(TC_DEN_PAR_BV_01());
execute(TC_DEN_PAR_BV_02());
if(PICS_IS_IUT_SECURED) {
execute(TC_DEN_SSP_BV_01_01());
execute(TC_DEN_SSP_BV_01_02());
}
}
if(PICS_DENM_RECEPTION) {
execute(TC_DEN_MSRV_BV_01());
execute(TC_DEN_MSRV_BV_02());
execute(TC_DEN_MSRV_BO_03());
execute(TC_DEN_MSRV_BO_04());
execute(TC_DEN_MSRV_BO_05());
execute(TC_DEN_MSRV_BO_06());
execute(TC_DEN_MSRV_BV_07());
if(PICS_IS_IUT_SECURED) {
execute(TC_DEN_MSRV_BO_08_01());
execute(TC_DEN_MSRV_BO_08_02());
execute(TC_DEN_MSRV_BO_09_01());
execute(TC_DEN_MSRV_BO_09_02());
}
if(PICS_IMPACT_REDUCTION) {
execute(TC_DEN_MSRV_BV_10());
}
}
if(PICS_DENM_KAF) {
execute(TC_DEN_KAFW_BV_01());
execute(TC_DEN_KAFW_BV_02());
execute(TC_DEN_KAFW_TI_03());
execute(TC_DEN_KAFW_BV_04());
execute(TC_DEN_KAFW_BV_05());
execute(TC_DEN_KAFW_BV_06());
execute(TC_DEN_KAFW_BV_07());
execute(TC_DEN_KAFW_BV_08());
execute(TC_DEN_KAFW_BV_09());
execute(TC_DEN_KAFW_BV_10());
}
}
} // end ItsDenm_TestControl
\ No newline at end of file
/**
* @author ETSI / STF484 / STF517 / STF525
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn $
* $Id: ItsDenm_TpFunctions.ttcn,v 1.3 2018/05/31 15:57:11 dte Exp $
* @desc DENM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsDenm_TpFunctions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_Time all;
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibIts
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
// LibItsDenm
import from LibItsDenm_TestSystem all;
import from LibItsDenm_Functions all;
import from LibItsDenm_Templates all;
import from LibItsDenm_TypesAndValues all;
import from LibItsDenm_Pics all;
// LibItsSecurity
import from LibItsSecurity_Functions all;
// 5.2.1
group denMessageTransmission {
// 5.2.1.1
group denMessageFormat {
/**
* @desc TP Function for TC_DEN_MSGF_BV_01
*/
function f_DEN_MSGF_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm,
mw_anyStationId,
LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_denm_
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_MSGF_BV_01
/**
* @desc TP Function for TC_DEN_MSGF_BV_02
*/
function f_DEN_MSGF_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
-,
mw_denmLocationWithTrace({ ?, * })
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_MSGF_BV_02
} // end denMessageFormat
// 5.2.1.2
group denEventGeneration {
/**
* @desc TP Function for TC_DEN_EVGN_BV_01
*/
function f_DEN_EVGN_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (mw_anyDenmMgmtCon)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_01
/**
* @desc TP Function for TC_DEN_EVGN_BV_02
*/
function f_DEN_EVGN_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_slowVehicle_, LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_)
};
var boolean v_success := true;
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations) - 1; i := i + 1) {
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[i])));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
log("v_actionIds[", i, "] = ", v_actionIds[i]);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[lengthof(v_situations) - 1])));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID;
log("New v_actionIds[", lengthof(v_actionIds) - 1, "] = ", v_actionIds[lengthof(v_actionIds) - 1]);
//check the action id
log("l = ", lengthof(v_actionIds));
log("i = ", lengthof(v_actionIds) - 1, ", sequenceNumber=", v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber);
for (i := 0; i < lengthof(v_actionIds) - 1; i := i + 1) {
log("i = ", i, ", sequenceNumber=", v_actionIds[i].sequenceNumber);
if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) {
v_success := false;
}
}
if (v_success==true) {
log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
for (i := 0; i < lengthof(v_actionIds); i := i + 1) {
f_poCancelEvent(e_iut, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVGN_BV_02
/**
* @desc TP Function for TC_DEN_EVGN_BV_03
*/
function f_DEN_EVGN_BV_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithActionID(
v_actionId
)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_03
/**
* @desc TP Function for TC_DEN_EVGN_BV_04
*/
function f_DEN_EVGN_BV_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
v_situation
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_04
/**
* @desc TP Function for TC_DEN_EVGN_BV_05
*/
function f_DEN_EVGN_BV_05() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_slowVehicle_, LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_)
};
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
var TimestampIts v_timestampIts;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations) - 1; i := i + 1) {
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[i])));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
v_timestampIts := v_denmInd.msgIn.denm.management.referenceTime;
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[lengthof(v_situations) - 1])));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithReferenceTime(?)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID;
if (v_timestampIts<v_denmInd.msgIn.denm.management.referenceTime) {
log("*** " & testcasename() & ": PASS: Reference Time has increased since last received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: Reference Time has not increased since last received DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
for (i := 0; i < lengthof(v_actionIds); i := i + 1) {
f_poCancelEvent(e_iut, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVGN_BV_05
/**
* @desc TP Function for TC_DEN_EVGN_BV_07
*/
function f_DEN_EVGN_BV_07() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_slowVehicle_, LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_)
};
var SequenceNumber v_sequenceNumber;
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations) - 1; i := i + 1) {
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[i])));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID);
}
//save the last sequence number
v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[lengthof(v_situations) - 1])));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtConWithActionID(
mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber))
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
v_actionId := v_denmInd.msgIn.denm.management.actionID;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVGN_BV_07
/**
* @desc TP Function for TC_DEN_EVGN_BV_10
*/
function f_DEN_EVGN_BV_10() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation (LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_ );
var StationID v_stationId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_stationId := f_getIutStationId ( );
f_utChangePseudonym ( m_utDenmChangePseudonym );
f_utTriggerEvent ( m_utTriggerEvent ( v_situation) );
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd {
tc_ac.stop;
if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) {
log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVGN_BV_10
} // end denEventGeneration
// 5.2.1.3
group denEventUpdate {
/**
* @desc TP Function for TC_DEN_EVUP_BV_02
*/
function f_DEN_EVUP_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (mw_anyDenmMgmtCon)
)
)
) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVUP_BV_01
/**
* @desc TP Function for TC_DEN_EVUP_BV_02
*/
function f_DEN_EVUP_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (
mw_denmMgmtConWithActionID(
v_actionId
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVUP_BV_02
/**
* @desc TP Function for TC_DEN_EVUP_BV_03
*/
function f_DEN_EVUP_BV_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp;
var integer v_diff;
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_timestampIts := f_getCurrentTime();
//log("v_timestampIts: ", v_timestampIts);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime;
//log("v_referenceTime1: ", v_referenceTime1);
v_diff := v_timestampIts - v_referenceTime1;
//log("v_diff: ", v_diff);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (
mw_denmMgmtCon(
v_actionId
)
)
)
)
) -> value v_denmInd {
tc_ac.stop;
v_timestampIts := f_getCurrentTime();
//log("v_timestampIts: ", v_timestampIts);
v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime;
//log("v_msgtimestamp: ", v_msgtimestamp);
if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) {
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVUP_BV_03
/**
* @desc TP Function for TC_DEN_EVUP_BO_04
*/
function f_DEN_EVUP_BO_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_UPDATE) {
log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
f_utUpdateEvent(m_utUpdateEvent(m_actionId(f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId()), v_situation));
tc_noac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (
mw_denmMgmtCon(
m_actionId(
f_increaseSequenceNumber(v_actionId.sequenceNumber),
f_getIutStationId()
)
)
)
)
)
) -> value v_denmInd {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received updated DENM for the actionId which is not in originator ITS-S message table. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No DENM was sent. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVUP_BO_04
} // end denEventUpdate
// 5.2.1.4
group denEventTermination {
/**
* @desc TP Function for TC_DEN_EVTR_BV_01
*/
function f_DEN_EVTR_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_CANCELLATION) {
log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, c_duration_10sec));
f_awaitDenMessage ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_anyActionId, -, -, c_duration_10sec ) ) ) ) , v_denmInd );
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTerminateEvent(m_utEventCancellation(v_actionId));
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu (
mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ))))) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVTR_BV_01
/**
* @desc TP Function for TC_DEN_EVTR_BV_02
*/
function f_DEN_EVTR_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_NEGATION) {
log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_sleep(0.5);
f_utTerminateEvent(m_utEventCancellation(v_actionId));
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu (
mw_denm ( mw_denmMgmtConTermination ( v_actionId, f_getIutStationType(), -, -, -, isNegation ))))) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVTR_BV_02
/**
* @desc TP Function for TC_DEN_EVTR_BV_03
*/
function f_DEN_EVTR_BV_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var TimestampIts v_referenceTime2;
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_NEGATION) {
log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId, -, -, -, v_referenceTime1, v_referenceTime1 ), v_situation, m_denmLocation_zeroDelta ) );
v_referenceTime2 := f_getCurrentTime();
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId, -, -, -, v_referenceTime2, v_referenceTime2 ), v_situation, m_denmLocation_zeroDelta ) );
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_sleep(0.5);
f_utTerminateEvent(m_utEventCancellation(v_actionId));
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu (
mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, v_referenceTime2, -, -, isNegation ))))) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVTR_BV_03
/**
* @desc TP Function for TC_DEN_EVTR_BV_04
*/
function f_DEN_EVTR_BV_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_CANCELLATION) {
log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, c_duration_10sec));
f_awaitDenMessage( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_anyActionId ) ) ) ), v_denmInd );
v_actionId := v_denmInd.msgIn.denm.management.actionID;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTerminateEvent(m_utEventCancellation(v_actionId));
tc_ac.start;
alt {
[] denmPort.receive (
mw_denmInd (
mw_denmPdu (
mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVTR_BV_04
/**
* @desc TP Function for TC_DEN_EVTR_BV_05
*/
function f_DEN_EVTR_BV_05() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_NEGATION) {
log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_sleep(0.5);
f_utTerminateEvent(m_utEventCancellation(v_actionId));
tc_ac.start;
alt {
[] denmPort.receive (
mw_denmInd (
mw_denmPdu (
mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_cfDown();
} // end TC_DEN_EVTR_BV_05
/**
* @desc TP Function for TC_DEN_EVTR_BO_06
*/
function f_DEN_EVTR_BO_06() runs on ItsDenm {
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_slowVehicle_, LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_)
};
var ActionID v_unknownActionId;
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_NEGATION and not PICS_DENM_CANCELLATION) {
log("*** " & testcasename() & ": PICS_DENM_NEGATION OR PICS_DENM_CANCELLATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations); i := i + 1) {
f_utTriggerEvent(m_utTriggerEvent(valueof(v_situations[i])));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID;
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_unknownActionId := valueof(m_actionId(
f_increaseSequenceNumber(
v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber
),
v_actionIds[lengthof(v_actionIds) - 1].originatingStationID
));
f_utTerminateEvent(m_utEventCancellation(v_unknownActionId));
tc_noac.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_anyDenmPdu(
mw_itsPduHeader,
mw_denm (
mw_denmMgmtCon(v_unknownActionId)
)
)
)
) -> value v_denmInd {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
for (i := 0; i < lengthof(v_situations); i := i + 1) {
f_poCancelEvent(e_iut, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVTR_BO_06
/**
* @desc TP Function for TC_DEN_EVTR_BO_07
*/
function f_DEN_EVTR_BO_07() runs on ItsDenm {
// Local constants
const SequenceNumber v_initialSequenceNumber := 0;
// Local variables
var template (value) SituationContainerList v_situations := {
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, LibItsCommon_ASN1_NamedNumbers.RoadworksSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_slowVehicle_, LibItsCommon_ASN1_NamedNumbers.SlowVehicleSubCauseCode_unavailable_)
};
var SequenceNumber v_sequenceNumber := v_initialSequenceNumber;
var ActionID v_unknownActionId;
var ActionIDList v_actionIds;
var DenmInd v_denmInd;
var integer i;
// Test control
if (not PICS_DENM_NEGATION and not PICS_DENM_CANCELLATION) {
log("*** " & testcasename() & ": PICS_DENM_NEGATION OR PICS_DENM_CANCELLATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
for (i := 0; i < lengthof(v_situations); i := i + 1) {
v_sequenceNumber := f_increaseSequenceNumber(v_sequenceNumber);
v_actionIds[i] := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId(v_sequenceNumber) ), v_situations[i], m_denmLocation_zeroDelta ) );
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_unknownActionId := valueof(m_actionId(
f_increaseSequenceNumber(
v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber
),
f_getTsStationId()
));
f_sleep(0.5);
f_utTerminateEvent(m_utEventCancellation(v_unknownActionId));
tc_noac.start;
alt {
[] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
for (i := 0; i < lengthof(v_situations); i := i + 1) {
f_poCancelEvent(e_ets, v_actionIds[i]);
}
f_cfDown();
} // end TC_DEN_EVTR_BV_07
/**
* @desc TP Function for TC_DEN_EVTR_BV_08
*/
function f_DEN_EVTR_BV_08() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp;
var integer v_diff;
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_CANCELLATION) {
log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd);
v_timestampIts := f_getCurrentTime();
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime;
v_diff := v_timestampIts - v_referenceTime1;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTerminateEvent ( m_utEventCancellation ( v_actionId ) );
tc_ac.start;
alt {
[] denmPort.receive (
mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtConTermination ( v_actionId, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd {
tc_ac.stop;
v_timestampIts := f_getCurrentTime();
v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime;
if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) {
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVTR_BV_08
} // end denEventTermination
// 5.2.1.5
group denMessageRepetition {
/**
* @desc TP Function for TC_DEN_EVRP_TI_01
*/
function f_DEN_EVRP_TI_01() runs on ItsDenm {
// Local constants
const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1
const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2
const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1
const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation (LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_ );
var template (present) DenmInd v_expectedDenmInd :=
mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_validityDuration ) ) ) );
var ActionID v_actionId;
var DenmInd v_denmInd;
// Local timers
timer t_repetition;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent ( m_utTriggerEvent ( v_situation, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) );
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_repetition.start(2.0 * (int2float(c_repetitionInterval)/1000.0));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_repetition.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_TI_01
/**
* @desc TP Function for TC_DEN_EVRP_BV_02
*/
function f_DEN_EVRP_BV_02() runs on ItsDenm {
// Local constants
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_5sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95;
const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_validityDuration))));
var ActionID v_actionId;
var DenmInd v_denmInd;
// Local timers
timer t_repetition;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) );
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
//update event after 1 second
tc_noac.start(1.0);
tc_noac.timeout;
v_situation.eventType.subCauseCode := LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_;
f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation));
v_expectedDenmInd.msgIn.denm.situation := v_situation;
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_repetition.start(2.0 * (int2float(c_repetitionInterval)/1000.0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_repetition.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_02
/**
* @desc TP Function for TC_DEN_EVRP_BV_03
*/
function f_DEN_EVRP_BV_03() runs on ItsDenm {
// Local constants
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_4sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd :=
mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration))));
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Local timers
timer t_validity;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent( v_situation, c_validityDuration, c_repetitionDuration, c_repetitionInterval ));
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_validity.start(1.5 * int2float(c_validityDuration));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
//await retransmitted DENM message based on the repetition interval in between the validity duration
for (i:=0; i<(c_validityDuration/(c_repetitionInterval/1000)); i := i + 1) {
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] t_validity.timeout {
log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(v_expectedDenmInd) {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_03
/**
* @desc TP Function for TC_DEN_EVRP_BV_04
*/
function f_DEN_EVRP_BV_04() runs on ItsDenm {
// Local constants
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_2sec;
const ValidityDuration c_repetitionDuration := c_duration_5sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration))));
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Local timers
timer t_repetition;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(v_situation, c_validityDuration, c_repetitionDuration, c_repetitionInterval ));
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_repetition.start(1.5 * int2float(c_repetitionDuration));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
//await retransmitted DENM message based on the repetition interval in between the repetition duration
for (i:=0; i<(c_repetitionDuration/(c_repetitionInterval/1000)); i := i + 1) {
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
}
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] t_repetition.timeout {
log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_04
/**
* @desc TP Function for TC_DEN_EVRP_BV_05
*/
function f_DEN_EVRP_BV_05() runs on ItsDenm {
// Local constants
const ValidityDuration c_validityDuration := c_duration_10sec;
const ValidityDuration c_repetitionDuration := c_validityDuration;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(
mw_actionId,
-,
-,
-,
*
)
)
)
);
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Local timers
timer t_validity;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(
m_utTriggerEvent(
v_situation,
c_validityDuration,
c_repetitionDuration,
omit //no repetitionInterval
)
);
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_validity.start(1.5 * int2float(c_validityDuration));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] t_validity.timeout {
log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_05
/**
* @desc TP Function for TC_DEN_EVRP_BV_06
*/
function f_DEN_EVRP_BV_06() runs on ItsDenm {
// Local constants
const ValidityDuration c_validityDuration := c_duration_10sec;
const TransmissionInterval c_repetitionInterval := c_interval_2sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd := mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(
mw_actionId,
-,
-,
c_validityDuration
)
)
)
);
var ActionID v_actionId;
var DenmInd v_denmInd;
var integer i;
// Local timers
timer t_validity;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent(
m_utTriggerEvent(
v_situation,
c_validityDuration,
omit, //no repetitionDuration
c_repetitionInterval
)
);
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
t_validity.start(1.5 * int2float(c_validityDuration));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] t_validity.timeout {
log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_validity.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_06
/**
* @desc TP Function for TC_DEN_EVRP_BV_08
*/
function f_DEN_EVRP_BV_08() runs on ItsDenm {
// Local constants
const ValidityDuration c_duration1 := 3 * c_duration_2sec;
const ValidityDuration c_duration2 := c_duration_10sec;
const TransmissionInterval c_interval1 := c_interval_1sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation (LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_ );
var template (present) DenmInd v_expectedDenmInd :=
mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) );
var ActionID v_actionId;
var DenmInd v_denmInd;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_utTriggerEvent ( m_utTriggerEvent ( v_situation, c_duration2, c_duration1, c_interval1 ) );
f_awaitDenMessage ( v_expectedDenmInd, v_denmInd );
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := ?;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utChangePseudonym ( m_utDenmChangePseudonym );
tc_ac.start;
alt {
[] denmPort.receive ( v_expectedDenmInd ) -> value v_denmInd {
tc_ac.stop;
if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_actionId.originatingStationID ) {
log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_08
/**
* @desc TP Function for TC_DEN_EVRP_BV_09
*/
function f_DEN_EVRP_BV_09() runs on ItsDenm {
// Local constants
const ValidityDuration c_duration1 := 3 * c_duration_2sec;
const ValidityDuration c_duration2 := c_duration_10sec;
const TransmissionInterval c_interval1 := c_interval_1sec;
const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95;
const float c_upperTransmissionInterval := int2float(c_interval1)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expectedDenmInd :=
mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2))));
var ActionID v_actionId;
var DenmInd v_denmInd;
// Local timers
timer t_repetition;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, c_duration2, c_duration1, c_interval1 ) );
f_awaitDenMessage(v_expectedDenmInd, v_denmInd);
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId;
t_repetition.start(2.0 * (int2float(c_interval1)/1000.0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive(v_expectedDenmInd) -> value v_denmInd {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_repetition.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_09
/**
* @desc TP Function for TC_DEN_EVRP_BV_10
*/
function f_DEN_EVRP_BV_10() runs on ItsDenm {
// Local constants
const ValidityDuration c_duration1 := 3 * c_duration_2sec;
const ValidityDuration c_duration2 := c_duration_10sec;
const TransmissionInterval c_interval1 := c_interval_1sec;
const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95;
const float c_upperTransmissionInterval := int2float(c_interval1)*1.05;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 ))));
var ActionID v_actionId;
var DenmInd v_denmInd;
var TimestampIts v_referenceTime;
// Local timers
timer t_repetition;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, c_duration2, c_duration1, c_interval1 ) );
f_awaitDenMessage ( v_expected, v_denmInd );
t_repetition.start(2.0 * (int2float(c_interval1)/1000.0));
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_referenceTime := v_denmInd.msgIn.denm.management.referenceTime;
v_expected.msgIn.denm.management.actionID := v_actionId;
v_expected.msgIn.denm.management.referenceTime := v_referenceTime;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive ( v_expected ) -> value v_denmInd {
t_repetition.stop;
log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_repetition.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_10
/**
* @desc TP Function for TC_DEN_EVRP_BV_11
*/
function f_DEN_EVRP_BV_11() runs on ItsDenm {
// Local constants
const ValidityDuration c_duration1 := defaultValidity + 100;
const ValidityDuration c_duration2 := defaultValidity;
const TransmissionInterval c_interval1 := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 ifpresent))));
var ActionID v_actionId;
var DenmInd v_denmInd;
var TimestampIts v_referenceTime;
// Local timers
timer t_repetition;
timer t_default;
// Test control
if (not PICS_DENM_REPETITION) {
log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent( m_utTriggerEvent( v_situation, omit, c_duration1, c_interval1 ) );
f_awaitDenMessage ( v_expected, v_denmInd );
t_repetition.start(2.0 * int2float(c_interval1)/1000.0);
t_default.start ( int2float(c_duration1) );
v_actionId := v_denmInd.msgIn.denm.management.actionID;
v_expected.msgIn.denm.management.actionID := v_actionId;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
alt {
[] denmPort.receive ( v_expected ) -> value v_denmInd {
t_repetition.stop;
if ( t_default.read > int2float(defaultValidity) ) {
log("*** " & testcasename() & ": FAIL: DENM received after validity duration. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": INFO: DENM retransmission. ***");
t_repetition.start(2.0 * (int2float(c_interval1)/1000.0));
repeat;
}
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
t_repetition.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_repetition.timeout {
if ( t_default.read >= int2float(defaultValidity) ) {
t_default.stop;
log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
t_default.stop;
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
[] t_default.timeout {
t_repetition.stop;
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_EVRP_BV_11
} // end denMessageRepetition
group denMessageLowerLayerParameters {
/**
* @desc TP Function for TC_DEN_PAR_BV_01
*/
function f_DEN_PAR_BV_01() runs on ItsDenm {
// Local variables
const UInt8 c_gnNhBtpB := 2;
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, c_gnNhBtpB)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected DENM message encapsultated in BTP-B packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN NH information in DenmInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_PAR_BV_01
/**
* @desc TP Function for TC_DEN_PAR_BV_02
*/
function f_DEN_PAR_BV_02() runs on ItsDenm {
// Local variables
const UInt8 c_gnHtGbc := 4;
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
tc_ac.start;
alt {
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, c_gnHtGbc)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected DENM message encapsulated in GBC packet received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": INCONC: no GN HT information in DenmInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in GBC packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_PAR_BV_02
} // end denMessageLowerLayerParameters
group denMessageSSP {
function f_DEN_SSP_BV_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation,
in template (present) Bit256 pmw_ssp)
runs on ItsDenm {
var ActionID v_actionId;
var DenmInd v_denmInd;
var Oct8 v_certHashedId8;
// Test control
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_DENM_GENERATION) {
log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
fx_readCertificateDigest( p_certName, v_certHashedId8);
if( '0000000000000000'O == v_certHashedId8) {
// Certificate not found
log("*** " & testcasename() & ": Required IUT certificate is not found on the test system ***");
setverdict(inconc);
stop;
}
f_prInitialState(
e_staticPosition,
{ hashedId8 := v_certHashedId8 }
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_utTriggerEvent(m_utTriggerEvent(p_situation));
tc_ac.start;
alt {
[] denmPort.receive(
mw_denmIndWithSecurityParameters(
mw_denmPdu(
mw_denm(
mw_anyDenmMgmtCon,
p_situation
)
),
pmw_ssp
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) {
log("*** " & testcasename() & ": INFO: Received a DENM with other cause code. ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: No unexpected DENM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poCancelEvent(e_iut, v_actionId);
f_cfDown();
} // end TC_DEN_SSP_BV_XX
function f_DEN_SSP_BV_01_01( ) runs on ItsDenm {
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_01,
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_unavailable_),
mw_sspNoTrafficCondition
);
}
function f_DEN_SSP_BV_01_02( ) runs on ItsDenm {
f_DEN_SSP_BV_XX (
PX_CERT_IUT_DENM_02,
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
mw_sspNoAccident
);
}
} // end group denMessageSSP
} // end denMessageTransmission
// 5.2.2
group denMessageReception {
/**
* @desc TP Function for TC_DEN_MSRV_BV_01
*/
function f_DEN_MSRV_BV_01() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
v_situation,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TNOAC);
for ( i := 0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_01
/**
* @desc TP Function for TC_DEN_MSRV_BV_02
*/
function f_DEN_MSRV_BV_02() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var TimestampIts v_referenceTime2;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
v_situation1,
m_denmLocation_zeroDelta
)
);
f_sleep(1.0);
v_referenceTime2 := f_getCurrentTime();
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, v_referenceTime2
),
v_situation2,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_02
/**
* @desc TP Function for TC_DEN_MSRV_BO_03
*/
function f_DEN_MSRV_BO_03() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
m_tsActionId,
-,
-,
-,
-,
-,
isNegation
),
v_situation,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TNOAC);
if (0 != lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_03
/**
* @desc TP Function for TC_DEN_MSRV_BO_04
*/
function f_DEN_MSRV_BO_04() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId, v_actionIdIut;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionIdIut := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
m_actionId(
f_increaseSequenceNumber(v_actionId.sequenceNumber)
),
-,
-,
-,
-,
-,
isCancellation
),
v_situation,
m_denmLocation_zeroDelta
),
false
);
f_sleep(PX_TNOAC);
if (0 != lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_iut, v_actionIdIut);
f_cfDown();
} // end TC_DEN_MSRV_BO_04
/**
* @desc TP Function for TC_DEN_MSRV_BO_05
*/
function f_DEN_MSRV_BO_05() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var TimestampIts v_detectionTime := f_getCurrentTime();
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-, -, -, v_detectionTime, v_referenceTime1
),
v_situation1,
m_denmLocation_zeroDelta
)
);
f_sleep(1.0);
vc_utEvents := {};
v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( v_actionId, -, -, -, v_detectionTime, v_referenceTime2 ), v_situation2, m_denmLocation_zeroDelta ) );
f_sleep(PX_TNOAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_05
/**
* @desc TP Function for TC_DEN_MSRV_BO_06
*/
function f_DEN_MSRV_BO_06() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var template (value) DecentralizedEnvironmentalNotificationMessage v_denm;
var TimestampIts v_detectionTime1 := f_getCurrentTime();
var TimestampIts v_detectionTime2 := v_detectionTime1 - 1000;
var TimestampIts v_referenceTime1 := v_detectionTime1;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_denm := m_denm(
m_denmMgmtCon(
m_tsActionId,
-, - , -,
v_detectionTime1,
v_referenceTime1
),
v_situation1,
m_denmLocation_zeroDelta
);
v_actionId := f_sendDenMessage(v_denm);
f_sleep(1.0);
vc_utEvents := {};
v_detectionTime2 := valueof(v_denm.management.detectionTime) - 1000;
v_actionId := f_sendDenMessage (
m_denm ( m_denmMgmtCon ( v_actionId, -, - , -, v_detectionTime2, v_referenceTime1 ), v_situation2, m_denmLocation_zeroDelta ) );
f_sleep(PX_TNOAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BO_06
/**
* @desc TP Function for TC_DEN_MSRV_BV_07
*/
function f_DEN_MSRV_BV_07() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation1 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var template (value) SituationContainer v_situation2 := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_engineProblem_);
var template (value) DecentralizedEnvironmentalNotificationMessage v_denm;
var TimestampIts v_detectionTime2 := f_getCurrentTime();
var TimestampIts v_detectionTime1 :=v_detectionTime2 - 1000;
var TimestampIts v_referenceTime1 := v_detectionTime2;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_denm := m_denm(
m_denmMgmtCon(
m_tsActionId,
-, - , -,
v_detectionTime1,
v_referenceTime1
),
v_situation1,
m_denmLocation_zeroDelta
);
v_actionId := f_sendDenMessage(v_denm);
f_sleep(1.0);
v_detectionTime2 := valueof(v_denm.management.detectionTime) + 1000;
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
v_actionId,
-, - , -,
v_detectionTime2,
v_referenceTime1
),
v_situation2,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_07
group denMessageSSP {
function f_DEN_MSRV_BO_08_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation
) runs on ItsDenm {
// Local variables
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
// instruct adapter to use p_certName to sign message
f_cfUp(p_certName);
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
p_situation,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TNOAC);
for ( i := 0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was treated as valid and transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM was treated as invalid and was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_01
function f_DEN_MSRV_BO_08_01 () runs on ItsDenm {
f_DEN_MSRV_BO_08_XX(
"CERT_TS_DENM_BO_01_AT",
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_unavailable_)
);
}
function f_DEN_MSRV_BO_08_02 () runs on ItsDenm {
f_DEN_MSRV_BO_08_XX(
"CERT_TS_DENM_BO_02_AT",
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_)
);
}
function f_DEN_MSRV_BO_09_XX(
in charstring p_certName,
in template (value) SituationContainer p_situation1,
in template (value) SituationContainer p_situation2
) runs on ItsDenm {
// Local variables
var TimestampIts v_referenceTime2;
var ActionID v_actionId;
var integer i;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
if (not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
// instruct adapter to use normal certificate to sign message
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId
),
p_situation1,
m_denmLocation_zeroDelta
)
);
f_sleep(1.0);
vc_utEvents := {};
// instruct adapter to use p_certName to sign message
if(e_success != f_acTriggerSecEvent(m_acEnableSecurity(p_certName))) {
log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***");
stop;
}
f_sleep(1.0);
v_referenceTime2 := f_getCurrentTime();
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
v_actionId,
-, -, -, v_referenceTime2
),
p_situation2,
m_denmLocation_zeroDelta
)
);
f_sleep(PX_TAC);
for ( i := 0; i < lengthof(vc_utEvents)
and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID)
and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utEvents)) {
log("*** " & testcasename() & ": FAIL: DENM was treated as valid and was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": FAIL: DENM was treated as invalid and was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_09_XX
function f_DEN_MSRV_BO_09_01 () runs on ItsDenm {
f_DEN_MSRV_BO_09_XX(
"CERT_TS_DENM_BO_01_AT",
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_trafficCondition_, LibItsCommon_ASN1_NamedNumbers.TrafficConditionSubCauseCode_trafficJamIncreasing_)
);
}
function f_DEN_MSRV_BO_09_02 () runs on ItsDenm {
f_DEN_MSRV_BO_09_XX(
"CERT_TS_DENM_BO_02_AT",
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_unavailable_),
m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_accident_, LibItsCommon_ASN1_NamedNumbers.AccidentSubCauseCode_multiVehicleAccident_)
);
}
}
/**
* @desc TP Function for TC_DEN_MSRV_BV_10
*/
function f_DEN_MSRV_BV_10() runs on ItsDenm {
//Local constants
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_RECEPTION) {
log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage (
m_denm ( m_denmMgmtCon ( m_tsActionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConImpactReduction ) );
tc_ac.start;
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ), v_situation, mw_anyDenmLocation,
mw_alacarteConImpactReduction ) ) ) ) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM with correct alacarte container ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ) ) ) ) ) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM with incorrect containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM not rreceived ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_MSRV_BV_10
} // end denMessageReception
// 5.2.3
group denKeepAliveForwarding {
/**
* @desc TP Function for TC_DEN_KAFW_BV_01
*/
function f_DEN_KAFW_BV_01() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_forwarding.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
)
)
)
) {
if(t_forwarding.running) {
t_forwarding.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] t_forwarding.timeout {
tc_ac.start;
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_01
/**
* @desc TP Function for TC_DEN_KAFW_BV_02
*/
function f_DEN_KAFW_BV_02() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000;
var ActionID v_actionId;
// Local timers
timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
-,
v_referenceTime1
),
v_situation,
m_denmLocation_zeroDelta
)
);
// start KAF timer here, as 2nd DENM shall be ignored
t_forwarding.start;
f_sleep(5.0);
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
-,
v_referenceTime2
),
v_situation,
m_denmLocation_zeroDelta
)
);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType(), v_referenceTime1)
)
)
)
) {
if(t_forwarding.running) {
t_forwarding.stop;
log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
tc_ac.stop;
log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
t_forwarding.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] t_forwarding.timeout {
tc_ac.start;
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_02
/**
* @desc TP Function for TC_DEN_KAFW_TI_03
*/
function f_DEN_KAFW_TI_03() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0;
timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15 /* from the spec */ + 0.1 /* processing time */;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_forwardingMin.start;
t_forwardingMax.start;
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
)
)
)
) {
t_forwardingMax.stop;
if(t_forwardingMin.running) {
t_forwardingMin.stop;
log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
else {
log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] t_forwardingMin.timeout {
log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***");
repeat;
}
[] t_forwardingMax.timeout {
log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_TI_03
/**
* @desc TP Function for TC_DEN_KAFW_BV_04
*/
function f_DEN_KAFW_BV_04() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
),
f_getIutStationId()
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
),
mw_anyStationId
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_04
/**
* @desc TP Function for TC_DEN_KAFW_BV_05
*/
function f_DEN_KAFW_BV_05() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(mw_anyActionId, f_getIutStationType())
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_05
/**
* @desc TP Function for TC_DEN_KAFW_BV_06
*/
function f_DEN_KAFW_BV_06() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var TimestampIts v_referenceTime1 := f_getCurrentTime();
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
-,
v_referenceTime1
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType(), v_referenceTime1)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId)
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_06
/**
* @desc TP Function for TC_DEN_KAFW_BV_07
*/
function f_DEN_KAFW_BV_07() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtConTermination(
m_tsActionId,
-,
c_transmissionInterval * 4 / 1000,
c_transmissionInterval,
-,
-,
isNegation
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon ( v_actionId, - )
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon ( v_actionId, f_getIutStationType())
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_07
/**
* @desc TP Function for TC_DEN_KAFW_BV_08
*/
function f_DEN_KAFW_BV_08() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 3 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta,
m_alacarteConLaneCount
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId),
v_situation,
m_denmLocation_zeroDelta,
m_alacarteConLaneCount
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
)
)
)
) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_08
/**
* @desc TP Function for TC_DEN_KAFW_BV_09
*/
function f_DEN_KAFW_BV_09() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Local timers
timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 3 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
t_validity.start;
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
)
)
)
) {
tc_ac.stop;
if(t_validity.running) {
log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***");
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
repeat;
}
else {
log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
if(t_validity.running) {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
else {
log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] t_validity.timeout {
log("*** " & testcasename() & ": INFO: End of validity period ***");
repeat;
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_09
/**
* @desc TP Function for TC_DEN_KAFW_BV_10
*/
function f_DEN_KAFW_BV_10() runs on ItsDenm {
//Local constants
const TransmissionInterval c_transmissionInterval := c_interval_10sec;
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
var boolean v_positionChanged := false;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Test adapter configuration
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage(
m_denm(
m_denmMgmtCon(
m_tsActionId,
-,
c_transmissionInterval * 5 / 1000,
c_transmissionInterval
),
v_situation,
m_denmLocation_zeroDelta
)
);
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive(
mw_denmInd(
mw_denmPdu(
mw_denm(
mw_denmMgmtCon(v_actionId, f_getIutStationType())
)
)
)
) {
tc_ac.stop;
if(v_positionChanged == false) {
log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***");
f_utChangePosition(m_utDenmChangePosition(1000, 0));
v_positionChanged := true;
tc_ac.start;
repeat;
}
else {
log("*** " & testcasename() & ": FAIL: DENM was re-forwarded ***");
f_utChangePosition(m_utDenmChangePosition(-1000, 0));
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] tc_ac.timeout {
if(v_positionChanged == false) {
log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
else {
log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***");
f_utChangePosition(m_utDenmChangePosition(-1000, 0));
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_10
/**
* @desc TP Function for TC_DEN_KAFW_BV_11
*/
function f_DEN_KAFW_BV_11() runs on ItsDenm {
// Local variables
var template (value) SituationContainer v_situation := m_situation(LibItsCommon_ASN1_NamedNumbers.CauseCodeType_vehicleBreakdown_, LibItsCommon_ASN1_NamedNumbers.VehicleBreakdownSubCauseCode_unavailable_);
var ActionID v_actionId;
// Test control
if (not PICS_DENM_KAF) {
log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_actionId := f_sendDenMessage( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) );
tc_ac.start((int2float(c_interval_10sec) * 2.0 / 1000.0) + 0.5);
alt {
[] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( v_actionId ) ) ) ) ) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: IUT reconstructs and sends the DENM associated with ACTION_ID ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": PASS: IUT does not reconstruct and send the DENM associated with ACTION_ID1 ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poCancelEvent(e_ets, v_actionId);
f_cfDown();
} // end TC_DEN_KAFW_BV_11
} // end denKeepAliveForwarding
} // end ItsDenm_TpFunctions
Copyright 2022 ETSI
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
# DENM TS 102 869-3
# Decentralized Environmental Notification Basic Service (DEN) TTCN-3 test suite
DENM test suite as described in ETSI TS 102 869-3
\ No newline at end of file
Decentralized Environmental Notification Message abstract test suite (ATS) as defined in [ETSI TS 102 869-3 v1.6.1](https://www.etsi.org/deliver/etsi_ts/102800_102899/10286903/01.06.01_60/ts_10286903v010601p.pdf)
This code is a part of the ETSI ITS test suite, available on https://forge.etsi.org/rep/ITS/TS.ITS and cannot be run independently.
Please clone the main ETSI ITS test suite repository and compile and follow the compilation instructions.
To run this code, the test suite shall be compiled using `make ATS=AtsDENM`
module LibItsDenm_EncdecDeclarations {
// LibIts
import from LibItsDenm_TypesAndValues all;
// LibItsDenm
import from LibItsDenm_TypesAndValues all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
external function fx_enc_DenmReq (DenmReq p) return bitstring
with {extension "prototype(convert) encode(LibIts_Interface)"}
external function fx_dec_DenmReq (inout bitstring b, out DenmReq p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_dec_DenmInd (inout bitstring b, out DenmInd p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_enc_DENM (DENM p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_DENM (inout bitstring b, out DENM p) return integer
with {extension "prototype(sliding) decode(PER)"}
external function fx_enc_UtDenmInitialize (UtDenmInitialize p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtDenmChangePosition (UtDenmChangePosition p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtDenmChangePseudonym (UtDenmChangePseudonym p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtDenmTrigger (UtDenmTrigger p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtDenmUpdate (UtDenmUpdate p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtDenmTermination (UtDenmTermination p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_dec_UtDenmResults (inout bitstring b, out UtDenmResults p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
external function fx_dec_UtDenmEventInd (inout bitstring b, out UtDenmEventInd p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
} // End of module LibItsDenm_EncdecDeclarations
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_Pics.ttcn $
* $Id: LibItsDenm_Pics.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc DENM PICS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsDenm_Pics {
group denmPics {
/**
* @desc Support for DENM generation
* @see ETSI TS 102 869-1 Table A.1
*/
modulepar boolean PICS_DENM_GENERATION := true;
/**
* @desc Support for DENM RECEPTION
* @see ETSI TS 102 869-1 Table A.1
*/
modulepar boolean PICS_DENM_RECEPTION := true;
/**
* @desc Support for DENM update
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_DENM_UPDATE := true;
/**
* @desc Support for DENM repetition
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_DENM_REPETITION := true;
/**
* @desc Support for DENM cancellation
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_DENM_CANCELLATION := true;
/**
* @desc Support for DENM NEGATION
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_DENM_NEGATION := false;
/**
* @desc Support for Keep-Alive Forwarding
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_DENM_KAF := false;
/**
* @desc Support for impact recuction
* @see ETSI TS 102 869-1 Table A.2
*/
modulepar boolean PICS_IMPACT_REDUCTION := true;
/**
* @desc Is the IUT running in secured mode?
* @see ETSI TS 102 869-1 Table A.3
*/
modulepar boolean PICS_IS_IUT_SECURED := false;
} // end denmPics
}
\ No newline at end of file
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_Pixits.ttcn $
* $Id: LibItsDenm_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing Pixits for DENM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsDenm_Pixits {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
} // End of module LibItsDenm_Pixits
\ No newline at end of file
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_Templates.ttcn $
* $Id: LibItsDenm_Templates.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing base template definitions for DENM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsDenm_Templates {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
import from LibItsCommon_ASN1_NamedNumbers all;
// LibItsDenm
import from LibItsDenm_TypesAndValues all;
group asn1Constants {
const integer HeadingValue_wgs84North := 0;
const integer HeadingValue_wgs84East := 900;
const integer HeadingValue_wgs84South := 1800;
const integer HeadingValue_wgs84West := 2700;
const integer HeadingValue_unavailable := 3600;
const integer HeadingConfidence_withinZeroPointOneDegree := 1;
const integer HeadingConfidence_withinOneDegree := 10;
const integer HeadingConfidence_outOfRange := 126;
const integer HeadingConfidence_unavailable := 127;
} // End of group asn1Constants
group primitivesTemplates {
/**
* @desc Send template for DEN Message (DenmPort Primitive)
* @param p_denMsg The DEN Message to be sent
*/
template (value) DenmReq m_denmReq(
template (value) DENM p_denMsg
) := {
msgOut := p_denMsg
}
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @param p_denMsg The expected DEN Message
*/
template (present) DenmInd mw_denmInd(
template (present) DENM p_denMsg
) := {
msgIn := p_denMsg,
recvTime := ?,
gnNextHeader := *,
gnHeaderType := *,
gnHeaderSubtype := *,
gnLifetime := *,
gnTrafficClass := *,
btpDestinationPort := *,
btpInfo := *,
ssp := *,
its_aid := *
}
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @param p_denMsg The expected DEN Message
* @param p_gnNextHeader GN next header value
* @param p_gnHeaderType GN header type value
* @param p_gnHeaderSubtype GN header subtype value
* @param p_gnLifetime GN packet lifetime value (ms)
* @param p_gnTrafficClass GN traffic class value
*/
template(present) DenmInd mw_denmIndWithGnParameters (
template (present) DENM p_denMsg,
in template UInt8 p_gnNextHeader := *,
in template UInt8 p_gnHeaderType := *,
in template UInt8 p_gnHeaderSubtype := *,
in template UInt32 p_gnLifetime := *,
in template UInt8 p_gnTrafficClass := *
) modifies mw_denmInd := {
gnNextHeader := p_gnNextHeader,
gnHeaderType := p_gnHeaderType,
gnHeaderSubtype := p_gnHeaderSubtype,
gnLifetime := p_gnLifetime,
gnTrafficClass := p_gnTrafficClass
};
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @param p_denMsg The expected DEN Message
* @param p_ssp SSP security parameter
* @param p_its_aid ITS-AID value
*/
template (present) DenmInd mw_denmIndWithSecurityParameters(
template (present) DENM p_denMsg,
template Bit256 p_ssp := *,
template UInt32 p_its_aid := c_its_aid_DENM
) modifies mw_denmInd := {
ssp := p_ssp,
its_aid := p_its_aid
};
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @param p_denMsg The expected DEN Message
* @param p_btpDestinationPort BTP destination port value
* @param p_btpInfo BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
*/
template(present) DenmInd mw_denmIndWithBtpParameters (
template (present) DENM p_denMsg,
in template UInt16 p_btpDestinationPort := *,
in template UInt16 p_btpInfo := *
) modifies mw_denmInd := {
btpDestinationPort := p_btpDestinationPort,
btpInfo := p_btpInfo
};
group utPrimitives {
/**
* @desc Send template for Upper Tester event initialization
*/
template (value) UtDenmInitialize m_denmInitialize := {
hashedId8 := '0000000000000000'O
}
/**
* @desc Send template for Upper Tester event changePseudonym
*/
template (value) UtDenmChangePseudonym m_utDenmChangePseudonym := {
}
/**
* @desc Send template for Upper Tester Trigger event
* @param p_situation The Situation Container
* @param p_location The Location Container
* @param p_validityDuration The validity duration (Default: omit)
* @param p_repetitionDuration The repetition duration (Default: omit)
* @param p_repetitionInterval The repetition interval (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_alacarte The Alacarte container (Default: omit)
*/
template (value) UtDenmTrigger m_utTriggerEvent(
template (value) SituationContainer p_situation,
template (omit) ValidityDuration p_validityDuration := c_duration_2sec,
template (omit) ValidityDuration p_repetitionDuration := omit,
template (omit) TransmissionInterval p_repetitionInterval := omit,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (omit) AlacarteContainer p_alacarte := omit
) := {
detectionTime := f_getCurrentTime(),
validityDuration := p_validityDuration,
repetitionDuration := p_repetitionDuration,
situation := p_situation,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirections,
transmissionInterval := p_transmissionInterval,
repetitionInterval := p_repetitionInterval,
alacarte := p_alacarte
}
/**
* @desc Send template for Upper Tester event update
* @param p_actionId The action id
* @param p_situation The Situation Container (Default: omit)
* @param p_location The Location Container (Default: omit)
* @param p_validityDuration The validity duration (Default: omit)
* @param p_relevanceDistance The relevance distance (Default: omit)
* @param p_relevanceTrafficDirection The relevance traffic direction (Default: omit)
* @param p_trafficClass The traffic class (Default: omit)
* @param p_repetitionInterval The repetition interval (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_alacarte The Alacarte Container (Default: omit)
*/
template (value) UtDenmUpdate m_utUpdateEvent(
template (value) ActionID p_actionId,
template (omit) SituationContainer p_situation := omit,
template (omit) LocationContainer p_location := omit,
template (omit) ValidityDuration p_validityDuration := omit,
template (omit) RelevanceDistance p_relevanceDistance := omit,
template (omit) RelevanceTrafficDirection p_relevanceTrafficDirection := omit,
template (omit) ValidityDuration p_repetitionDuration := omit,
template (omit) TransmissionInterval p_repetitionInterval := omit,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (omit) AlacarteContainer p_alacarte := omit
) := {
actionId := p_actionId,
detectionTime := f_getCurrentTime(),
validityDuration := p_validityDuration,
situation := p_situation,
location := p_location,
relevanceDistance := p_relevanceDistance,
relevanceTrafficDirection := p_relevanceTrafficDirection,
transmissionInterval := p_transmissionInterval,
repetitionInterval := p_repetitionInterval,
alacarte := p_alacarte
}
/**
* @desc Send template for Upper Tester event cancellation
* @param p_actionId The action id
*/
template (value) UtDenmTermination m_utEventCancellation(
template (value) ActionID p_actionId
) := {
actionId := p_actionId
}
/**
* @desc Send template for Upper Tester event change position
* @param p_latitude The new latitude
* @param p_longitude The new longitude
* @param p_elevation The new elevation (Default: 0)
*/
template (value) UtDenmChangePosition m_utDenmChangePosition(
template (value) integer p_latitude,
template (value) integer p_longitude,
template (value) integer p_elevation := 0
) := {
latitude := p_latitude,
longitude := p_longitude,
elevation := p_elevation
}
} // end utPrimitives
} // end primitives
group denmPduTemplates {
/**
* @desc Send template for DENM PDU
* @param p_denm The DEN Message
*/
template (value) DENM m_denmPdu(
template (value) DecentralizedEnvironmentalNotificationMessage p_denm
) := {
header := m_itsPduHeader,
denm := p_denm
}
/**
* @desc Default receive template for DENM PDU
* @param p_itsPduHeader The expected ITS PDU header (Default: any)
* @param p_denm The expected DEN Message (Default: any)
*/
template DENM mw_anyDenmPdu(
template (present) ItsPduHeader p_itsPduHeader := ?,
template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
) := {
header := p_itsPduHeader,
denm := p_denm
}
/**
* @desc Receive template for DENM PDU
* @param p_denm The expected DEN Message
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current DEN protocol version)
* @param p_messageID The expected message id (Default: DEN message id)
*/
template (present) DENM mw_denmPdu(
template (present) DecentralizedEnvironmentalNotificationMessage p_denm,
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_denm_
) := {
header := mw_itsPduHeader(p_stationID, p_protocolVersion, p_messageID),
denm := p_denm
}
} // end denmPduTemplates
group headerTemplates {
/**
* @desc Default send template for ITS PDU header
* @param p_stationID The source station ID (Default: test system station id)
* @param p_protocolVersion The protocol version (Default: current DEN protocol version)
* @param p_messageID The message Id (Default: DEN message id)
*/
template (value) ItsPduHeader m_itsPduHeader(
template (value) StationID p_stationID := f_getTsStationId(),
template (value) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (value) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_denm_
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for ITS PDU header
* @param p_stationID The expected station id (Default: any)
* @param p_protocolVersion The expected protocol version (Default: current DEN protocol version)
* @param p_messageID The expected message id (Default: DEN message id)
*/
template (present) ItsPduHeader mw_itsPduHeader(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_denm_
) := {
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for the station id
*/
template (present) StationID mw_anyStationId := ?;
} // end headerTemplates
group timeTemplates {
/**
* @desc Receive template for TimestampIts check with delta
* @param p_time The expected timestamp
*/
template TimestampIts mw_timestampIts_withDelta(
in template (value) TimestampIts p_time
) := (valueof(p_time)-PX_TIME_DELTA .. valueof(p_time)+PX_TIME_DELTA);
} // end timeTemplates
group positionTemplates {
/**
* @desc Send template for the test system position
* @param p_longitude The longitude (Default: Test system's longitude)
* @param p_latitude The latitude (Default: Test system's latitude)
* @see m_posConfidenceEllipse
* @see m_elevation
*/
template (value) ReferencePosition m_tsPosition(
template (value) Longitude p_longitude := f_getTsLongitude(),
template (value) Latitude p_latitude := f_getTsLatitude()
) := {
latitude := p_latitude,
longitude := p_longitude,
positionConfidenceEllipse := m_posConfidenceEllipse,
altitude := m_altitude
}
/**
* @desc Send template for the position confidence
* @param p_semiMajorConfidence The major confidence (Default: 1cm)
* @param p_semiMinorConfidence The minor confidence (Default: 1cm)
* @param p_semiMajorOrientation The major orientation (Default: HeadingValue_wgs84North)
*/
template (value) PosConfidenceEllipse m_posConfidenceEllipse(
template (value) SemiAxisLength p_semiMajorConfidence := LibItsCommon_ASN1_NamedNumbers.SemiAxisLength_oneCentimeter_,
template (value) SemiAxisLength p_semiMinorConfidence := LibItsCommon_ASN1_NamedNumbers.SemiAxisLength_oneCentimeter_,
template (value) HeadingValue p_semiMajorOrientation := LibItsCommon_ASN1_NamedNumbers.HeadingValue_wgs84North_
) := {
semiMajorConfidence := p_semiMajorConfidence,
semiMinorConfidence := p_semiMinorConfidence,
semiMajorOrientation := p_semiMajorOrientation
}
/**
* @desc Send template for altitude
* @param p_altitudeValue The altitude (Default: Sea level)
* @param p_altitudeConfidence The confidence of the elevation (Default: within one meter)
*/
template (value) Altitude m_altitude(
template (value) AltitudeValue p_altitudeValue := LibItsCommon_ASN1_NamedNumbers.AltitudeValue_referenceEllipsoidSurface_,
template (value) AltitudeConfidence p_altitudeConfidence := alt_000_01
) := {
altitudeValue := p_altitudeValue,
altitudeConfidence := p_altitudeConfidence
}
} // end positionTemplates
group decentralizedEnvironmentalNotificationMessageTemplates {
/**
* @desc Send template for DEN Message
* @param p_management The Management Container
* @param p_situation The Situation Container
* @param p_location The Location Container
* @param p_alacarte The Alacarte Container (Default: omit)
*/
template (value) DecentralizedEnvironmentalNotificationMessage m_denm(
template (value) ManagementContainer p_management,
template (omit) SituationContainer p_situation,
template (omit) LocationContainer p_location,
template (omit) AlacarteContainer p_alacarte := omit
) := {
management := p_management,
situation := p_situation,
location := p_location,
alacarte := p_alacarte
}
/**
* @desc Default receive template for DEN Message
*/
template (present) DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
management := ?,
situation := *,
location := *,
alacarte := *
}
/**
* @desc Receive template for DEN Message
* @param p_management The expected Management Container (Default: any)
* @param p_situation The expected Situation Container (Default: any or omit)
* @param p_location The expected location Container (Default: any or omit)
* @param p_alacarte The expected Alacarte Container (Default: any or omit)
*/
template DecentralizedEnvironmentalNotificationMessage mw_denm(
template (present) ManagementContainer p_management := ?,
template SituationContainer p_situation := *,
template LocationContainer p_location := *,
template AlacarteContainer p_alacarte := *
) modifies mw_anyDenm := {
management := p_management,
situation := p_situation,
location := p_location,
alacarte := p_alacarte
}
/**
* @desc Send template for DEN Message for event termination.
* @param p_actionID The action id
*/
template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
template (value) ActionID p_actionID,
template (value) StationType p_stationType
) := {
management := m_denmMgmtConTermination(p_actionID, p_stationType, 1, -, -, -, isCancellation),
situation := omit,
location := omit,
alacarte := omit
}
} // end group decentralizedEnvironmentalNotificationMessageTemplates
group decentralizedManagementTemplates {
/**
* @desc Send template for Management Container
* @param p_actionID The action id
* @param p_isNegation The negation flag (Default: false)
* @param p_validityDuration The validity duration (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_detectionTime The detection time (Default: current time)
* @param p_referenceTime The reference time (Default: current time)
*/
template (value) ManagementContainer m_denmMgmtCon(
template (value) ActionID p_actionID,
template (value) StationType p_stationType := f_getTsStationType(),
template (value) ValidityDuration p_validityDuration := defaultValidity,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
template (value) TimestampIts p_referenceTime := f_getCurrentTime()
) := {
actionID := p_actionID,
detectionTime := p_detectionTime,
referenceTime := p_referenceTime,
termination := omit,
eventPosition := m_tsPosition,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirections,
validityDuration := p_validityDuration,
transmissionInterval := p_transmissionInterval,
stationType := p_stationType
}
/**
* @desc Send template for Management Container
* @param p_actionID The action id
* @param p_isNegation The negation flag (Default: false)
* @param p_isCancellation The cancellation flag (Default: false)
* @param p_validityDuration The validity duration (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_detectionTime The detection time (Default: current time)
* @param p_referenceTime The reference time (Default: current time)
*/
template (omit) ManagementContainer m_denmMgmtConTermination (
template (value) ActionID p_actionID,
template (value) StationType p_stationType := f_getTsStationType(),
template (value) ValidityDuration p_validityDuration := defaultValidity,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
template (value) TimestampIts p_referenceTime := f_getCurrentTime(),
template (value) Termination p_termination
) modifies m_denmMgmtCon := {
termination := p_termination
}
/**
* @desc Send template for Management Container
* @param p_actionID The action id
* @param p_isNegation The negation flag (Default: false)
* @param p_isCancellation The cancellation flag (Default: false)
* @param p_validityDuration The validity duration (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_detectionTime The detection time (Default: current time)
* @param p_referenceTime The reference time (Default: current time)
*/
template ManagementContainer mw_denmMgmtConTermination (
template (present) ActionID p_actionID,
template (present) StationType p_stationType := f_getIutStationType(),
template (present) TimestampIts p_referenceTime := ?,
template ValidityDuration p_validityDuration := *, // In ASN.1, a DEFAULT value constraint could be replaced by an omit
template TransmissionInterval p_transmissionInterval := *,
template Termination p_termination := *
) modifies mw_denmMgmtCon := {
termination := p_termination
}
/**
* @desc Receive template for Management Container
* @param p_actionID The expected action id
* @param p_referenceTime The reference time (Default: any)
* @param p_isNegation The expected negation flag (Default: false)
* @param p_validityDuration The expected validity duration (Default: any or omit)
* @param p_transmissionInterval The expected transmission interval (Default: any or omit)
*/
template ManagementContainer mw_denmMgmtCon(
template (present) ActionID p_actionID,
template (present) StationType p_stationType := f_getIutStationType(),
template (present) TimestampIts p_referenceTime := ?,
template ValidityDuration p_validityDuration := *, // In ASN.1, a DEFAULT value constraint could be replaced by an omit
template TransmissionInterval p_transmissionInterval := *,
template Termination p_termination := *
) := {
actionID := p_actionID,
detectionTime := ?,
referenceTime := p_referenceTime,
termination := p_termination,
eventPosition := ?,
relevanceDistance := *,//?,
relevanceTrafficDirection := *,//?,
validityDuration := p_validityDuration,
transmissionInterval := p_transmissionInterval,
stationType := p_stationType
}
/**
* @desc Send template for Test system ActionID
* @param p_sequenceNumber The sequence number (Default: 0)
*/
template (value) ActionID m_tsActionId(
template (value) SequenceNumber p_sequenceNumber := 0
) := {
originatingStationID := f_getTsStationId(),
sequenceNumber := p_sequenceNumber
}
/**
* @desc Default receive template for Management Container
*/
template (present) ManagementContainer mw_anyDenmMgmtCon := {
actionID := ?,
detectionTime := ?,
referenceTime := ?,
termination := *,
eventPosition := ?,
relevanceDistance := *,
relevanceTrafficDirection := *,
validityDuration := ?,
transmissionInterval := *,
stationType := ?
}
/**
* @desc Receive template for Management Container with the given action id
* @param p_actionId The expected action id (Default: any)
*/
template (present) ManagementContainer mw_denmMgmtConWithActionID(
template (present) ActionID p_actionId := ?
) modifies mw_anyDenmMgmtCon := {
actionID := p_actionId
}
/**
* @desc Receive template for Management Container with the given data version
* @param p_referenceTime The expected reference time (Default: any)
*/
template (present) ManagementContainer mw_denmMgmtConWithReferenceTime(
template (present) TimestampIts p_referenceTime := ?
) modifies mw_anyDenmMgmtCon := {
referenceTime := p_referenceTime
}
/**
* @desc Send template for ActionID
* @param p_sequenceNumber The sequence number
* @param p_originatorStationID The originator station id (Default: IUT's station id)
*/
template (value) ActionID m_actionId(
template (value) SequenceNumber p_sequenceNumber,
template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
) := {
originatingStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
/**
* @desc Receive template for ActionID
* @param p_originatorStationID The expected originator station id (Default: any)
* @param p_sequenceNumber The expected sequence number (Default: any)
*/
template (present) ActionID mw_actionId(
template (present) ITS_Container.StationID p_originatorStationID := ?,
template (present) SequenceNumber p_sequenceNumber := ?
) := {
originatingStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
/**
* @desc Default receive template for any ActionID
*/
template (present) ActionID mw_anyActionId := ?;
} // end group decentralizedManagementTemplates
group decentralizedSituationTemplates {
group situationTemplates {
/**
* @desc Send template for Situation Container
* @param p_cause The cause code
* @param p_subCause The sub-cause code
* @param p_informationQuality The information quality (Default: 0)
*/
template (value) SituationContainer m_situation(
template (value) CauseCodeType p_cause,
template (value) SubCauseCodeType p_subCause,
template (value) InformationQuality p_informationQuality := 0
) := {
informationQuality := p_informationQuality,
eventType := {
causeCode := p_cause,
subCauseCode := p_subCause
},
linkedCause := omit,
eventHistory := omit
}
/**
* @desc Receive template for Situation Container
* @param p_cause The expected cause code
* @param p_subCause The expected sub-cause code
* @param p_informationQuality The expected information quality (Default: any)
*/
template (present) SituationContainer mw_situation(
template (present) CauseCodeType p_cause,
template (present) SubCauseCodeType p_subCause,
template (present) InformationQuality p_informationQuality := ?
) := {
informationQuality := p_informationQuality,
eventType := {
causeCode := p_cause,
subCauseCode := p_subCause
},
linkedCause := *,
eventHistory := *
}
/**
* @desc Default receive template for Situation Container
*/
template (present) SituationContainer mw_anySitutation := ?;
} // end group situationTemplates
} // end group decentralizedSituationTemplates
group decentralizedLocationTemplates {
/**
* @desc Send template for Location Container where no delta is given
*/
template (value) LocationContainer m_denmLocation_zeroDelta := {
eventSpeed := omit,
eventPositionHeading := omit,
traces := {
{
{
pathPosition := {
deltaLatitude := 0,
deltaLongitude := 0,
deltaAltitude := 0
},
pathDeltaTime := 1
}
}
},
roadType := omit
}
/**
* @desc Default receive template for Location Container
*/
template (present) LocationContainer mw_anyDenmLocation := {
eventSpeed := *,
eventPositionHeading := *,
traces := ?,
roadType := *
}
/**
* @desc Receive template for Location Container with the given traces
* @param p_traces The expected traces.
*/
template (present) LocationContainer mw_denmLocationWithTrace(
template (present) Traces p_traces
) := {
eventSpeed := *,
eventPositionHeading := *,
traces := p_traces,
roadType := *
}
} // end group decentralizedLocationTemplates
group alacarteTemplates {
/**
* @desc Send template for Alacarte Container including lanePosition
*/
template (value) AlacarteContainer m_alacarteConLaneCount := {
lanePosition := 0,
impactReduction := omit,
externalTemperature := omit,
roadWorks := omit,
positioningSolution := omit,
stationaryVehicle := omit
}
/**
* @desc Send template for Alacarte Container including impactReduction
*/
template (value) AlacarteContainer m_alacarteConImpactReduction := {
lanePosition := omit,
impactReduction := m_impactReduction,
externalTemperature := omit,
roadWorks := omit,
positioningSolution := omit,
stationaryVehicle := omit
}
/**
* @desc Send template for ImpactReduction Container
*/
template (value) ImpactReductionContainer m_impactReduction := {
heightLonCarrLeft := 100,
heightLonCarrRight := 100,
posLonCarrLeft := 127,
posLonCarrRight := 127,
positionOfPillars := { 30 },
posCentMass := 63,
wheelBaseVehicle := 127,
turningRadius := 255,
posFrontAx := 20,
positionOfOccupants := '00000000000000000000'B,
vehicleMass := 1024,
requestResponseIndication := request
}
/**
* @desc Receive template for Alacarte Container including impactReduction
*/
template (present) AlacarteContainer mw_alacarteConImpactReduction := {
lanePosition := *,
impactReduction := mw_impactReduction,
externalTemperature := *,
roadWorks := *,
positioningSolution := *,
stationaryVehicle := *
}
/**
* @desc Receive template for ImpactReductio nContainer
*/
template (present) ImpactReductionContainer mw_impactReduction := {
heightLonCarrLeft := ?,
heightLonCarrRight := ?,
posLonCarrLeft := ?,
posLonCarrRight := ?,
positionOfPillars := ?,
posCentMass := ?,
wheelBaseVehicle := ?,
turningRadius := ?,
posFrontAx := ?,
positionOfOccupants := ?,
vehicleMass := ?,
requestResponseIndication := response
}
} // end alacarteTemplates
group sspTemplates {
template (present) bitstring mw_sspNoTrafficCondition := '*0'B;
template (present) bitstring mw_sspNoAccident := '*0?'B;
template (present) bitstring mw_sspNoRoadworks := '*0??'B;
} // end sspTemplates
} // end LibItsDenmTemplates
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_TypesAndValues.ttcn $
* $Id: LibItsDenm_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing type and value definitions for DENM
*
*/
module LibItsDenm_TypesAndValues {
//LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
group actionTypes {
/**
* @desc Indication of whether event cancellation has to be raised by the test system or iut
*/
type enumerated Trigger {
e_ets(0),
e_iut(1)
}
} // end group actionTypes
group otherTypes {
/**
* @desc List of SituationContainers used in behaviours
*/
type record of SituationContainer SituationContainerList;
/**
* @desc List of ActionIDs used in behaviours
*/
type record of ActionID ActionIDList;
}
group denmConstants {
const ValidityDuration c_duration_2sec := 2;
const ValidityDuration c_duration_5sec := 5;
const ValidityDuration c_duration_10sec := 10;
const TransmissionInterval c_interval_1sec := 1000;
const TransmissionInterval c_interval_2sec := 2000;
const TransmissionInterval c_interval_4sec := 4000;
const TransmissionInterval c_interval_5sec := 5000;
const TransmissionInterval c_interval_10sec := 10000;
} // end group denmConstants
group certificates {
const charstring PX_CERT_IUT_DENM_01 := "CERT_IUT_DENM_BO_01_AT";
const charstring PX_CERT_IUT_DENM_02 := "CERT_IUT_DENM_BO_02_AT";
}
group utPrimitives {
/**
* @desc Upper Tester message to initialize IUT
* @member hashedId8 In case of secured mode set, hashedId8 indicate which certificate the IUT shall use
*/
type record UtDenmInitialize {
Oct8 hashedId8
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester results message of the DENM IUT
* @member utDenmInitialize -
* @member utDenmTriggerResult -
* @member utDenmUpdateResult, -
* @member utDenmChangePositionResult -
* @member utDenmChangePseudonymResult -
*/
type union UtDenmResults {
boolean utDenmInitializeResult,
UtDenmTriggerResult utDenmTriggerResult,
UtDenmUpdateResult utDenmUpdateResult,
boolean utDenmTerminationResult,
boolean utDenmChangePositionResult,
boolean utDenmChangePseudonymResult
} with {
variant ""
} // End of type UtDenmResults
/**
* @desc Upper Tester message to request triggering of an event at IUT
*/
type record UtDenmTrigger {
TimestampIts detectionTime,
ValidityDuration validityDuration optional,
ValidityDuration repetitionDuration optional,
SituationContainer situation,
RelevanceDistance relevanceDistance,
RelevanceTrafficDirection relevanceTrafficDirection,
TransmissionInterval transmissionInterval optional,
TransmissionInterval repetitionInterval optional,
AlacarteContainer alacarte optional
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester result message of request of triggering of an event at IUT
*/
type record UtDenmTriggerResult {
boolean result,
ActionID actionId
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to update an event at IUT
*/
type record UtDenmUpdate {
ActionID actionId,
TimestampIts detectionTime,
ValidityDuration validityDuration optional,
SituationContainer situation optional,
LocationContainer location optional,
RelevanceDistance relevanceDistance optional,
RelevanceTrafficDirection relevanceTrafficDirection optional,
TransmissionInterval transmissionInterval optional,
TransmissionInterval repetitionInterval optional,
AlacarteContainer alacarte optional
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester result message of an update request of an event on DENM IUT
*/
type record UtDenmUpdateResult {
boolean result,
ActionID actionId
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to request the termination of an event at IUT
*/
type record UtDenmTermination {
ActionID actionId
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to change the position of IUT. Values a relatives
*/
type record UtDenmChangePosition {
Int32 latitude,
Int32 longitude,
Int32 elevation
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to change the pseudonym of the DENM IUT
*/
type record UtDenmChangePseudonym {
// empty on purpose
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester message to check event/status on DENM IUT
*/
type record UtDenmEventInd {
DENM denMsg
} with {
encode (denMsg) "LibItsDenm_asn1"
}
/**
* @desc List of Upper Tester messages to check event/status on DENM IUT
*/
type record of UtDenmEventInd UtDenmEventIndList;
/**
* @desc List of ActionID received in response to the Upper Tester triggered messages
*/
type record of ActionID UtDenmActionIDList;
}
with {
encode "UpperTester"
variant ""
}
group facilityPrimitives {
group fa1Primitives {
/**
* @desc FA1 DENM Indication Primitive
* @member denmMsg
*/
type record DenmInd {
DENM msgIn,
UInt64 recvTime,
UInt8 gnNextHeader optional,
UInt8 gnHeaderType optional,
UInt8 gnHeaderSubtype optional,
UInt32 gnLifetime optional,
UInt8 gnTrafficClass optional,
UInt16 btpDestinationPort optional,
UInt16 btpInfo optional,
Bit256 ssp optional,
UInt32 its_aid optional
}
with {
encode (msgIn) "PER"
}
/**
* @desc FA1 DENM Request Primitive
* @member denmMsg
*/
type record DenmReq {
DENM msgOut
}
with {
encode (msgOut) "PER"
}
} // End of group fa1Primitives
} // End of group facilityPrimitives
with {
variant ""
encode "LibIts_Interface"
} // end interfacePrimitives
}
with {
encode "LibItsDenm"
}
Subproject commit 5b946972208836fde697755c91aa76400875c147
sources := LibItsDenm_EncdecDeclarations.ttcn \
LibItsDenm_Pics.ttcn \
LibItsDenm_Pixits.ttcn \
LibItsDenm_Templates.ttcn \
LibItsDenm_TypesAndValues.ttcn \
asn1/DENM_PDU_Descriptions.asn \
ifeq (,$(ITS_CONTAINER))
ITS_CONTAINER := defined
sources += asn1/cdd/ITS_Container.asn
endif
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_Functions.ttcn $
* $Id: LibItsDenm_Functions.ttcn,v 1.5 2018/05/31 15:57:07 dte Exp $
* @desc Module containing functions for DENM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsDenm_Functions {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time { modulepar PX_TNOAC ; function f_sleep };
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Templates all;
import from LibItsCommon_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
// LibIts
import from LibItsDenm_TestSystem all;
import from LibItsDenm_TypesAndValues all;
import from LibItsDenm_Templates all;
// import from LibItsDenm_Pixits all;
import from LibItsDenm_Pics all;
group utFuntions {
/**
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtDenmInitialize p_init) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_init);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmInitializeResult := true }) {
tc_wait.stop;
log("*** " & testcasename() & ": INFO: IUT initialized ***");
}
[] a_utDefault() {
//empty on purpose
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
* @desc Requests to change the IUT with a new pseudonym
* @param p_change The change to trigger.
*/
function f_utChangePseudonym ( template (value) UtDenmChangePseudonym p_change ) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_change);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmChangePseudonymResult := true}) {
tc_wait.stop;
log("*** " & testcasename() & ": INFO: IUT pseudonym changed ***");
}
[] utPort.receive(UtDenmResults: { utDenmChangePseudonymResult := false}) {
tc_wait.stop;
log("*** " & testcasename() & ": INFO: IUT pseudonym unchanged ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] a_utDefault() {
//empty on purpose
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
* @desc Triggers an event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(in template (value) UtDenmTrigger p_event) runs on ItsDenm return ActionID {
var ActionID v_actionId;
var UtDenmResults v_result;
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmTriggerResult := ? }) -> value v_result {
tc_wait.stop;
v_actionId := v_result.utDenmTriggerResult.actionId;
if ( not v_result.utDenmTriggerResult.result ) {
f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_error);
}
}
[] a_utDefault() {
//empty on purpose
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
return v_actionId;
}
/**
* @desc Updates an event at the application layer
* @param p_event The event to update.
*/
function f_utUpdateEvent(template (value) UtDenmUpdate p_event) runs on ItsDenm return ActionID {
var ActionID v_actionId;
var UtDenmResults v_result;
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmUpdateResult := ? }) -> value v_result {
tc_wait.stop;
v_actionId := v_result.utDenmUpdateResult.actionId;
}
[] a_utDefault() {
//empty on purpose
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
return v_actionId;
}
/**
* @desc Terminates an event at the application layer
* @param p_event The event to terminate.
*/
function f_utTerminateEvent(template (value) UtDenmTermination p_event) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_event);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmTerminationResult := ?}) {
tc_wait.stop;
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_utDefault() {
//empty on purpose
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
/**
* @desc Changes the position of the IUT
* @param p_latitude
* @param p_longitude
* @param p_elevation
*/
function f_utChangePosition(template (value) UtDenmChangePosition p_position) runs on ItsDenm {
//deactivate denmPort default alts
vc_denmDefaultActive := false;
utPort.send(p_position);
tc_wait.start;
alt {
[] utPort.receive(UtDenmResults: { utDenmChangePositionResult := ? }) {
tc_wait.stop;
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_utDefault() {
//empty on purpose
}
}
//activate denmPort default alts
vc_denmDefaultActive := true;
}
} // End of group utFunctions
group adapterControl {
/**
* @desc Initialise secure mode if required
*/
function f_initialiseSecuredMode(
in charstring p_certificateId := PX_CERT_FOR_TS
) runs on ItsDenm {
if (PICS_IS_IUT_SECURED == true) {
if(e_success != f_acTriggerSecEvent(m_acEnableSecurity(p_certificateId))) {
log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***");
stop;
}
}
} // End of function f_initialiseSecuredMode()
function f_uninitialiseSecuredMode() runs on ItsDenm {
if (PICS_IS_IUT_SECURED == true) {
f_acTriggerSecEvent(m_acDisableSecurity);
}
} // End of function f_initialiseSecuredMode()
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerSecEvent(
in template (value) AcSecPrimitive p_event
) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acSecResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Triggers event in the test system adaptation.
* @param p_event The event to trigger
* @return FncRetCode
*/
function f_acTriggerGnssEvent(template (value) AcGnssPrimitive p_event) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
acPort.send(p_event);
tc_ac.start;
alt {
[] acPort.receive(m_acGnssResponseSuccess) {
tc_ac.stop;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
return v_ret;
}
/**
* @desc Loads the given scenario
*
* @param p_scenario The scenario to load.
*/
function f_acLoadScenario(Scenario p_scenario) runs on ItsDenm {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_loadScenario(p_scenario));
}
} // End of function f_acLoadScenario
/**
* @desc Starts a loaded scenario
*/
function f_acStartScenario() runs on ItsDenm {
if (PX_GNSS_SCENARIO_SUPPORT==true) {
f_acTriggerGnssEvent(m_startScenario);
vc_scenarioStarted := true;
}
} // End of function f_acStartScenario
/**
* @desc Stops a loaded scenario
*/
function f_acStopScenario() runs on ItsDenm {
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_stopScenario);
vc_scenarioStarted := false;
}
} // End of function f_acStopScenario
function f_acAwaitDistanceCovered(float p_distanceToCover) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_distanceToCover(p_distanceToCover));
tc_ac.start(PX_T_GNSS_AWAIT_DISTANCE_COVERED);
alt {
[] acPort.receive(m_acGnssDistanceCoveredSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssDistanceCoveredError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for covered distance indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
return v_ret;
} // End of function f_acAwaitDistanceCovered
function f_acAwaitSpeed(float p_speed, SpeedTrend p_speedTrend := e_accelerate) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_awaitSpeed(p_speed, p_speedTrend));
tc_ac.start(PX_T_GNSS_AWAIT_SPEED_REACHED);
alt {
[] acPort.receive(m_acGnssSpeedReachedSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssSpeedReachedError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for covered distance indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
return v_ret;
} // End of function f_acAwaitSpeed
function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) {
f_acTriggerGnssEvent(m_timeInRunningScenario(p_time));
tc_ac.start(int2float(p_time)*1.1);
alt {
[] acPort.receive(m_acGnssTimeReachedSuccess) {
tc_ac.stop;
}
[] acPort.receive(m_acGnssTimeReachedError) {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_ac.timeout {
log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
return v_ret;
} // end f_acAwaitTimeInRunningScenario
} // End of group adapterControl
group denmConfigurationFunctions {
/**
* @desc Setups default configuration
* @param p_certificateId The certificate identifier the TA shall use in case of secured IUT
*/
function f_cfUp(
in charstring p_certificateId := PX_CERT_FOR_TS
) runs on ItsDenm system ItsDenmSystem {
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
map(self:denmPort, system:denmPort);
f_connect4SelfOrClientSync();
// Initialise secured mode
f_initialiseSecuredMode(p_certificateId);
} // End of function f_cfUp
/**
* @desc Deletes default configuration
*/
function f_cfDown() runs on ItsDenm system ItsDenmSystem {
// Initialise secured mode
f_uninitialiseSecuredMode();
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
unmap(self:denmPort, system:denmPort);
f_disconnect4SelfOrClientSync();
} // End of function f_cfDown
} //end denmConfigurationFunctions
group altsteps {
/**
* @desc The base default.
*/
altstep a_default() runs on ItsDenm {
[vc_denmDefaultActive] denmPort.receive(mw_denmInd(mw_denmPdu(mw_anyDenm))) {
log("*** " & testcasename() & ": INFO: DENM message received in default ***");
vc_denmReceived := true;
repeat;
}
[vc_denmDefaultActive] denmPort.receive {
log("*** " & testcasename() & ": ERROR: Received an unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] acPort.receive(AdapterControlResults: { acGnssTimeReached := ?}) {
log("*** a_default: INFO: event received on AC port in default ***");
repeat;
}
[] acPort.receive(AdapterControlResults: { acGnssSpeedReached := ?}) {
log("*** a_default: INFO: event received on AC port in default ***");
repeat;
}
[] acPort.receive(AdapterControlResults: { acGnssDistanceCovered := ?}) {
log("*** a_default: INFO: event received on AC port in default ***");
repeat;
}
[] acPort.receive {
tc_ac.stop;
log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[] a_shutdown() {
f_poDefault();
f_cfDown();
log("*** " & testcasename() & ": INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
}
/**
* @desc The default for handling upper tester messages.
*/
altstep a_utDefault() runs on ItsDenm {
var UtDenmEventInd v_event;
[vc_utDefaultActive] utPort.receive(UtDenmEventInd:?) -> value v_event {
//store every upper tester indication received
vc_utEvents[lengthof(vc_utEvents)] := v_event;
repeat;
}
[vc_utDefaultActive] utPort.receive {
log("*** " & testcasename() & ": INFO: Received unhandled/unknown UT message from IUT ***");
repeat;
}
}
} // end group altsteps
group preambles {
/**
* @desc The default preamble.
*/
function f_prDefault() runs on ItsDenm {
vc_default := activate(a_default());
activate(a_utDefault());
}
/**
* @desc Brings the IUT into an initial state.
* @return FncRetCode
*/
function f_prInitialState(
in Scenario p_scenario := e_staticPosition,
in template (value) UtDenmInitialize p_denmInitialize := m_denmInitialize,
in boolean p_awaitTimeInRunningScenario := true
) runs on ItsDenm return FncRetCode {
var FncRetCode v_ret := e_success;
f_utInitializeIut(p_denmInitialize);
f_acLoadScenario(valueof(p_scenario));
f_acStartScenario();
if (p_awaitTimeInRunningScenario) {
f_acAwaitTimeInRunningScenario(f_getTimeForGpsFix());
}
f_prDefault();
return v_ret;
}
} // end group preambles
group postambles {
/**
* @desc The default postamble.
*/
function f_poDefault() runs on ItsDenm {
var FncRetCode v_ret := e_success;
f_acStopScenario();
}
/**
* @desc Postamble including cancellation of an event.
* @param p_trigger Indicates if the cancellation have to be raised by the test system(e_ets)
* or at the application layer of the IUT(e_iut).
* @param p_actionId The action ID of the event to be cancelled
*/
function f_poCancelEvent(template (value) Trigger p_trigger, template (value) ActionID p_actionId)
runs on ItsDenm {
var FncRetCode v_ret := e_success;
if (valueof(p_trigger) == e_ets) {
f_sendDenMessage( m_denmCancellation ( p_actionId , f_getTsStationType( ) ) );
f_sleep(PX_TNOAC);
}
else {
f_utTerminateEvent(m_utEventCancellation(p_actionId));
}
f_poDefault();
}
} // end group postambles
group sendFunctions {
/**
* @desc Sends a DEN message
* @param p_sendMsg The DEN message to send.
* @param p_overrideSeqNo Overrides the sequence number with the stored one.
*/
function f_sendDenMessage(template (value) DecentralizedEnvironmentalNotificationMessage p_denm, boolean p_overrideSeqNo := true) runs on ItsDenm return ActionID {
if (p_overrideSeqNo) {
p_denm.management.actionID.sequenceNumber := vc_sequenceNo;
}
denmPort.send(
m_denmReq(
m_denmPdu(
p_denm
)
)
);
return valueof(p_denm.management.actionID);
}
} // end sendFunctions
group receiveFunctions {
/**
* @desc Awaits a DEN message and returns it
* @param p_rcvMsg The expected message to be received.
* @param p_rcvdMsg The received message - OUT.
*/
function f_awaitDenMessage(in template (present) DenmInd p_rcvMsg, out DenmInd p_rcvdMsg) runs on ItsDenm {
tc_ac.start;
alt {
[] denmPort.receive(p_rcvMsg) -> value p_rcvdMsg {
tc_ac.stop;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INFO: Timeout while awaiting the reception of a message ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
}
}
} // end receiveFunctions
group miscellaneousFunctions {
/**
* @desc Increases the sequence number and handles the special case where the
* sequence number reaches the limit of 65535 and will be reset to 0.
* @param p_sequenceNumber The sequence number to increase.
* @return The increased sequence number.
*/
function f_increaseSequenceNumber(in SequenceNumber p_sequenceNumber) return SequenceNumber {
// if maximum number of 65535 reached, reset it to 0
return ((p_sequenceNumber + 1) mod 65536);
}
} // end group miscellaneousFunctions
} // end LibItsDenm_Functions
/**
* @author ETSI / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/DENM/LibItsDenm_TestSystem.ttcn $
* $Id: LibItsDenm_TestSystem.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Test System module for ITS DENM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsDenm_TestSystem {
// LibCommon
// import from LibCommon_Time {modulepar all};
// import from LibCommon_Sync all;
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TestSystem all;
import from LibItsCommon_TypesAndValues all;
// LibItsDenm
import from LibItsDenm_TypesAndValues all;
group portDefinitions {
/**
* @desc Adapter control port
*/
type port AdapterControlPort message {
out
AcGnssPrimitive, AcSecPrimitive;
in
AdapterControlResults
} // end AdapterControlPort
/**
* @desc Upper Tester port
*/
type port UpperTesterPort message {
out
UtDenmInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtDenmChangePosition, UtDenmChangePseudonym;
in
UtDenmResults, UtDenmEventInd;
} // end UpperTesterPort
} // end portDefinitions
group interfacePorts {
group facilityPorts {
group fa1Ports {
/**
* @desc FA1 DENM Port (DENM/BTP/GeoNet/RadioNetwork)
*/
type port DenmPort message {
in DenmInd;
out DenmReq;
} // End of port DenmPort
} // End of group fa1Ports
} // End of group facilityPorts
} // End of group interfacePorts
group componentDefinitions {
/**
* @desc ITS System Adapter
*/
type component ItsDenmSystem {
port UpperTesterPort utPort;
port AdapterControlPort acPort;
// FA1 ports
port DenmPort denmPort;
} // end component ItsAdapter
} // End of group componentDefinitions
/**
* @desc Test component for ITS Facility layer
*/
type component ItsDenm extends ItsBaseComponent {
port AdapterControlPort acPort;
port UpperTesterPort utPort;
// FA1 ports
port DenmPort denmPort;
//timers
//component variables
//default
var default vc_default := null;
//global variables
var SequenceNumber vc_sequenceNo := 0;
var boolean vc_denmReceived := false;
var UtDenmEventIndList vc_utEvents := {};
var UtDenmActionIDList vc_utActionIDs := {};
var boolean vc_utDefaultActive := true;
var boolean vc_denmDefaultActive := true;
} // End of component ItsDenm
} // End of module LibItsDenm_TestSystem
sources := \
LibItsDenm_Functions.ttcn \
LibItsDenm_TestSystem.ttcn
ifeq (,$(ITS_CONTAINER))
ITS_CONTAINER := defined
sources += asn1/cdd/ITS_Container.asn
endif
suite := AtsDENM
sources := ItsDenm_TestCases.ttcn \
ItsDenm_TestControl.ttcn \
ItsDenm_TpFunctions.ttcn
modules := lib \
lib_system \
../LibCommon \
../LibIts \
../AtsGeoNetworking/lib \
../AtsGeoNetworking/lib_system \
../AtsIPv6OverGeoNetworking/lib \
../AtsIPv6OverGeoNetworking/lib_system \
../AtsSecurity/lib \
../AtsSecurity/lib_system \
../AtsBTP/lib \
../AtsBTP/lib_system \
/ccsrc/Ports/LibIts_ports \
/ccsrc/Ports/LibIts_ports/DENM_ports \
/ccsrc/Ports/LibIts_ports/GN_ports \
/ccsrc/Ports/LibIts_ports/IPv6oGN_ports \
/ccsrc/Ports/LibIts_ports/BTP_ports \
/ccsrc/EncDec \
/ccsrc/Framework \
/ccsrc/Externals \
/ccsrc/loggers \
/ccsrc/geospacial \
/ccsrc/Asn1c \
/ccsrc/Protocols/DENM \
/ccsrc/Protocols/DENM_layers \
/ccsrc/Protocols/GeoNetworking \
/ccsrc/Protocols/BTP \
/ccsrc/Protocols/ETH \
/ccsrc/Protocols/Pcap \
/ccsrc/Protocols/UpperTester \
/ccsrc/Protocols/Security \
../modules/titan.TestPorts.Common_Components.Abstract_Socket \