Commit eabe914e authored by filatov's avatar filatov
Browse files

ITS STF449 branch merged into trunk

parents f4e05738 fc3f08f4
......@@ -7,7 +7,7 @@ DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
ItsPduHeader, CauseCode, StationID, Speed, InformationQuality, ReferencePosition, ClosedLanes, DangerousGoodsExtended, Heading, LaneNumber, LightBarSirenInUse, PathHistory, RoadClass, HeightLonCarr, PosLonCarr, PosPillar, PosCentMass, PositioningSolutionType, RequestResponseIndication, StationType, SpeedLimit, StationarySince, TimestampIts, WheelBaseVehicle, TurningRadius, PosFrontAx, PositionOfOccupants, Temperature, VehicleMass, VehicleIdentification, EnergyStorageType FROM ITS-Container {
ItsPduHeader, CauseCode, StationID, Speed, InformationQuality, ReferencePosition, ClosedLanes, DangerousGoodsExtended, Heading, LaneNumber, LightBarSirenInUse, PathHistory, RoadType, HeightLonCarr, PosLonCarr, PosPillar, PosCentMass, PositioningSolutionType, RequestResponseIndication, StationType, SpeedLimit, StationarySince, TimestampIts, WheelBaseVehicle, TurningRadius, PosFrontAx, PositionOfOccupants, Temperature, VehicleMass, VehicleIdentification, EnergyStorageType FROM ITS-Container {
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (1)
};
......@@ -49,7 +49,7 @@ LocationContainer ::= SEQUENCE {
eventSpeed Speed OPTIONAL,
eventPositionHeading Heading OPTIONAL,
traces Traces,
roadClass RoadClass OPTIONAL
roadType RoadType OPTIONAL
}
ImpactReductionContainer ::= SEQUENCE {
......
......@@ -8,7 +8,7 @@ BEGIN
ItsPduHeader ::= SEQUENCE {
protocolVersion INTEGER{ currentVersion(1) } (0..255),
messageID INTEGER{ denm(1),cam(2), poi(3) } (0..255),
messageID INTEGER{ denm(1),cam(2), poi(3), spat(4), map(5), ivi(6), ivs(7), ev-rsr(8) } (0..255),
stationID StationID
}
......@@ -18,33 +18,50 @@ ReferencePosition ::= SEQUENCE {
latitude Latitude,
longitude Longitude,
positionConfidenceEllipse PosConfidenceEllipse ,
elevation Elevation
altitude Altitude
}
DeltaReferencePosition ::= SEQUENCE {
deltaLatitude DeltaLatitude,
deltaLongitude DeltaLongitude,
deltaElevation DeltaElevation
deltaAltitude DeltaAltitude
}
Longitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10), unavailable(1800000001) } (-1799999999..1800000001) -- multiples of 0.1 microdegree
Latitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10), unavailable(900000001) } (-900000000..900000001) -- multiples of 0.1 microdegree
Elevation ::= SEQUENCE {
elevationValue ElevationValue,
elevationConfidence ElevationConfidence
Altitude ::= SEQUENCE {
altitudeValue AltitudeValue,
altitudeConfidence AltitudeConfidence
}
ElevationValue ::= INTEGER { seaLevel(0), oneMeter(1), unavailable(7191) } (-1000..7191)
ElevationConfidence ::= INTEGER { withinOneMeter(1), outOfRange(126), unavailable(127) } (1..127)
AltitudeValue ::= INTEGER { seaLevel(0), oneCentimeter(1), unavailable(800001) } (-100000..800001)
AltitudeConfidence ::= ENUMERATED {
alt-000-01 (0),
alt-000-02 (1),
alt-000-05 (2),
alt-000-10 (3),
alt-000-20 (4),
alt-000-50 (5),
alt-001-00 (6),
alt-002-00 (7),
alt-005-00 (8),
alt-010-00 (9),
alt-020-00 (10),
alt-050-00 (11),
alt-100-00 (12),
alt-200-00 (13),
outOfRange (14),
unavailable (15)
}
DeltaLongitude ::= INTEGER { oneMicrodegreeEast (10), oneMicrodegreeWest (-10) } (-131072..131071) -- multiples of 0.1 microdegree
DeltaLatitude ::= INTEGER { oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10) } (-131072..131071) -- multiples of 0.1 microdegree
DeltaElevation ::= INTEGER { oneMeterUp (1), oneMeterDown (-1), unavailable(128) } (-127..128)
DeltaAltitude ::= INTEGER { oneCentimeterUp (1), oneCentimeterDown (-1), unavailable(12800) } (-12700..12800)
PosConfidenceEllipse ::= SEQUENCE {
......@@ -70,13 +87,13 @@ PtActivationType ::= INTEGER { undefinedCodingType(0), r09-16CodingType(1), vdv-
PtActivationData ::= OCTET STRING (SIZE(1..20))
AccelerationControl ::= BIT STRING {
brakePedalActive (0),
gasPedalActive (1),
emergencyBrakeActive (2),
collisionWarningActive (3),
accActive (4),
cruiseControl (5),
speedLimiterActive (6)
brakePedalEngaged (0),
gasPedalEngaged (1),
emergencyBrakeEngaged (2),
collisionWarningEngaged (3),
accEngaged (4),
cruiseControlEngaged (5),
speedLimiterEngaged (6)
} (SIZE(7))
......@@ -159,7 +176,7 @@ SemiAxisLength ::= INTEGER{ oneCentimeter(1), outOfRange(4094), unavailable(4095
DangerousEndOfQueueSubCauseCode ::= INTEGER {unavailable(0), suddenEndOfQueue(1), queueOverHill(2), queueAroundBend(3), queueInTunnel(4) } (0..255)
DangerousSituationSubCauseCode ::= INTEGER {unavailable(0), emergencyElectronicBrake(1), preCrashSystemActivated(2), espActivated(3), absActivated(4), aebActivated(5), brakeWarningActivated(6), collisionRiskWarningActivated(7) } (0..255)
DangerousSituationSubCauseCode ::= INTEGER {unavailable(0), emergencyElectronicBrakeEngaged(1), preCrashSystemEngaged(2), espEngaged(3), absEngaged(4), aebEngaged(5), brakeWarningEngaged(6), collisionRiskWarningEngaged(7) } (0..255)
VehicleBreakdownSubCauseCode ::= INTEGER {unavailable(0), lackOfFuel (1), lackOfBatteryPower (2), engineProblem(3), transmissionProblem(4), engineCoolingProblem(5), brakingSystemProblem(6), steeringProblem(7), tyrePuncture(8)} (0..255)
......@@ -316,7 +333,7 @@ PosCentMass ::= INTEGER { tenCentimeters(1), unavailable(63) } (0..63)
RequestResponseIndication ::= ENUMERATED { request(0), response(1) }
SpeedLimit ::= INTEGER { oneKmPerHour(1) } (0..150)
SpeedLimit ::= INTEGER { oneKmPerHour(1) } (0..255)
StationarySince ::= ENUMERATED { lessThan1Minute(0), lessThan2Minutes(1), lessThan15Minutes(2), over15Minutes(3) }
......@@ -371,8 +388,6 @@ VehicleLength ::= SEQUENCE {
vehicleLengthValue VehicleLengthValue,
vehicleLengthConfidenceIndication VehicleLengthConfidenceIndication
}
WMInumber ::= IA5String (SIZE(1..3))
VehicleLengthValue ::= INTEGER { tenCentimeters(1), outOfRange(1022), unavailable(1023) } (1..1023)
......@@ -383,11 +398,11 @@ VehicleWidth ::= INTEGER { tenCentimeters(1), outOfRange(61), unavailable(62) }
PathHistory::= SEQUENCE (SIZE(0..23)) OF PathPoint
EmergencyPriority ::= INTEGER { requestForRightOfWay(0), requestForFreeCrossingAtATrafficLight(1) } (0..1)
EmergencyPriority ::= BIT STRING { requestForRightOfWay(0), requestForFreeCrossingAtATrafficLight(1) } (SIZE(2))
InformationQuality ::= INTEGER { unavailable(0), lowest(1), highest(7) } (0..7)
RoadClass ::= ENUMERATED {
RoadType ::= ENUMERATED {
urban-NoStructuralSeparationToOppositeLanes(0),
urban-WithStructuralSeparationToOppositeLanes(1),
nonUrban-NoStructuralSeparationToOppositeLanes(2),
......@@ -415,16 +430,17 @@ YawRateValue ::= INTEGER { straight(0), degSec-000-01ToRight(-1), degSec-000-01T
-- LSB units of 0.01 degrees per second
YawRateConfidence ::= ENUMERATED {
unavailable (0),
degSec-100-00 (1), -- within 100 deg/sec
degSec-010-00 (2), -- within 10 deg/sec
degSec-005-00 (3), -- within 5 deg/sec
degSec-001-00 (4), -- within 1 deg/sec
degSec-000-10 (5), -- within 0.1 deg/sec
degSec-000-05 (6), -- within 0.05 deg/sec
degSec-000-01 (7), -- within 0.01 deg/sec
outOfRange (8)
degSec-000-01 (0),
degSec-000-05 (1),
degSec-000-10 (2),
degSec-001-00 (3),
degSec-005-00 (4),
degSec-010-00 (5),
degSec-100-00 (6),
outOfRange (7),
unavailable (8)
}
END
......@@ -12,10 +12,10 @@ module LibItsBtp_TypesAndValues {
// LibIts
import from CAM_PDU_Descriptions language "ASN.1:1997" {
type CamPdu
type CAM
};
import from DENM_PDU_Descriptions language "ASN.1:1997" {
type DenmPdu
type DENM
};
group btpPdus {
......@@ -84,6 +84,8 @@ module LibItsBtp_TypesAndValues {
group btpPayload {
type octetstring BtpRawPayload;
/**
* @desc The payload of the BTP packet
* @member decodedPayload The decoded payload
......@@ -91,7 +93,7 @@ module LibItsBtp_TypesAndValues {
*/
type record BtpPayload {
DecodedBtpPayload decodedPayload optional,
octetstring rawPayload
BtpRawPayload rawPayload
}
/**
......@@ -101,8 +103,8 @@ module LibItsBtp_TypesAndValues {
* @member
*/
type union DecodedBtpPayload {
CamPdu camPacket,
DenmPdu denmPacket
CAM camPacket,
DENM denmPacket
} with {
encode (camPacket) "LibItsCam_asn1";
encode (denmPacket) "LibItsDenm_asn1"
......@@ -148,7 +150,7 @@ module LibItsBtp_TypesAndValues {
type boolean UtResult;
}
with {
encode "LibItsCommon_TypesAndValues"
encode "LibItsCommon"
}
/**
......@@ -170,5 +172,5 @@ module LibItsBtp_TypesAndValues {
}
with {
encode "LibItsBtp_TypesAndValues"
encode "LibItsBtp"
}
/**
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc Module containing common functions for ITS CAM
* @author ETSI / STF405 / STF449
* @version $URL$
* $Id$
* @desc Module containing common functions for ITS CAM
*
*/
module LibItsCam_Functions {
......@@ -14,9 +14,10 @@ module LibItsCam_Functions {
// LibIts
import from LibItsCam_TestSystem all;
import from LibItsCam_Templates all;
import from LibItsCam_Pixits all;
import from LibItsCam_TypesAndValues all;
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
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;
......@@ -31,7 +32,7 @@ module LibItsCam_Functions {
utPort.send(p_init);
tc_wait.start;
alt {
[] utPort.receive(UtResult:true) {
[] utPort.receive(UtInitializeResult:true) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
......@@ -55,12 +56,12 @@ module LibItsCam_Functions {
* @desc Triggers event from the application layer
* @param p_event The event to trigger.
*/
function f_utTriggerEvent(template (value) UtEvent p_event) runs on ItsCam {
var template (value) UtTrigger v_utMsg := { p_event };
utPort.send(v_utMsg);
function f_utTriggerEvent(template (value) UtCamTrigger p_event) runs on ItsCam {
utPort.send(p_event);
tc_wait.start;
alt {
[] utPort.receive(UtResult:true) {
[] utPort.receive(UtCamTriggerResult:true) {
tc_wait.stop;
}
[] utPort.receive {
......@@ -79,13 +80,13 @@ module LibItsCam_Functions {
* @param p_event The event to check.
* @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) UtCamTrigger p_event, boolean p_discard := false) runs on ItsCam {
var template (value) UtCheck v_utMsg := { p_event };
utPort.send(v_utMsg);
tc_wait.start;
alt {
[] utPort.receive(UtResult:true) {
[] utPort.receive(UtCamTriggerResult:true) {
tc_wait.stop;
if (p_discard == false) {
log("*** f_utCheckEvent: INFO: Event correctly indicated at application layer ***");
......@@ -95,7 +96,7 @@ module LibItsCam_Functions {
f_selfOrClientSyncAndVerdict("error", e_error);
}
}
[] utPort.receive(UtResult:false) {
[] utPort.receive(UtCamTriggerResult:false) {
tc_wait.stop;
if (p_discard == false) {
log("*** f_utCheckEvent: ERROR: Event not correctly indicated at application layer ***");
......@@ -107,7 +108,7 @@ module LibItsCam_Functions {
}
[] tc_wait.timeout {
log("*** f_utCheckEvent: ERROR: Timeout while waiting for event check result ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
repeat;
......@@ -149,7 +150,7 @@ module LibItsCam_Functions {
* @desc basic default behaviour handling
*/
altstep a_default() runs on ItsCam {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
log("*** a_default: INFO: CAM message received in default ***");
vc_camReceived := true;
......@@ -185,9 +186,22 @@ module LibItsCam_Functions {
f_utInitializeIut(m_camInitialize);
// basic default altstep
activate(a_default());
// basic default altstep
activate(a_default());
camPort.clear;
tc_ac.start;
alt {
[] camPort.receive(mw_camInd ( mw_camMsg_any )){
tc_ac.stop;
log("*** " & testcasename() & ": INFO: Received initial CAM ***");
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Initial CAM not received ***");
f_selfOrClientSyncAndVerdictPreamble("error", e_timeout);
}
}
} // end f_prInitialState
} // end of preambles
......@@ -202,100 +216,33 @@ module LibItsCam_Functions {
}
} // end group postambles
group otherFunctions {
/** @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 {
group camPositionFunctions {
/**
* @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()
return template (value) CamPdu {
var CoopAwareness.stationCharacteristics v_stationCharacteristics;
if(PX_TESTER_IS_MOBILE == false) {
// basic IRS
v_stationCharacteristics := {false, PX_TESTER_IS_PRIVATE, PX_TESTER_IS_PHYSICAL_RELEVANT};
return m_camMsg_irs(
f_getCurrentTime(),
f_getTsStationId(),
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
);
}
} // end f_getTesterValidCam
function f_computePositionUsingDistance(in ReferencePosition p_referencePosition, in integer p_offSet) return ReferencePosition {
var ReferencePosition v_referencePosition := p_referencePosition;
log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***");
fx_computePositionUsingDistance(
p_referencePosition.latitude,
p_referencePosition.longitude,
p_offSet,
p_referencePosition.positionConfidenceEllipse.semiMajorOrientation.headingValue,
v_referencePosition.latitude,
v_referencePosition.longitude
);
return v_referencePosition;
}
} // end getTesterFunctions
} // end group camPositionFunctions
} // end LibItsCam_Functions
\ No newline at end of file
/**
* @author ETSI / STF405
* @version $URL$
* $Id$
* @desc CAM PICS
* @author ETSI / STF405 / STF449
* @version $URL$
* $Id$
* @desc CAM PICS
*
*/
module LibItsCam_Pics {
......@@ -13,110 +13,82 @@ module LibItsCam_Pics {
group camPics {
/**
* @desc Is IUT a basic vehicle
* @see ETSI TS 102 868-1 v1.1.1 A.2/1
* @desc Is IUT a public transport vehicle
* @see ETSI TS 102 868-1 v0.0.1 A.2/1
*/
modulepar boolean PICS_BASICVEH := false;
modulepar boolean PICS_PUBLICTRANS := false;
/**
* @desc Is IUT a basic IRS
* @see ETSI TS 102 868-1 v1.1.1 A.3/1
* @desc Is IUT a special transport vehicle
* @see ETSI TS 102 868-1 v0.0.1 A12/2
*/
modulepar boolean PICS_BASICIRS := false;
modulepar boolean PICS_SPECIALTRANS := false;
/**
* @desc Does IUT support 'CurvatureGradient' indicatio
* @see ETSI TS 102 868-1 v1.1.1 A.16/32
* @desc Is IUT a dangerous goods vehicle
* @see ETSI TS 102 868-1 v0.0.1 A.2/3
*/
modulepar boolean PICS_CURVCHANGE := false;
modulepar boolean PICS_DANGEROUSGOODS := false;
/**
* @desc Does IUT support 'DoorOpen' indication
* @see ETSI TS 102 868-1 v1.1.1 A.16/28
* @desc Is IUT a road works vehicle
* @see ETSI TS 102 868-1 v0.0.1 A.2/4
*/
modulepar boolean PICS_DOOROPEN := false;
modulepar boolean PICS_ROADWORKS := false;
/**
* @desc Does IUT support 'distanceToStopLine' indication
* @see ETSI TS 102 868-1 v1.1.1 A.16/23
* @desc Is IUT a rescue vehicle
* @see ETSI TS 102 868-1 v0.0.1 A.2/5
*/
modulepar boolean PICS_DISTTOSTOPLINE := false;
modulepar boolean PICS_RESCUE := false;
/**
* @desc Is IUT an emergency vehicle
* @see ETSI TS 102 868-1 v1.1.1 A.2/2
*/
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
* @see ETSI TS 102 868-1 v0.0.1 A.2/6
*/
modulepar boolean PICS_PTLINEDESCRIPTION := false;
modulepar boolean PICS_EMERGENCY := false;
/**
* @desc Is IUT a public transport vehicle
* @see ETSI TS 102 868-1 v1.1.1 A.2/3
* @desc Is IUT a safety car vehicle
* @see ETSI TS 102 868-1 v0.0.1 A.2/7
*/
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_SAFETY_CAR := false;
/**
* @desc Does IUT support 'SireneInUse' indication
* @see ETSI TS 102 868-1 v1.1.1 A.16/4
* @desc Does IUT support 'lowFrequencyContainer' in CamParameters?
* @see ETSI TS 102 868-1 v0.0.1 A.8/3
*/
modulepar boolean PICS_SIRENEINUSE := false;
/**
* @desc Does IUT support 'TrafficLightPriority' indication
* @see ETSI TS 102 868-1 v1.1.1 A.16/28
*/
modulepar boolean PICS_TRAFFICLIGHTPRIORITY := false;
modulepar boolean PICS_LOWFREQUENCYCONTAINER := true;
/**
* @desc Does IUT support 'turnAdvice' indication
* @see ETSI TS 102 868-1 v1.1.1 A.16/22
* @desc Does IUT support 'specialVehicleContainer' in CamParameters?
* @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)
* Default value, as per base standard: 0,1s
* @see ETSI TS 102 868-1 v1.1.1 A.66/1
* @desc Maximum time interval between CAM generations (in seconds).
* Default value, as per base standard: 1.0s
* @see ETSI TS 102 868-1 v0.0.1 A.22/1
*/
modulepar float PICS_CAM_MIN_TRANSMISSION_INTERVAL := 0.1;
modulepar float PICS_T_GENCAMMAX := 1.000;
/**
* @desc Maximum time interval between CAM generations (in seconds)
* Default value, as per base standard: 1s
* @see ETSI TS 102 868-1 v1.1.1 A.66/2
* @desc Minimum time interval between CAM generations (in seconds).
* Default value, as per base standard: 0.1s
* @see ETSI TS 102 868-1 v0.0.1 A.22/2
*/
modulepar float PICS_CAM_MAX_TRANSMISSION_INTERVAL := 1.0;