Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/osi-sensor-model-packaging_spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ include::./spec/traffic_command_update_outputs.adoc[leveloffset=+2]

include::./spec/traffic_update_outputs.adoc[leveloffset=+2]

include::./spec/streaming_update_inputs.adoc[leveloffset=+2]

== Examples

include::./setup/build_install_example.adoc[leveloffset=+2]

include::./misc/example.adoc[leveloffset=+2]

endif::[]
:!antora-mapping:
:!antora-mapping:
5 changes: 5 additions & 0 deletions doc/spec/model_types.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Traffic participant models consume `osi3::SensorView` as input and produce `osi3
They may also consume `osi3::TrafficCommand` as input to allow control by a scenario engine or other coordinating function.
They may also produce `osi3::TrafficCommandUpdate` as output to allow status responses to such control messages.

Streaming update consumer models::
This model type receives a streaming update input for further processing.
Examples of this model type can be visualization, evaluation, or logging modules.
Streaming update consumer models consume `osi3::StreamingUpdate` as input; if they produce any output, it is currently not specified as part of this standard.

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

Complex models may combine various aspects of the above model types.
Expand Down
27 changes: 27 additions & 0 deletions doc/spec/streaming_update_inputs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ifndef::include-only-once[]
:root-path: ../
include::{root-path}_config.adoc[]
endif::[]
= Streaming update inputs

Streaming update inputs are present in streaming update consumer models.
They provide incremental updates of environmental simulation state in a way that is suitable for low latency applications.

**Prefix**

Streaming update inputs shall be named with the following prefix:

[source,protobuf]
----
OSMPStreamingUpdateIn
----

**Rules**

* If only one streaming update input is configured, the prefix shall only be `OSMPStreamingUpdateIn`.
* If more than one streaming update input is configured, the prefix shall be extended by an array index designator, for example `OSMPStreamingUpdateIn[1]` and `OSMPStreamingUpdateIn[2]`.
* Array indices shall start at 1 and shall be consecutive.
* Each streaming update input shall be defined as a notional discrete binary input variable with `@causality="input"` and `@variability="discrete"`.
* The MIME type of the variable shall specify the `type="StreamingUpdate"` as part of the MIME type parameters.
* Streaming updates shall be encoded as `osi3::StreamingUpdate`.
* The guaranteed lifetime of the traffic command protocol-buffer pointer provided as input to the FMU shall be from the time of the call to `fmi2SetInteger` that provides those values until the end of the following `fmi2DoStep` call.