Standardized the sensor model "interface" across all sensors.
These are the main points worth mentioning:
All sensors now have a sensors.*.sensor.valid field which is a boolean flag set to true if the sensor value is valid and false otherwise.
All sensor output are set to NaNs when the sensor itself is invalid. This is because Matplotlib ignores NaNs so the graphs are very clean when we actually output NaNs.
All sensors also have an explicit sensors.*.sensor.disabled field that can be written to to simulation a sensor failure.
Any type of modelling switch is now exposed as a state field so the sensor model behavior can be changed in the middle of a simulation.
Ptest Effects
@shihaocao when we bump the psim pointer this may require minimal updates. That being said, the main intention behind this change was to make ptest integration more straightforward.
Testing
If CI runs fine I'm fairly satisfied with that given we are booting full simulations.
Will be rebased once #335 is merged.
Summary of changes
Standardized the sensor model "interface" across all sensors.
These are the main points worth mentioning:
sensors.*.sensor.valid
field which is a boolean flag set to true if the sensor value is valid and false otherwise.sensors.*.sensor.disabled
field that can be written to to simulation a sensor failure.Ptest Effects
@shihaocao when we bump the psim pointer this may require minimal updates. That being said, the main intention behind this change was to make
ptest
integration more straightforward.Testing
If CI runs fine I'm fairly satisfied with that given we are booting full simulations.