Commit 81a1888e authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

Initial

parent f55fee23
[submodule "lib/asn1"]
path = lib/asn1
url = https://forge.etsi.org/rep/ITS/asn1/cam_en302637_2.git
branch = testing
This diff is collapsed.
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsCAM/ItsCam_TestControl.ttcn $
* $Id: ItsCam_TestControl.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Test Control file for CAM
* @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 ItsCam_TestControl {
// ATS CAM
import from ItsCam_TestCases all;
// LibIts
import from LibItsCam_Pics all;
// Test Execution
control {
if(PICS_CAM_GENERATION) {
execute(TC_CAM_MSD_FMT_BV_01());
if (not PICS_RSU) {
execute(TC_CAM_MSD_FMT_BV_02());
execute(TC_CAM_MSD_FMT_BV_03());
execute(TC_CAM_MSD_FMT_BV_04());
execute(TC_CAM_MSD_FMT_BV_05());
execute(TC_CAM_MSD_INA_BV_01_01());
execute(TC_CAM_MSD_INA_BV_01_02());
execute(TC_CAM_MSD_INA_BV_01_03());
execute(TC_CAM_MSD_INA_BV_01_04());
execute(TC_CAM_MSD_INA_BV_01_05());
execute(TC_CAM_MSD_INA_BV_01_06());
execute(TC_CAM_MSD_INA_BV_01_07());
execute(TC_CAM_MSD_INA_BV_01_08());
execute(TC_CAM_MSD_INA_BV_01_09());
execute(TC_CAM_MSD_INA_BV_01_10());
execute(TC_CAM_MSD_INA_BV_01_11());
execute(TC_CAM_MSD_INA_BV_01_12());
execute(TC_CAM_MSD_INA_BV_01_13());
execute(TC_CAM_MSD_INA_BV_01_14());
execute(TC_CAM_MSD_INA_BV_01_15());
execute(TC_CAM_MSD_INA_BV_01_16());
execute(TC_CAM_MSD_INA_BV_01_17());
execute(TC_CAM_MSD_INA_BV_01_18());
execute(TC_CAM_MSD_INA_BV_01_19());
execute(TC_CAM_MSD_INA_BV_01_20());
execute(TC_CAM_MSD_INA_BV_01_21());
execute(TC_CAM_MSD_INA_BV_01_22());
execute(TC_CAM_MSD_INA_BV_01_23());
execute(TC_CAM_MSD_INA_BV_01_24());
execute(TC_CAM_MSD_INA_BV_01_25());
execute(TC_CAM_MSD_INA_BV_01_26());
execute(TC_CAM_MSD_INA_BV_01_27());
execute(TC_CAM_MSD_INA_BV_01_28());
execute(TC_CAM_MSD_INA_BV_01_29());
execute(TC_CAM_MSD_INA_BV_01_30());
execute(TC_CAM_MSD_INA_BV_01_31());
execute(TC_CAM_MSD_INA_BV_01_32());
execute(TC_CAM_MSD_INA_BV_01_33());
execute(TC_CAM_MSD_INA_BV_01_34());
execute(TC_CAM_MSD_INA_BV_01_35());
}
if (PICS_PUBLICTRANS) {
execute(TC_CAM_MSD_INA_BV_02());
}
if (PICS_SPECIALTRANS) {
execute(TC_CAM_MSD_INA_BV_03());
}
if (PICS_DANGEROUSGOODS) {
execute(TC_CAM_MSD_INA_BV_04());
}
if (PICS_ROADWORKS) {
execute(TC_CAM_MSD_INA_BV_05());
}
if (PICS_RESCUE) {
execute(TC_CAM_MSD_INA_BV_06());
}
if (PICS_EMERGENCY) {
execute(TC_CAM_MSD_INA_BV_07());
}
if (PICS_SAFETY_CAR) {
execute(TC_CAM_MSD_INA_BV_08());
}
execute(TC_CAM_MSD_GFQ_TI_01());
execute(TC_CAM_MSD_GFQ_TI_02());
execute(TC_CAM_MSD_GFQ_TI_03());
execute(TC_CAM_MSD_GFQ_BV_04());
execute(TC_CAM_MSD_GFQ_BV_05());
execute(TC_CAM_MSD_GFQ_BV_06());
execute(TC_CAM_MSD_GFQ_TI_07());
execute(TC_CAM_MSD_GFQ_TI_08());
execute(TC_CAM_MSD_PAR_BV_01());
execute(TC_CAM_MSD_PAR_BV_02());
execute(TC_CAM_MSD_PAR_BV_03());
if (PICS_IS_IUT_SECURED) {
if (PICS_PUBLICTRANS and PICS_SPECIALVEHICLECONTAINER) {
execute(TC_CAM_MSD_SSP_BO_02());
}
if (PICS_SPECIALTRANS and PICS_SPECIALVEHICLECONTAINER) {
execute(TC_CAM_MSD_SSP_BO_03());
}
}
}
if(PICS_CAM_RECEPTION) {
execute(TC_CAM_MSP_BV_01());
if (PICS_IS_IUT_SECURED) {
execute(TC_CAM_MSP_SSP_BV_02());
execute(TC_CAM_MSP_SSP_BV_03());
}
}
}
} // end ItsCam_TestControl
\ No newline at end of file
This diff is collapsed.
module LibItsCam_EncdecDeclarations {
// LibIts
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCam
import from LibItsCam_TypesAndValues all;
import from LibItsCam_TestSystem all;
external function fx_enc_CamReq (CamReq p) return bitstring
with {extension "prototype(convert) encode(LibIts_Interface)"}
external function fx_dec_CamReq (inout bitstring b, out CamReq p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_dec_CamInd (inout bitstring b, out CamInd p) return integer
with {extension "prototype(sliding) decode(LibIts_Interface)"}
external function fx_enc_CAM (CAM p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_CAM (inout bitstring b, out CAM p) return integer
with {extension "prototype(sliding) decode(PER)"}
external function fx_enc_UtCamInitialize (UtCamInitialize p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtCamChangePosition (UtCamChangePosition p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_enc_UtCamTrigger (UtCamTrigger p) return bitstring
with {extension "prototype(convert) encode(UpperTester)"}
external function fx_dec_UtCamResults (inout bitstring b, out UtCamResults p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
external function fx_dec_UtCamEventInd (inout bitstring b, out UtCamEventInd p) return integer
with {extension "prototype(sliding) decode(UpperTester)"}
} // End of module LibItsCam_EncdecDeclarations
This diff is collapsed.
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Pics.ttcn $
* $Id: LibItsCam_Pics.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc CAM 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 LibItsCam_Pics {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
group camPics {
/**
* @desc Is the IUT RSU?
* @see ETSI TS 102 868-1 Table A.1
*/
modulepar boolean PICS_RSU := false;
/**
* @desc Is the IUT running in secured mode?
* @see ETSI TS 102 868-1 Table A.1
*/
modulepar boolean PICS_IS_IUT_SECURED := false;
/**
* @desc Is IUT a public transport vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_PUBLICTRANS := false;
/**
* @desc Is IUT a special transport vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SPECIALTRANS := false;
/**
* @desc Is IUT a dangerous goods vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_DANGEROUSGOODS := false;
/**
* @desc Is IUT a road works vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_ROADWORKS := false;
/**
* @desc Is IUT a rescue vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_RESCUE := false;
/**
* @desc Is IUT an emergency vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_EMERGENCY := false;
/**
* @desc Is IUT a safety car vehicle
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SAFETY_CAR := false;
/**
* @desc Does IUT support 'specialVehicleContainer' in CamParameters?
* @see ETSI TS 102 868-1 Table A.2
*/
modulepar boolean PICS_SPECIALVEHICLECONTAINER := true;
/**
* @desc Maximum time interval between CAM generations (in seconds).
* Default value, as per base standard: 1.0s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMMAX := 1.000;
/**
* @desc Minimum time interval between CAM generations (in seconds).
* Default value, as per base standard: 0.1s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMMIN := 0.100;
/**
* @desc Minimum time interval between CAM generations (in seconds)
* according to the requirements of the
* Decentralized Congestion Control(DCC).
* Default value, as per base standard: 0.1s
* @see ETSI TS 102 868-1 Table A.5
*/
modulepar float PICS_T_GENCAMDCC := 0.100;
/**
* @desc Support for CAM generation
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar boolean PICS_CAM_GENERATION := true;
/**
* @desc Support for CAM reception
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar boolean PICS_CAM_RECEPTION := true;
} // end camPics
group radioComm {
type enumerated RadioAccess {
e_its_g5,
e_lte_cv2x
}
/**
* @desc Does radio communication use ITS-G5 or LTE-V2X?
* @see ETSI TS 102 868-1 Table A.3
*/
modulepar RadioAccess PICS_RADIO_COMM := e_its_g5;
} // End of group radioComm
} // end LibItsCam_Pics
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_Pixits.ttcn $
* $Id: LibItsCam_Pixits.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing Pixits for CAM
* @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 LibItsCam_Pixits {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibItsSecurity
// import from LibItsSecurity_TypesAndValues all;
} // End of module LibItsSecurity_Pixits
\ No newline at end of file
This diff is collapsed.
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_TestSystem.ttcn $
* $Id: LibItsCam_TestSystem.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Test System module for ITS CAM
* @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 LibItsCam_TestSystem language "TTCN-3:2010 Real Time and Performance Testing" {
// 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 CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_TestSystem all;
import from LibItsCommon_TypesAndValues all;
// LibItsCam
import from LibItsCam_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
UtCamInitialize, UtCamTrigger, UtCamChangePosition, UtActivatePositionTime, UtDeactivatePositionTime;
in
UtCamResults, UtCamEventInd;
} // end UpperTesterPort
} // end portDefinitions
group interfacePorts {
group facilityPorts {
group fa1Ports {
/**
* @desc FA1 CAM Port (CAM/BTP/GeoNet/G5)
*/
type port CamPort message {
in CamInd;
out CamReq;
} // End of port CamPort
} // end fa1Ports
} // End of group facilityPorts
} // End of group interfacePorts
group componentDefinitions {
/**
* @desc ITS System Adapter
*/
type component ItsCamSystem {
port UpperTesterPort utPort;
port AdapterControlPort acPort;
// FA1 ports
port CamPort camPort;
} // end component ItsAdapter
} // End of group componentDefinitions
/**
* @desc Test component for ITS Facility layer
*/
type component ItsCam extends ItsBaseComponent {
port UpperTesterPort utPort;
port AdapterControlPort acPort;
// FA1 ports
port CamPort camPort;
//timers
//component variables
var CamInd vc_camMsg;
//default
var default vc_default := null;
//global variables
var boolean vc_camReceived := false;
var UtCamEventIndList vc_utEvents := {};
var boolean vc_utDefaultActive := true;
var boolean vc_camDefaultActive := true;
} // End of component ItsCam
group facilityPrimitives {
group fa1Primitives {
/**
* @desc FA1 CAM Indication Primitive
*/
type record CamInd {
CAM 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 CAM Request Primitive
*/
type record CamReq {
CAM msgOut
}
with {
encode (msgOut) "PER"
}
} // end fa1Primitives
} // End of group facilityPrimitives
with {
variant ""
encode "LibIts_Interface"
} // end interfacePrimitives
} // End of module LibItsCam_TestSystem
/**
* @author ETSI / STF405 / STF449 / STF484 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/CAM/LibItsCam_TypesAndValues.ttcn $
* $Id: LibItsCam_TypesAndValues.ttcn 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing types and values for CAM Protocol
* @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 LibItsCam_TypesAndValues {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
group camValues {
const float c_lowFrequencyGenerationTime := 0.5; //500 ms
const float c_specialVehicleGenerationTime := 0.5; //500 ms
const AccelerationControl c_accCtrlIdle := '0000000'B;
const ExteriorLights c_elAllLightsOff := '00000000'B;
const VehicleRole c_vehicleRole_publicTransport := publicTransport;
const VehicleRole c_vehicleRole_specialTransport := specialTransport;
const VehicleRole c_vehicleRole_dangerousGoods := dangerousGoods;
const VehicleRole c_vehicleRole_roadWork := roadWork;
const VehicleRole c_vehicleRole_rescue := rescue;
const VehicleRole c_vehicleRole_emergency := emergency;
const VehicleRole c_vehicleRole_safetyCar := safetyCar;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives1 := explosives1;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives2 := explosives2;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives3 := explosives3;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives4 := explosives4;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives5 := explosives5;
const DangerousGoodsBasic c_dangerousGoodsBasic_explosives6 := explosives6;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableGases := flammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_nonFlammableGases := nonFlammableGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicGases := toxicGases;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableLiquids := flammableLiquids;
const DangerousGoodsBasic c_dangerousGoodsBasic_flammableSolids := flammableSolids;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesLiableToSpontaneousCombustion := substancesLiableToSpontaneousCombustion;
const DangerousGoodsBasic c_dangerousGoodsBasic_substancesEmittingFlammableGasesUponContactWithWater := substancesEmittingFlammableGasesUponContactWithWater;
const DangerousGoodsBasic c_dangerousGoodsBasic_oxidizingSubstances := oxidizingSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_organicPeroxides := organicPeroxides;
const DangerousGoodsBasic c_dangerousGoodsBasic_toxicSubstances := toxicSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_infectiousSubstances := infectiousSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_radioactiveMaterial := radioactiveMaterial;
const DangerousGoodsBasic c_dangerousGoodsBasic_corrosiveSubstances := corrosiveSubstances;
const DangerousGoodsBasic c_dangerousGoodsBasic_miscellaneousDangerousSubstances := miscellaneousDangerousSubstances;
} // end group camValues
group certificates {
const charstring PX_CERT_IUT_CAM_02 := "CERT_IUT_CAM_BO_02_AT";
const charstring PX_CERT_IUT_CAM_03 := "CERT_IUT_CAM_BO_03_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 UtCamInitialize {
Oct8 hashedId8
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc Upper Tester results message of the CAM IUT
* @member utCamInitialize -
* @member utCamTriggerResult -
* @member utCamChangePositionResult -
* @member utActivatePositionTimeResult -
* @member utDeactivatePositionTimeResult -
*/
type union UtCamResults {
boolean utCamInitializeResult,
boolean utCamTriggerResult,
boolean utCamChangePositionResult,
boolean utActivatePositionTimeResult,
boolean utDeactivatePositionTimeResult
} with {
variant ""
} // End of type UtCamResults
/**
* @desc Upper Tester message to change the position of IUT. Values a relatives
*/
type record UtCamChangePosition {
Int32 latitude,
Int32 longitude,
Int32 elevation
} with {
variant "FIELDORDER(msb)"
}
/**
* @desc
* @member changeCurvature Changes the curvature.
* @member changeSpeed Changes the speed in cm/s.
* @member setAccelerationControlStatus Sets the acceleration control status.
* @member setExteriorLightsStatus Sets the exterior lights status.
* @member changeHeading Changes the heading.
* @member setDriveDirection Sets the drive direction.
* @member setStationType
* @member setVehicleRole
* @member setEmbarkationStatus
* @member setPtActivation
* @member setDangerousGoods
* @member setLightBarSireneStatus
* @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second.
*/
type union UtCamTrigger {
CurvatureValue changeCurvature,
Int16 changeSpeed,
AccelerationControl setAccelerationControlStatus,
ExteriorLights setExteriorLightsStatus,