Describe the problem
It's a bit hard to trigger, but were able to reproduce this with a custom OSMP sensor based on the OSMPDummySensor example:
- FMI/OSMP setup including
SensorViewConfigurationRequest
- FMI variables are read one-by-one by the simulation environment, so
GetInteger is called multiple times.
- Code here triggers regeneration of
SensorViewConfigurationRequest request for each read
- Due to the buffer swapping in 3. (via {refresh,set}_fmi_sensor_view_config_request), the values for SensorViewConfigurationRequest FMI variables (hi, lo and size) might be out of sync. We had the situation that the hi part was different for both buffers, leading to an invalid buffer address being communicated over FMI
Ask your question
- Is there a restriction on how OSMP FMI variables have to be read (i.e. do the have to be read by a single call to
GetInteger or is it ok to read each one individually)?
- Should the
need_refresh mechanism be restructured?
- Is double-buffering even necessary for the
SensorViewConfigurationRequest? According to according to OSMP doc communication of this message is restricted to the initialization mode anyway.
Describe the problem
It's a bit hard to trigger, but were able to reproduce this with a custom OSMP sensor based on the
OSMPDummySensorexample:SensorViewConfigurationRequestGetIntegeris called multiple times.SensorViewConfigurationRequestrequest for each readAsk your question
GetIntegeror is it ok to read each one individually)?need_refreshmechanism be restructured?SensorViewConfigurationRequest? According to according to OSMP doc communication of this message is restricted to the initialization mode anyway.