Skip to content

Commit b420b9e

Browse files
authored
Merge pull request #84 from OpenSimulationInterface/feature/tp/trafficcommandupdate
Added TrafficCommandUpdate to OSMP spec
2 parents cf2e73d + 70ed501 commit b420b9e

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

doc/osi-sensor-model-packaging_spec.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ include::./spec/ground_truth_init_parameters.adoc[leveloffset=+2]
4141

4242
include::./spec/traffic_command_inputs.adoc[leveloffset=+2]
4343

44+
include::./spec/traffic_command_update_outputs.adoc[leveloffset=+2]
45+
4446
include::./spec/traffic_update_outputs.adoc[leveloffset=+2]
4547

4648
== Examples

doc/spec/model_types.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Traffic participant models may internally use environmental effect models, senso
2020
They may also be used to implement surrounding traffic in simplified ways.
2121
Traffic participant models consume `osi3::SensorView` as input and produce `osi3::TrafficUpdate` as output.
2222
They may also consume `osi3::TrafficCommand` as input to allow control by a scenario engine or other coordinating function.
23+
They may also produce `osi3::TrafficCommandUpdate` as output to allow status responses to such control messages.
2324

2425
All models may also consume a global `osi3::GroundTruth` parameter during initialization.
2526

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
= Traffic command update outputs
2+
3+
Traffic command update outputs are present in traffic participant models.
4+
5+
**Prefix**
6+
7+
Traffic command update outputs shall be named with the following prefix:
8+
9+
[source,protobuf]
10+
----
11+
OSMPTrafficCommandUpdateOut
12+
----
13+
14+
**Rules**
15+
16+
* If only one traffic command update output is configured, the prefix shall only be `OSMPTrafficCommandUpdateOut`.
17+
* If more than one traffic command update output is configured, the prefix shall be extended by an array index, for example `OSMPTrafficCommandUpdateOut[1]` and `OSMPTrafficCommandUpdateOut[2]`.
18+
* Array indices shall start at 1 and shall be consecutive.
19+
* Each traffic command update output shall be defined as a notional discrete binary output variable with a `@causality="output"` and a `@variability="discrete"`.
20+
* The MIME type of the variable shall specify the `type=TrafficCommandUpdate` as part of the MIME type parameters.
21+
* Traffic command updates shall be encoded as `osi3::TrafficCommandUpdate`.
22+
* The guaranteed lifetime of the traffic command update protocol-buffer pointer provided as output by the FMU shall be from the end of the call to `fmi2DoStep` that calculated this buffer until the beginning of the second `fmi2DoStep` call after that.

0 commit comments

Comments
 (0)