Loading ttcn/CAM/LibItsCam_Functions.ttcn +32 −98 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc Module containing common functions for ITS CAM * @desc Module containing common functions for ITS CAM Loading @@ -17,6 +17,7 @@ module LibItsCam_Functions { import from LibItsCam_Pixits all; import from LibItsCam_Pixits all; import from LibItsCam_TypesAndValues all; import from LibItsCam_TypesAndValues all; import from LibItsCommon_Functions all; import from LibItsCommon_Functions all; import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions 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; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -79,7 +80,7 @@ module LibItsCam_Functions { * @param p_event The event to check. * @param p_event The event to check. * @param p_discard The event should not appear. Default value: FALSE. * @param p_discard The event should not appear. Default value: FALSE. */ */ function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard) runs on ItsCam { function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard := false) runs on ItsCam { var template (value) UtCheck v_utMsg := { p_event }; var template (value) UtCheck v_utMsg := { p_event }; utPort.send(v_utMsg); utPort.send(v_utMsg); Loading Loading @@ -203,99 +204,32 @@ module LibItsCam_Functions { } // end group postambles } // end group postambles group otherFunctions { group camPositionFunctions { /** @desc function to generate a random bitstring value * corresponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * @see f_random * @param p_length bitstring length - max 15 * @return bitstring * */ function f_bitPositionRandom( in integer p_length ) return bitstring { //Variables var bitstring v_random := '1'B; var integer i := 0; for(i:=0; i < (p_length - 1); i:=i+1) { v_random := '0'B & v_random; } v_random := v_random << f_random(0, (p_length - 1)); log("*** f_bitPositionRandom: INFO: OK - random value = " & bit2str(v_random) & " ***"); return v_random; } // end function f_bitPositionRandom } // end group otherFunctions group getIutFunctions { /** * @desc Function to get the PT Line Description * @see PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE */ function f_getIutPtLineDescription() return PTLineDescription { var PTLineDescription v_ptLineDescription := {"", "", ""}; v_ptLineDescription := {PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE}; return v_ptLineDescription ; } // end function f_getIutPtLineDescription } // end getIutFunctions group getTesterFunctions { /** * @desc Gets tester's station characteristics * @return Station characteristics * @see PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT */ function f_getTesterStationCharacteristics() return CoopAwareness.stationCharacteristics { var CoopAwareness.stationCharacteristics v_stationCharacteristics := { true, true, true }; v_stationCharacteristics := {PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; return v_stationCharacteristics ; } // end f_getTesterStationCharacteristics /** /** * @desc Creates a valid CAM for tester * @desc Compute a position using a reference position, a distance * and an orientation * * @param p_referencePosition The base reference position. * @param p_offSet Distance to the reference position (in meter). * * @return The new reference position. */ */ function f_getTesterValidCam() function f_computePositionUsingDistance(in ReferencePosition p_referencePosition, in integer p_offSet) return ReferencePosition { return template (value) CamPdu { var ReferencePosition v_referencePosition := p_referencePosition; var CoopAwareness.stationCharacteristics v_stationCharacteristics; log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***"); fx_computePositionUsingDistance( if(PX_TESTER_IS_MOBILE == false) { p_referencePosition.latitude, // basic IRS p_referencePosition.longitude, v_stationCharacteristics := {false, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; p_offSet, return m_camMsg_irs( p_referencePosition.positionConfidenceEllipse.semiMajorOrientation.headingValue, f_getCurrentTime(), v_referencePosition.latitude, f_getTsStationId(), v_referencePosition.longitude v_stationCharacteristics, m_tsPosition ); } else { // Vehicle v_stationCharacteristics := {true, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; return m_camMsg_vehicle( f_getCurrentTime(), f_getTsStationId(), v_stationCharacteristics, m_tsPosition ); ); return v_referencePosition; } } } // end f_getTesterValidCam } // end getTesterFunctions } // end group camPositionFunctions } // end LibItsCam_Functions } // end LibItsCam_Functions No newline at end of file ttcn/CAM/LibItsCam_Pics.ttcn +56 −84 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc CAM PICS * @desc CAM PICS Loading @@ -13,109 +13,81 @@ module LibItsCam_Pics { group camPics { group camPics { /** /** * @desc Is IUT a basic vehicle * @desc Is IUT a public transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/1 * @see ETSI TS 102 868-1 v0.0.1 A.12/1 */ */ modulepar boolean PICS_BASICVEH := false; modulepar boolean PICS_PUBLICTRANS := false; /** /** * @desc Is IUT a basic IRS * @desc Is IUT a special transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.3/1 * @see ETSI TS 102 868-1 v0.0.1 A.12/2 */ */ modulepar boolean PICS_BASICIRS := false; modulepar boolean PICS_SPECIALTRANS := false; /** /** * @desc Does IUT support 'CurvatureGradient' indicatio * @desc Is IUT a dangerous goods vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/32 * @see ETSI TS 102 868-1 v0.0.1 A.12/3 */ */ modulepar boolean PICS_CURVCHANGE := false; modulepar boolean PICS_DANGEROUSGOODS := false; /** /** * @desc Does IUT support 'DoorOpen' indication * @desc Is IUT a road works vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/28 * @see ETSI TS 102 868-1 v0.0.1 A.12/4 */ */ modulepar boolean PICS_DOOROPEN := false; modulepar boolean PICS_ROADWORKS := false; /** /** * @desc Does IUT support 'distanceToStopLine' indication * @desc Is IUT a rescue vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/23 * @see ETSI TS 102 868-1 v0.0.1 A.12/5 */ */ modulepar boolean PICS_DISTTOSTOPLINE := false; modulepar boolean PICS_RESCUE := false; /** /** * @desc Is IUT an emergency vehicle * @desc Is IUT an emergency vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/2 * @see ETSI TS 102 868-1 v0.0.1 A.12/6 */ modulepar boolean PICS_EMERVEH := false; /** * @desc Does IUT support 'lightBarInUse' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/3 */ modulepar boolean PICS_LIGHTBARINUSE := false; /** * @desc Does IUT support 'Occupancy' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/25 */ modulepar boolean PICS_OCCUPANCY := false; /** * @desc Does IUT support 'PTLineDescription' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/22 */ modulepar boolean PICS_PTLINEDESCRIPTION := false; /** * @desc Is IUT a public transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/3 */ modulepar boolean PICS_PUBTRANSVEH := false; /** * @desc Does IUT support 'ScheduleDeviation' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/27 */ */ modulepar boolean PICS_SCHEDULEDEVIATION := false; modulepar boolean PICS_EMERGENCY := false; /** /** * @desc Does IUT support 'SireneInUse' indication * @desc Is IUT a safety car vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/4 * @see ETSI TS 102 868-1 v0.0.1 A.12/7 */ */ modulepar boolean PICS_SIRENEINUSE := false; modulepar boolean PICS_SAFETY_CAR := false; /** /** * @desc Does IUT support 'TrafficLightPriority' indication * @desc Does IUT support 'lowFrequencyContainer' in CamParameters? * @see ETSI TS 102 868-1 v1.1.1 A.16/28 * @see ETSI TS 102 868-1 v0.0.1 A.8/3 */ */ modulepar boolean PICS_TRAFFICLIGHTPRIORITY := false; modulepar boolean PICS_LOWFREQUENCYCONTAINER := true; /** /** * @desc Does IUT support 'turnAdvice' indication * @desc Does IUT support 'specialVehicleContainer' in CamParameters? * @see ETSI TS 102 868-1 v1.1.1 A.16/22 * @see ETSI TS 102 868-1 v0.0.1 A.8/4 */ */ modulepar boolean PICS_TURNADVICE := false; modulepar boolean PICS_SPECIALVEHICLECONTAINER := true; /** /** * @desc Minimum time interval between CAM generations (in seconds) * @desc Minimum time interval between CAM generations (in seconds) * Default value, as per base standard: 0,1s * according to the requirements of the * @see ETSI TS 102 868-1 v1.1.1 A.66/1 * Decentralized Congestion Control(DCC). * Default value, as per base standard: 0.1s * @see ETSI TS 102 868-1 v0.0.1 A.22/4 */ */ modulepar float PICS_CAM_MIN_TRANSMISSION_INTERVAL := 0.1; modulepar float PICS_T_GENCAMDCC := 0.100; /** /** * @desc Maximum time interval between CAM generations (in seconds) * @desc Maximum time interval between CAM generations (in seconds). * Default value, as per base standard: 1s * Default value, as per base standard: 1.0s * @see ETSI TS 102 868-1 v1.1.1 A.66/2 * @see ETSI TS 102 868-1 v0.0.1 A.22/1 */ */ modulepar float PICS_CAM_MAX_TRANSMISSION_INTERVAL := 1.0; modulepar float PICS_T_GENCAMMAX := 1.000; /** /** * @desc Duration of doors closure for situational mandatory TaggedValue * @desc Minimum time interval between CAM generations (in seconds). * Default value, as per base standard: 30s * Default value, as per base standard: 0.1s * @see ETSI TS 102 868-1 v1.1.1 A.66/5 * @see ETSI TS 102 868-1 v0.0.1 A.22/2 */ */ modulepar float PICS_DOORS_CLOSED_TIMER := 30.0; modulepar float PICS_T_GENCAMMIN := 0.100; } // end camPics } // end camPics Loading ttcn/CAM/LibItsCam_Templates.ttcn +477 −558 File changed.Preview size limit exceeded, changes collapsed. Show changes ttcn/CAM/LibItsCam_TestSystem.ttcn +6 −7 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $ * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $ * $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $ * $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $ * @desc Test System module for ITS CAM * @desc Test System module for ITS CAM Loading Loading @@ -86,7 +86,6 @@ module LibItsCam_TestSystem { var default vc_default := null; var default vc_default := null; //global variables //global variables var SequenceNo vc_sequenceNo := 0; var boolean vc_camReceived := false; var boolean vc_camReceived := false; } // End of component ItsCam } // End of component ItsCam Loading @@ -99,7 +98,7 @@ module LibItsCam_TestSystem { * @desc FA1 CAM Indication Primitive * @desc FA1 CAM Indication Primitive */ */ type record CamInd { type record CamInd { CamPdu msgIn CAM msgIn } } with { with { encode (msgIn) "LibItsCam_asn1" encode (msgIn) "LibItsCam_asn1" Loading @@ -109,7 +108,7 @@ module LibItsCam_TestSystem { * @desc FA1 CAM Request Primitive * @desc FA1 CAM Request Primitive */ */ type record CamReq { type record CamReq { CamPdu msgOut CAM msgOut } } with { with { encode (msgOut) "LibItsCam_asn1" encode (msgOut) "LibItsCam_asn1" Loading ttcn/CAM/LibItsCam_TypesAndValues.ttcn +62 −119 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc Module containing types and values for CAM Protocol * @desc Module containing types and values for CAM Protocol Loading @@ -12,58 +12,18 @@ module LibItsCam_TypesAndValues { import from LibCommon_DataStrings all; import from LibCommon_DataStrings all; // LibIts // LibIts import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions 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; import from DENM_PDU_Descriptions language "ASN.1:1997" all; group camValues { group camValues { const boolean c_precisely := true; const float c_lowFrequencyGenerationTime := 0.5; //500 ms const boolean c_notPrecisely := false; const float c_specialVehicleGenerationTime := 0.5; //500 ms const CrashStatus c_activated := true; const AccelerationControl c_accCtrlIdle := '0000000'B; const CrashStatus c_deactivated := false; const AccelerationControl c_acIdle := '000000'B; const AccelerationControl c_cruiseControl := '001000'B; const AccelerationControl c_acc := '000100'B; const AccelerationControl c_limiter := '000010'B; const AccelerationControl c_brakeAssist := '000001'B; const AccelerationControl c_throttlePedal := '010000'B; const AccelerationControl c_brakePedal := '100000'B; const DangerousGoods c_noDangerousGoodsTransported := 0; const Direction c_south := 14400; const Direction c_north := 0; const Direction c_east := 7200; const Direction c_west := 21600; const DoorOpen c_doorsClosed := '0000'B; const DoorOpen c_passengerDoor := '0100'B; const DoorOpen c_luggageDoor := '0001'B; const DoorOpen c_maintenanceDoor := '0010'B; const DoorOpen c_driverDoor := '1000'B; const ExteriorLights c_elAllLightsOff := '00000000'B; const ExteriorLights c_elAllLightsOff := '00000000'B; const ExteriorLights c_automaticLightControlOn := '00001000'B; const ExteriorLights c_rightTurnSignalOn := '00010000'B; const ExteriorLights c_leftTurnSignalOn := '00100000'B; const ExteriorLights c_hazardConditionsOn := '00110000'B; const ExteriorLights c_lowBeamHeadlightsOn := '10000000'B; const ExteriorLights c_fogLightOn := '00000010'B; const ExteriorLights c_parkingLightsOn := '00000001'B; const ExteriorLights c_highBeamHeadlightsOn := '01000000'B; const ExteriorLights c_daytimeRunningLightsOn := '00000100'B; const TurnDirection c_tdAllIndicatorsOff := '00000000'B; const TurnDirection c_sharpLeft := '00000001'B; const TurnDirection c_uTurn := '10000000'B; const TurnDirection c_slightLeft := '00000100'B; const TurnDirection c_left := '00000010'B; const TurnDirection c_straight := '00001000'B; const TurnDirection c_right := '00100000'B; const TurnDirection c_slightRight := '00010000'B; const TurnDirection c_sharpRight := '01000000'B; } // end group camValues } // end group camValues Loading Loading @@ -115,44 +75,27 @@ module LibItsCam_TypesAndValues { } } /** /** * @desc Events at the application layer of the IUT. * @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 changeHeading Changes the heading. * @member setDriveDirection Sets the drive direction. * @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second. * @member changePosition Changes the position in the direction of the current heading in meters. * @member changePosition Changes the position in the direction of the current heading in meters. * @member changeSpeed Changes the speed. * @member checkLdm Checks that the received CAM was provided at LDM. * @member setCrashSignal Sets the crash signal. * @member setDangerousGoodsStatus Sets the dangerous goods status. * @member setLengthWidthPrecision Sets the length width precision. * @member setDistanceToStopLine Set the distance to the stop line. * @member setTurnAdvice Sets the turn advice. * @member changeCurvature Changes the curvature. * @member setOccupancy Sets the occupancy. * @member setDoorStatus Sets the door status. * @member setLightBarStatus Sets the light bar status. * @member setSireneStatus Sets the sirene status. * @member setTrafficLightPriority Sets the traffic light priority. * @member setScheduleDeviation Sets the schedule deviation. * @member setPtLineDescription Sets the PT line description. * @member setExteriorLightsStatus Sets the extirior lights status. */ */ type union UtCamEvent { type union UtCamEvent { Direction changeHeading, CurvatureValue changeCurvature, integer changePosition, SpeedValue changeSpeed, Speed changeSpeed, AccelerationControl setAccelerationControlStatus, CrashStatus setCrashSignal, DangerousGoods setDangerousGoodsStatus, boolean setLengthWidthPrecision, Distance setDistanceToStopLine, TurnAdvice setTurnAdvice, Curvature changeCurvature, Occupancy setOccupancy, DoorOpen setDoorStatus, SimpleSystemState setLightBarStatus, SimpleSystemState setSireneStatus, Priority setTrafficLightPriority, ScheduleDeviation setScheduleDeviation, PTLineDescription setPtLineDescription, ExteriorLights setExteriorLightsStatus, ExteriorLights setExteriorLightsStatus, CamPdu checkLdm HeadingValue changeHeading, DriveDirection setDriveDirection, YawRateValue changeYawRate, integer changePosition, CAM checkLdm } } } // end utPrimitives } // end utPrimitives Loading Loading
ttcn/CAM/LibItsCam_Functions.ttcn +32 −98 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc Module containing common functions for ITS CAM * @desc Module containing common functions for ITS CAM Loading @@ -17,6 +17,7 @@ module LibItsCam_Functions { import from LibItsCam_Pixits all; import from LibItsCam_Pixits all; import from LibItsCam_TypesAndValues all; import from LibItsCam_TypesAndValues all; import from LibItsCommon_Functions all; import from LibItsCommon_Functions all; import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions 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; import from DENM_PDU_Descriptions language "ASN.1:1997" all; Loading Loading @@ -79,7 +80,7 @@ module LibItsCam_Functions { * @param p_event The event to check. * @param p_event The event to check. * @param p_discard The event should not appear. Default value: FALSE. * @param p_discard The event should not appear. Default value: FALSE. */ */ function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard) runs on ItsCam { function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard := false) runs on ItsCam { var template (value) UtCheck v_utMsg := { p_event }; var template (value) UtCheck v_utMsg := { p_event }; utPort.send(v_utMsg); utPort.send(v_utMsg); Loading Loading @@ -203,99 +204,32 @@ module LibItsCam_Functions { } // end group postambles } // end group postambles group otherFunctions { group camPositionFunctions { /** @desc function to generate a random bitstring value * corresponding to 1 bit position set to 1 (eg '00010000', '01000000', ...) * @see f_random * @param p_length bitstring length - max 15 * @return bitstring * */ function f_bitPositionRandom( in integer p_length ) return bitstring { //Variables var bitstring v_random := '1'B; var integer i := 0; for(i:=0; i < (p_length - 1); i:=i+1) { v_random := '0'B & v_random; } v_random := v_random << f_random(0, (p_length - 1)); log("*** f_bitPositionRandom: INFO: OK - random value = " & bit2str(v_random) & " ***"); return v_random; } // end function f_bitPositionRandom } // end group otherFunctions group getIutFunctions { /** * @desc Function to get the PT Line Description * @see PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE */ function f_getIutPtLineDescription() return PTLineDescription { var PTLineDescription v_ptLineDescription := {"", "", ""}; v_ptLineDescription := {PX_PTLINE_COURSE, PX_PTLINE_REF, PX_PTLINE_ROUTE}; return v_ptLineDescription ; } // end function f_getIutPtLineDescription } // end getIutFunctions group getTesterFunctions { /** * @desc Gets tester's station characteristics * @return Station characteristics * @see PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT */ function f_getTesterStationCharacteristics() return CoopAwareness.stationCharacteristics { var CoopAwareness.stationCharacteristics v_stationCharacteristics := { true, true, true }; v_stationCharacteristics := {PX_TESTER_IS_MOBILE, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; return v_stationCharacteristics ; } // end f_getTesterStationCharacteristics /** /** * @desc Creates a valid CAM for tester * @desc Compute a position using a reference position, a distance * and an orientation * * @param p_referencePosition The base reference position. * @param p_offSet Distance to the reference position (in meter). * * @return The new reference position. */ */ function f_getTesterValidCam() function f_computePositionUsingDistance(in ReferencePosition p_referencePosition, in integer p_offSet) return ReferencePosition { return template (value) CamPdu { var ReferencePosition v_referencePosition := p_referencePosition; var CoopAwareness.stationCharacteristics v_stationCharacteristics; log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***"); fx_computePositionUsingDistance( if(PX_TESTER_IS_MOBILE == false) { p_referencePosition.latitude, // basic IRS p_referencePosition.longitude, v_stationCharacteristics := {false, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; p_offSet, return m_camMsg_irs( p_referencePosition.positionConfidenceEllipse.semiMajorOrientation.headingValue, f_getCurrentTime(), v_referencePosition.latitude, f_getTsStationId(), v_referencePosition.longitude v_stationCharacteristics, m_tsPosition ); } else { // Vehicle v_stationCharacteristics := {true, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT}; return m_camMsg_vehicle( f_getCurrentTime(), f_getTsStationId(), v_stationCharacteristics, m_tsPosition ); ); return v_referencePosition; } } } // end f_getTesterValidCam } // end getTesterFunctions } // end group camPositionFunctions } // end LibItsCam_Functions } // end LibItsCam_Functions No newline at end of file
ttcn/CAM/LibItsCam_Pics.ttcn +56 −84 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc CAM PICS * @desc CAM PICS Loading @@ -13,109 +13,81 @@ module LibItsCam_Pics { group camPics { group camPics { /** /** * @desc Is IUT a basic vehicle * @desc Is IUT a public transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/1 * @see ETSI TS 102 868-1 v0.0.1 A.12/1 */ */ modulepar boolean PICS_BASICVEH := false; modulepar boolean PICS_PUBLICTRANS := false; /** /** * @desc Is IUT a basic IRS * @desc Is IUT a special transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.3/1 * @see ETSI TS 102 868-1 v0.0.1 A.12/2 */ */ modulepar boolean PICS_BASICIRS := false; modulepar boolean PICS_SPECIALTRANS := false; /** /** * @desc Does IUT support 'CurvatureGradient' indicatio * @desc Is IUT a dangerous goods vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/32 * @see ETSI TS 102 868-1 v0.0.1 A.12/3 */ */ modulepar boolean PICS_CURVCHANGE := false; modulepar boolean PICS_DANGEROUSGOODS := false; /** /** * @desc Does IUT support 'DoorOpen' indication * @desc Is IUT a road works vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/28 * @see ETSI TS 102 868-1 v0.0.1 A.12/4 */ */ modulepar boolean PICS_DOOROPEN := false; modulepar boolean PICS_ROADWORKS := false; /** /** * @desc Does IUT support 'distanceToStopLine' indication * @desc Is IUT a rescue vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/23 * @see ETSI TS 102 868-1 v0.0.1 A.12/5 */ */ modulepar boolean PICS_DISTTOSTOPLINE := false; modulepar boolean PICS_RESCUE := false; /** /** * @desc Is IUT an emergency vehicle * @desc Is IUT an emergency vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/2 * @see ETSI TS 102 868-1 v0.0.1 A.12/6 */ modulepar boolean PICS_EMERVEH := false; /** * @desc Does IUT support 'lightBarInUse' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/3 */ modulepar boolean PICS_LIGHTBARINUSE := false; /** * @desc Does IUT support 'Occupancy' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/25 */ modulepar boolean PICS_OCCUPANCY := false; /** * @desc Does IUT support 'PTLineDescription' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/22 */ modulepar boolean PICS_PTLINEDESCRIPTION := false; /** * @desc Is IUT a public transport vehicle * @see ETSI TS 102 868-1 v1.1.1 A.2/3 */ modulepar boolean PICS_PUBTRANSVEH := false; /** * @desc Does IUT support 'ScheduleDeviation' indication * @see ETSI TS 102 868-1 v1.1.1 A.16/27 */ */ modulepar boolean PICS_SCHEDULEDEVIATION := false; modulepar boolean PICS_EMERGENCY := false; /** /** * @desc Does IUT support 'SireneInUse' indication * @desc Is IUT a safety car vehicle * @see ETSI TS 102 868-1 v1.1.1 A.16/4 * @see ETSI TS 102 868-1 v0.0.1 A.12/7 */ */ modulepar boolean PICS_SIRENEINUSE := false; modulepar boolean PICS_SAFETY_CAR := false; /** /** * @desc Does IUT support 'TrafficLightPriority' indication * @desc Does IUT support 'lowFrequencyContainer' in CamParameters? * @see ETSI TS 102 868-1 v1.1.1 A.16/28 * @see ETSI TS 102 868-1 v0.0.1 A.8/3 */ */ modulepar boolean PICS_TRAFFICLIGHTPRIORITY := false; modulepar boolean PICS_LOWFREQUENCYCONTAINER := true; /** /** * @desc Does IUT support 'turnAdvice' indication * @desc Does IUT support 'specialVehicleContainer' in CamParameters? * @see ETSI TS 102 868-1 v1.1.1 A.16/22 * @see ETSI TS 102 868-1 v0.0.1 A.8/4 */ */ modulepar boolean PICS_TURNADVICE := false; modulepar boolean PICS_SPECIALVEHICLECONTAINER := true; /** /** * @desc Minimum time interval between CAM generations (in seconds) * @desc Minimum time interval between CAM generations (in seconds) * Default value, as per base standard: 0,1s * according to the requirements of the * @see ETSI TS 102 868-1 v1.1.1 A.66/1 * Decentralized Congestion Control(DCC). * Default value, as per base standard: 0.1s * @see ETSI TS 102 868-1 v0.0.1 A.22/4 */ */ modulepar float PICS_CAM_MIN_TRANSMISSION_INTERVAL := 0.1; modulepar float PICS_T_GENCAMDCC := 0.100; /** /** * @desc Maximum time interval between CAM generations (in seconds) * @desc Maximum time interval between CAM generations (in seconds). * Default value, as per base standard: 1s * Default value, as per base standard: 1.0s * @see ETSI TS 102 868-1 v1.1.1 A.66/2 * @see ETSI TS 102 868-1 v0.0.1 A.22/1 */ */ modulepar float PICS_CAM_MAX_TRANSMISSION_INTERVAL := 1.0; modulepar float PICS_T_GENCAMMAX := 1.000; /** /** * @desc Duration of doors closure for situational mandatory TaggedValue * @desc Minimum time interval between CAM generations (in seconds). * Default value, as per base standard: 30s * Default value, as per base standard: 0.1s * @see ETSI TS 102 868-1 v1.1.1 A.66/5 * @see ETSI TS 102 868-1 v0.0.1 A.22/2 */ */ modulepar float PICS_DOORS_CLOSED_TIMER := 30.0; modulepar float PICS_T_GENCAMMIN := 0.100; } // end camPics } // end camPics Loading
ttcn/CAM/LibItsCam_Templates.ttcn +477 −558 File changed.Preview size limit exceeded, changes collapsed. Show changes
ttcn/CAM/LibItsCam_TestSystem.ttcn +6 −7 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $ * @version $URL: svn+ssh://vcs.etsi.org/TTCN3/LIB/LibIts/trunk/ttcn/LibIts_TestSystem.ttcn $ * $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $ * $Id: LibIts_TestSystem.ttcn 408 2012-02-28 13:49:56Z garciay $ * @desc Test System module for ITS CAM * @desc Test System module for ITS CAM Loading Loading @@ -86,7 +86,6 @@ module LibItsCam_TestSystem { var default vc_default := null; var default vc_default := null; //global variables //global variables var SequenceNo vc_sequenceNo := 0; var boolean vc_camReceived := false; var boolean vc_camReceived := false; } // End of component ItsCam } // End of component ItsCam Loading @@ -99,7 +98,7 @@ module LibItsCam_TestSystem { * @desc FA1 CAM Indication Primitive * @desc FA1 CAM Indication Primitive */ */ type record CamInd { type record CamInd { CamPdu msgIn CAM msgIn } } with { with { encode (msgIn) "LibItsCam_asn1" encode (msgIn) "LibItsCam_asn1" Loading @@ -109,7 +108,7 @@ module LibItsCam_TestSystem { * @desc FA1 CAM Request Primitive * @desc FA1 CAM Request Primitive */ */ type record CamReq { type record CamReq { CamPdu msgOut CAM msgOut } } with { with { encode (msgOut) "LibItsCam_asn1" encode (msgOut) "LibItsCam_asn1" Loading
ttcn/CAM/LibItsCam_TypesAndValues.ttcn +62 −119 Original line number Original line Diff line number Diff line /** /** * @author ETSI / STF405 * @author ETSI / STF405 / STF449 * @version $URL$ * @version $URL$ * $Id$ * $Id$ * @desc Module containing types and values for CAM Protocol * @desc Module containing types and values for CAM Protocol Loading @@ -12,58 +12,18 @@ module LibItsCam_TypesAndValues { import from LibCommon_DataStrings all; import from LibCommon_DataStrings all; // LibIts // LibIts import from ITS_Container language "ASN.1:1997" all; import from CAM_PDU_Descriptions 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; import from DENM_PDU_Descriptions language "ASN.1:1997" all; group camValues { group camValues { const boolean c_precisely := true; const float c_lowFrequencyGenerationTime := 0.5; //500 ms const boolean c_notPrecisely := false; const float c_specialVehicleGenerationTime := 0.5; //500 ms const CrashStatus c_activated := true; const AccelerationControl c_accCtrlIdle := '0000000'B; const CrashStatus c_deactivated := false; const AccelerationControl c_acIdle := '000000'B; const AccelerationControl c_cruiseControl := '001000'B; const AccelerationControl c_acc := '000100'B; const AccelerationControl c_limiter := '000010'B; const AccelerationControl c_brakeAssist := '000001'B; const AccelerationControl c_throttlePedal := '010000'B; const AccelerationControl c_brakePedal := '100000'B; const DangerousGoods c_noDangerousGoodsTransported := 0; const Direction c_south := 14400; const Direction c_north := 0; const Direction c_east := 7200; const Direction c_west := 21600; const DoorOpen c_doorsClosed := '0000'B; const DoorOpen c_passengerDoor := '0100'B; const DoorOpen c_luggageDoor := '0001'B; const DoorOpen c_maintenanceDoor := '0010'B; const DoorOpen c_driverDoor := '1000'B; const ExteriorLights c_elAllLightsOff := '00000000'B; const ExteriorLights c_elAllLightsOff := '00000000'B; const ExteriorLights c_automaticLightControlOn := '00001000'B; const ExteriorLights c_rightTurnSignalOn := '00010000'B; const ExteriorLights c_leftTurnSignalOn := '00100000'B; const ExteriorLights c_hazardConditionsOn := '00110000'B; const ExteriorLights c_lowBeamHeadlightsOn := '10000000'B; const ExteriorLights c_fogLightOn := '00000010'B; const ExteriorLights c_parkingLightsOn := '00000001'B; const ExteriorLights c_highBeamHeadlightsOn := '01000000'B; const ExteriorLights c_daytimeRunningLightsOn := '00000100'B; const TurnDirection c_tdAllIndicatorsOff := '00000000'B; const TurnDirection c_sharpLeft := '00000001'B; const TurnDirection c_uTurn := '10000000'B; const TurnDirection c_slightLeft := '00000100'B; const TurnDirection c_left := '00000010'B; const TurnDirection c_straight := '00001000'B; const TurnDirection c_right := '00100000'B; const TurnDirection c_slightRight := '00010000'B; const TurnDirection c_sharpRight := '01000000'B; } // end group camValues } // end group camValues Loading Loading @@ -115,44 +75,27 @@ module LibItsCam_TypesAndValues { } } /** /** * @desc Events at the application layer of the IUT. * @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 changeHeading Changes the heading. * @member setDriveDirection Sets the drive direction. * @member changeYawRate Changes the yaw rate in offsets of 0.01 degrees per second. * @member changePosition Changes the position in the direction of the current heading in meters. * @member changePosition Changes the position in the direction of the current heading in meters. * @member changeSpeed Changes the speed. * @member checkLdm Checks that the received CAM was provided at LDM. * @member setCrashSignal Sets the crash signal. * @member setDangerousGoodsStatus Sets the dangerous goods status. * @member setLengthWidthPrecision Sets the length width precision. * @member setDistanceToStopLine Set the distance to the stop line. * @member setTurnAdvice Sets the turn advice. * @member changeCurvature Changes the curvature. * @member setOccupancy Sets the occupancy. * @member setDoorStatus Sets the door status. * @member setLightBarStatus Sets the light bar status. * @member setSireneStatus Sets the sirene status. * @member setTrafficLightPriority Sets the traffic light priority. * @member setScheduleDeviation Sets the schedule deviation. * @member setPtLineDescription Sets the PT line description. * @member setExteriorLightsStatus Sets the extirior lights status. */ */ type union UtCamEvent { type union UtCamEvent { Direction changeHeading, CurvatureValue changeCurvature, integer changePosition, SpeedValue changeSpeed, Speed changeSpeed, AccelerationControl setAccelerationControlStatus, CrashStatus setCrashSignal, DangerousGoods setDangerousGoodsStatus, boolean setLengthWidthPrecision, Distance setDistanceToStopLine, TurnAdvice setTurnAdvice, Curvature changeCurvature, Occupancy setOccupancy, DoorOpen setDoorStatus, SimpleSystemState setLightBarStatus, SimpleSystemState setSireneStatus, Priority setTrafficLightPriority, ScheduleDeviation setScheduleDeviation, PTLineDescription setPtLineDescription, ExteriorLights setExteriorLightsStatus, ExteriorLights setExteriorLightsStatus, CamPdu checkLdm HeadingValue changeHeading, DriveDirection setDriveDirection, YawRateValue changeYawRate, integer changePosition, CAM checkLdm } } } // end utPrimitives } // end utPrimitives Loading