Commits (8)
[submodule "lib/asn1"]
path = lib/asn1
url = https://forge.etsi.org/rep/ITS/asn1/denm_en302637_3.git
branch = testing
This diff is collapsed.
/**
* @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
This diff is collapsed.
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
This diff is collapsed.
/**
* @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
This diff is collapsed.
/**
* @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 \