Skip to content

Commit 41f14a3

Browse files
authored
Merge pull request #778 from OpenSimulationInterface/750-define-mandatory-field-with-checker-rules
Define mandatory field with checker rules
2 parents 2466fcb + a6e0aa5 commit 41f14a3

22 files changed

+131
-3
lines changed

doc/architecture/architecture_overview.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ This has been done to allow backward-compatible changes in the field.
5151
Additionally, this is the default behavior in Protocol Buffer version 3 that no longer has the `required` type.
5252
Setting all fields to `optional` thus ensures update compatibility.
5353
However, this does not mean that it is optional to fill the field.
54-
For the purpose of providing a complete interface, all existing fields should be set, unless not setting a field carries a specific meaning, as indicated in the accompanying comment.
54+
Fields with the rule `is_set` are mandatory and have to be set at all times.
55+
All other fields have to be set according to the requirements of the connected models.
5556

5657
NOTE: All field numbers equal to or greater than 10000 are available for user-specific extensions via custom fields.
5758
No future evolution of OSI will therefore use field numbers equal to or greater than 10000.

osi_detectedobject.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ message DetectedItemHeader
1717
// Specific ID of the detected item as assigned by the sensor internally.
1818
// Needs not to match with \c #ground_truth_id.
1919
//
20+
// \rules
21+
// is_set
22+
// \endrules
23+
//
2024
optional Identifier tracking_id = 1;
2125

2226
// The ID of the original detected item in the ground truth.

osi_featuredata.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ message SensorDetectionHeader
9292
// \par Reference:
9393
// [1] DIN Deutsches Institut fuer Normung e. V. (2013). <em>DIN ISO 8855 Strassenfahrzeuge - Fahrzeugdynamik und Fahrverhalten - Begriffe</em>. (DIN ISO 8855:2013-11). Berlin, Germany.
9494
//
95+
// \rules
96+
// is_set
97+
// \endrules
98+
//
9599
optional MountingPosition mounting_position = 3;
96100

97101
// The origin/orientation of the sensor frame represents the current
@@ -124,6 +128,10 @@ message SensorDetectionHeader
124128
// This ID can equal \c SensorData::sensor_id, if \c SensorData holds only
125129
// data from one sensor/sensor model.
126130
//
131+
// \rules
132+
// is_set
133+
// \endrules
134+
//
127135
optional Identifier sensor_id = 7;
128136

129137
// The extended qualifier describes the reason (not the effect) why the

osi_groundtruth.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ message GroundTruth
4747
// The interface version used by the sender (i.e. the simulation
4848
// environment).
4949
//
50+
// \rules
51+
// is_set
52+
// \endrules
53+
//
5054
optional InterfaceVersion version = 1;
5155

5256
// The data timestamp of the simulation environment. The zero time point is
@@ -60,6 +64,10 @@ message GroundTruth
6064
// (there is no inherent latency for ground truth data, as opposed to
6165
// sensor data).
6266
//
67+
// \rules
68+
// is_set
69+
// \endrules
70+
//
6371
optional Timestamp timestamp = 2;
6472

6573
// The ID of the host vehicle object referencing to \c MovingObject .
@@ -68,6 +76,7 @@ message GroundTruth
6876
//
6977
// \rules
7078
// refers_to: MovingObject
79+
// is_set
7180
// \endrules
7281
//
7382
optional Identifier host_vehicle_id = 3;
@@ -118,7 +127,7 @@ message GroundTruth
118127
// [1] ISO International Organization for Standardization. (2013). <em>ISO 3166-1 Codes for the representation of names of countries and their subdivisions - Part 1: Country codes</em>. (ISO 3166-1:2013). Geneva, Switzerland.
119128
//
120129
// \rules
121-
// is_iso_country_code:
130+
// is_iso_country_code
122131
// \endrules
123132
//
124133
optional uint32 country_code = 13;

osi_lane.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ message Lane
4242
//
4343
// \rules
4444
// is_globally_unique
45+
// is_set
4546
// \endrules
4647
//
4748
optional Identifier id = 1;

osi_logicaldetectiondata.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ message LogicalDetectionData
1919
// The interface version used by the sender (i.e. the simulation
2020
// environment).
2121
//
22+
// \rules
23+
// is_set
24+
// \endrules
25+
//
2226
optional InterfaceVersion version = 1;
2327

2428
// Header attributes of fused detections from multiple sensors and sensor types.

osi_logicallane.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ message LogicalLaneBoundary
5656
//
5757
// \rules
5858
// is_globally_unique
59+
// is_set
5960
// \endrules
6061
//
6162
optional Identifier id = 1;

osi_motionrequest.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,19 @@ message MotionRequest
2525
{
2626
// The interface version used by the sender (simulation environment).
2727
//
28+
// \rules
29+
// is_set
30+
// \endrules
31+
//
2832
optional InterfaceVersion version = 1;
2933

3034
// The data timestamp of the simulation environment.
3135
// A reference to \c Timestamp message.
3236
//
37+
// \rules
38+
// is_set
39+
// \endrules
40+
//
3341
optional Timestamp timestamp = 2;
3442

3543
// Define the type that is used to specify the motion request.

osi_object.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ message StationaryObject
2121
//
2222
// \rules
2323
// is_globally_unique
24+
// is_set
2425
// \endrules
2526
//
2627
optional Identifier id = 1;
@@ -388,6 +389,7 @@ message MovingObject
388389
//
389390
// \rules
390391
// is_globally_unique
392+
// is_set
391393
// \endrules
392394
//
393395
optional Identifier id = 1;

osi_referenceline.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ message ReferenceLine
3232
//
3333
// \rules
3434
// is_globally_unique
35+
// is_set
3536
// \endrules
3637
//
3738
optional Identifier id = 1;

0 commit comments

Comments
 (0)