module test_LibItsCam_TypesAndValues /*language "TTCN-3:2009 Advanced Parameterization"*/ { import from test_CommonCodec all; import from CAM_PDU_Descriptions language "ASN.1:1997" all with { encode "LibItsCam_asn1" } import from DENM_PDU_Descriptions language "ASN.1:1997" all with { encode "LibItsDenm_asn1" } import from LibItsCam_TestSystem all; import from LibItsCam_Templates all; import from LibItsCam_TypesAndValues all; import from LibItsCam_Functions all; import from LibItsCommon_Functions all; group testUtEvent { testcase tc_UtCamInitialize() runs on TCType system TCType { test_PDU(m_camInitialize, false); } testcase tc_changeHeading() runs on TCType system TCType { test_PDU(m_changeHeading(5), false); } testcase tc_changePosition() runs on TCType system TCType { test_PDU(m_changePosition(6), false); } testcase tc_changeSpeed() runs on TCType system TCType { test_PDU(m_changeSpeed(2), false); } testcase tc_setCrashSignal() runs on TCType system TCType { test_PDU(m_setCrashSignal(c_activated), false); } testcase tc_setDangerousGoodsStatus() runs on TCType system TCType { test_PDU(m_setDangerousGoodsStatus(8191), false); } testcase tc_setLengthWidthPrecision() runs on TCType system TCType { test_PDU(m_setLengthWidthPrecision(c_precisely), false); } testcase tc_setDistanceToStopLine() runs on TCType system TCType { test_PDU(m_setDistanceToStopLine(65535), false); } testcase tc_setTurnAdvice() runs on TCType system TCType { test_PDU(m_setTurnAdvice({ f_bitPositionRandom(7), 65535 }), false); } testcase tc_changeCurvature() runs on TCType system TCType { test_PDU(m_changeCurvature(-1023), false); } testcase tc_setOccupancy() runs on TCType system TCType { test_PDU(m_setOccupancy(255), false); } testcase tc_setDoorStatus() runs on TCType system TCType { test_PDU(m_setDoorStatus(c_driverDoor), false); } testcase tc_setLightBarStatus() runs on TCType system TCType { test_PDU(m_setLightBarStatus(unavailable), false); } testcase tc_setSireneStatus() runs on TCType system TCType { test_PDU(m_setSireneStatus(engaged), false); } testcase tc_setTrafficLightPriority() runs on TCType system TCType { test_PDU(m_setTrafficLightPriority(7), false); } testcase tc_setScheduleDeviation() runs on TCType system TCType { test_PDU(m_setScheduleDeviation(-900), false); } testcase tc_setPtLineDescription() runs on TCType system TCType { test_PDU(m_setPtLineDescription(PTLineDescription:{"CourseOfJourney", "LineRef", "RouteRef"}), false); } testcase tc_setExteriorLightsStatus() runs on TCType system TCType { test_PDU(m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), false); } testcase tc_checkLdmBasic() runs on TCType system TCType { test_PDU(m_checkLdm(m_camMsg_irs ( 28147497, 42949, { true, true, true }, { longitude := {hemisphere := east, degree := 0}, latitude := {hemisphere := north, degree := 0}, elevation := 0, heading := omit, streetName := omit, positionConfidence := omit, elevationConfidence := omit, roadSegmentID :=0 } )), false); } testcase tc_checkLdmFull_BasicVehicle() runs on TCType system TCType { test_PDU(m_checkLdm(m_camMsg_valid_With_Parameters( 28147495, 42946, { true, true, true }, { longitude := {hemisphere := east, degree := 0}, latitude := {hemisphere := north, degree := 0}, elevation := 1530, heading := 95, streetName := "Street name", positionConfidence := 15, elevationConfidence := 14, roadSegmentID :=0 }, // End of ReferencePosition { vehicleType := 3, stationLength := 1456, stationLengthConfidence := 9, stationWidth := 125, stationWidthConfidence := 11, vehicleSpeed := 55, vehicleSpeedConfidence := 13, longAcceleration := -500, longAccelerationConfidence := 12, accelerationControl := '001000'B, yawRate := { yawDirection := right, yawRateValue := 16584 }, yawRateConfidence := 11, exteriorLights := '00100000'B, turnAdvice := { direction := '00000100'B, distance := 4556 }, distanceToStopLine := 150, occupancy := 57, doorOpen := '0001'B, posConfidenceEllipse := { semiMajorConfidence := 7, semiMinorConfidence := 9, semiMajorOrientation := 11 }, curvature := -156, curvatureChange := 53, curvatureConfidence := 10, crashStatus := false, headingConfidence := 9, dangerousGoods := 799 }, // End of VehicleCommonParameters m_profileParameters_BasicVehicle )), false); } testcase tc_checkLdmFull_PublicVehicle() runs on TCType system TCType { test_PDU(m_checkLdm(m_camMsg_valid_With_Parameters( 1307531915453, 111111, { true, true, true }, { longitude := { hemisphere := east, degree := 0 }, latitude := { hemisphere := north, degree := 0 }, elevation := 0, heading := 0, streetName := omit, positionConfidence := omit, elevationConfidence := omit, roadSegmentID := omit }, // End of ReferencePosition { vehicleType := 0, stationLength := 0, stationLengthConfidence := 0, stationWidth := 0, stationWidthConfidence := 0, vehicleSpeed := 0, vehicleSpeedConfidence := 0, longAcceleration := 0, longAccelerationConfidence := 0, accelerationControl := '000000'B, yawRate := { yawDirection := right, yawRateValue := 0 }, yawRateConfidence := 0, exteriorLights := '00000000'B, turnAdvice := omit, distanceToStopLine := omit, occupancy := omit, doorOpen := omit, posConfidenceEllipse := { semiMajorConfidence := 0, semiMinorConfidence := 0, semiMajorOrientation := 0 }, curvature := 0, curvatureChange := omit, curvatureConfidence := 0, crashStatus := omit, headingConfidence := 0, dangerousGoods := omit }, // End of VehicleCommonParameters m_profileParameters_BasicVehicle )), false); } testcase tc_checkLdmFull_Paris() runs on TCType system TCType { test_PDU(m_checkLdm(m_camMsg_irs ( 5434534, 5424, { true, false, true }, { longitude := {hemisphere := east, degree := 200000000}, latitude := {hemisphere := north, degree := 480000000}, elevation := 910, heading := 7200, streetName := "Montmartre", positionConfidence := 5, elevationConfidence := 7, roadSegmentID := 1234567 } )), false); } testcase tc_checkLdmFull_LaPaz() runs on TCType system TCType { test_PDU(m_checkLdm(m_camMsg_irs ( 6546424, 35445334, { false, false, false }, { longitude := {hemisphere := west, degree := 220000000}, latitude := {hemisphere := south, degree := 270000000}, elevation := 36600, heading := 21600, streetName := "El Alto", positionConfidence := omit, elevationConfidence := omit, roadSegmentID := 3546345 } )), false); } template (value) CamPdu m_camMsg_valid_With_Parameters( TimeStamp p_generationTime, StationID p_stationId, CoopAwareness.stationCharacteristics p_stationCharacteristics, template (value) ReferencePosition p_referencePosition, template (value) VehicleCommonParameters p_vehicleCommonParameters, template (value) ProfileParameters p_profileDependent ) := { header := { protocolVersion := 0, messageID := 0, generationTime := p_generationTime }, cam := { stationID := p_stationId, stationCharacteristics := p_stationCharacteristics, referencePosition := p_referencePosition, camParameters := { vehicleCommonParameters := p_vehicleCommonParameters, profileDependent := p_profileDependent } } } template (value) ProfileParameters m_profileParameters_BasicVehicle := { basicVehicle := { } // emergencyVehicle := { // lightBarInUse := 2, // sireneInUse := 3, // emergencyResponseType := 1 // } // publicTransportVehicle := { // publicVehicleType := 3, // pTLineDescription := { // courseOfJourney := "Course Of Journey", // lineRef := 10, // routeRef := "Route Ref" // }, // ScheduleDeviation scheduleDeviation optional, // TrafficLightPriority trafficLightPriority optional // } // End of PublicTransportVehicle } // End of template m_profileParameters_BasicVehicle template (value) ProfileParameters m_profileParameters_EmergencyVehicle := { emergencyVehicle := { lightBarInUse := enabled, sireneInUse := engaged, emergencyResponseType := rightOfWay } } // End of template m_profileParameters_EmergencyVehicle template (value) ProfileParameters m_profileParameters_PublicTransportVehicle := { publicTransportVehicle := { publicVehicleType := 3, pTLineDescription := { courseOfJourney := "Course Of Journey", lineRef := "Line Ref", routeRef := "Route Ref" }, scheduleDeviation := -200, trafficLightPriority := 7 } } // End of template m_profileParameters_PublicTransportVehicle } // End of group testUtEvent group testCamPrimitiveMessages { testcase tc_CamReq() runs on TCType system TCType { test_PDU( m_camReq( m_camMsg_irs( fx_getCurrentTime(), f_getTsStationId(), f_getTesterStationCharacteristics(), m_tsPosition ) ), false); } } // End of group testCamPrimitiveMessages }