Skip to content

Commit 5ac10b3

Browse files
authored
Merge pull request #806 from OpenSimulationInterface/805-check-comments-for-mandatory-fields
Add rules according to notes in the documentation
2 parents e64338c + de45ac8 commit 5ac10b3

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

osi_common.proto

+5-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ message ExternalReference
245245
// reverse domain name notation with lower-case type field
246246
// is recommended to guarantee unique and interoperable identification.
247247
//
248-
optional string type = 2;
248+
// \rules
249+
// is_set
250+
// \endrules
251+
//
252+
optional string type = 2;
249253

250254
// The external identifier reference value.
251255
//

osi_detectedobject.proto

+12
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ message DetectedMovingObject
325325
// \note This field is mandatory if the \c CandidateMovingObject::type
326326
// is \c MovingObject::TYPE_VEHICLE .
327327
//
328+
// \rules
329+
// check_if this.type is_equal_to 2 else do_check is_set
330+
// \endrules
331+
//
328332
optional MovingObject.VehicleClassification vehicle_classification = 3;
329333

330334
// Pedestrian head pose for behavior prediction. Describes the head
@@ -339,6 +343,10 @@ message DetectedMovingObject
339343
// \note This field is mandatory if the \c CandidateMovingObject.type is
340344
// \c MovingObject::TYPE_PEDESTRIAN
341345
//
346+
// \rules
347+
// check_if this.type is_equal_to 3 else do_check is_set
348+
// \endrules
349+
//
342350
// \par Reference:
343351
//
344352
// [1] Patton, K. T. & Thibodeau, G. A. (2015). <em>Anatomy & Physiology</em>. 9th Edition. Elsevier. Missouri, U.S.A. ISBN 978-0-323-34139-4. p. 1229.
@@ -358,6 +366,10 @@ message DetectedMovingObject
358366
// \note This field is mandatory if the \c CandidateMovingObject::type
359367
// is \c MovingObject::TYPE_PEDESTRIAN
360368
//
369+
// \rules
370+
// check_if this.type is_equal_to 3 else do_check is_set
371+
// \endrules
372+
//
361373
// \par Reference:
362374
// [1] Patton, K. T. & Thibodeau, G. A. (2015). <em>Anatomy & Physiology</em>. 9th Edition. Elsevier. Missouri, U.S.A. ISBN 978-0-323-34139-4. p. 1229.
363375
//

osi_trafficcommand.proto

+4
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ message TrafficAction
142142
// \note This id must be unique within all traffic command
143143
// messages exchanged with one traffic participant.
144144
//
145+
// \rules
146+
// is_set
147+
// \endrules
148+
//
145149
optional Identifier action_id = 1;
146150
}
147151

0 commit comments

Comments
 (0)