Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 3.3 KB

sensor_view_input_configuration.adoc

File metadata and controls

44 lines (35 loc) · 3.3 KB

../_config.adoc = Sensor view input configuration

For each notional sensor view input variable with the base prefix OSMPSensorViewIn, a corresponding calculated parameter with the base prefix OSMPSensorViewInConfigRequest and a parameter with the base prefix OSMPSensorViewInConfig can exist.

During FMI initialization mode, the simulation environment queries the value of OSMPSensorViewInConfigRequest. Taking this value into account, a suitable and supported sensor view input configuration is determined. Before exiting initialization mode, the simulation environment then sets this configuration using the corresponding OSMPSensorViewInConfig parameter.

Prefix

Sensor view input configurations shall be named with the following prefix:

OSMPSensorViewInConfig

Sensor view input configuration requests shall be named with the following prefix:

OSMPSensorViewInConfigRequest

Rules

  • If more than one sensor view input is to be configured, the prefix shall be extended by an array index, for example, OSMPSensorViewInConfigRequest[1], OSMPSensorViewInConfig[1], OSMPSensorViewInConfigRequest[2], and OSMPSensorViewInConfig[2].

  • Array indices shall start at 1, shall be consecutive, and shall correspond between sensor view inputs and sensor view configuration parameters.

  • If the calculated parameter OSMPSensorViewInConfigRequest exists, then the corresponding parameter OSMPSensorViewInConfig shall exist.

  • OSMPSensorViewInConfigRequest shall have a @causality = "calculatedParameter" and a @variability = "fixed" or @variability = "tunable".

  • OSMPSensorViewInConfig shall have a @causality = "parameter" and a @variability = "fixed" or @variability = "tunable".

  • The @variability values of OSMPSensorViewInConfigRequest and OSMPSensorViewInConfig shall match.

  • The MIME type of both variables shall specify type="SensorViewConfiguration" as part of the MIME type parameters.

  • The variable values shall be encoded as osi3::SensorViewConfiguration.

  • As long as no non-zero value has been assigned to OSMPSensorViewInConfig, the value of the corresponding OSMPSensorViewInConfigRequest shall be the desired sensor view configuration for the corresponding variable OSMPSensorViewIn. This configuration is based on model-internal requirements or any other parameters on which this calculated parameter depends.

  • Once a non-zero value has been assigned to OSMPSensorViewInConfig, the value of the corresponding OSMPSensorViewInConfigRequest shall be an encoded OSI protocol buffer containing the same data as the OSMPSensorViewInConfig.

  • During FMI initialization mode, the simulation environment should query the value of OSMPSensorViewInConfigRequest and determine a suitable sensor view input configuration.

  • Before exiting initialization mode, the simulation environment shall set the sensor view input configuration using the corresponding OSMPSensorViewInConfig parameter.

  • The guaranteed lifetime of the sensor view configuration protocol-buffer pointers shall be from the time of the call to fmi2SetInteger that provides those values until the end of the FMI initialization mode, indicating by the return of the fmi2ExitInitializationMode call.