You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The classes VehicleInterfaces.Types.GearMode and VehicleInterfaces.Types.IgnitionSetting use Integer constants and a choices annotation in order to behave like an enumeration. This is due to enumerations not being fully supported at the time of original development.
Enumerations are now generally supported in tools so these should be updated (at a major release).
The text was updated successfully, but these errors were encountered:
Actually, work on this issue shall be coupled with #28 as well.
The GearMode and IgnitionSetting are both used in DriverEnvironments.Internal.StandardBus which shall be reintroduced again. This StandardBus is marked obsolete in current v1.2.4 but this must be reverted in the next major version.
In contrast, busses in e.g. DriverEnvironments.Interfaces shall be marked obsolete and no more used.
Here are listed classes where concerned "fake" enumerations are used:
VehicleInterfaces.Types.GearMode
DriverEnvironments.DriveByWireAutomatic as selectedGearboxMode
DriverEnvironments.Interfaces.BusForAutomaticTransmission as gearboxMode
DriverEnvironments.Internal.StandardBus as gearboxMode
Drivers.Interfaces.BusForAutomaticTransmission as gearboxMode
Drivers.MinimalDriver as selectedGearboxMode
VehicleInterfaces.Types.IgnitionSetting
DriverEnvironments.Interfaces.MinimalBus as ignition
DriverEnvironments.Internal.StandardBus as ignition
Well I have analysed this and it doesn't seem to be feasible at the moment. The problem is that the "enumerations" are mainly used in control busses. And to work with the busses in Diagrams would require particular graphical blocks for enumerations, which are not available. See also comment modelica/ModelicaStandardLibrary#91 (comment).
It would be possible to use the enumeration for the parameter selectedGearboxMode in driver models. But I see no benefit of doing so because then there have to be some transformation of enumeration parameter to integer on control bus. So rather tricky and confusing solution.
The classes
VehicleInterfaces.Types.GearMode
andVehicleInterfaces.Types.IgnitionSetting
use Integer constants and a choices annotation in order to behave like an enumeration. This is due to enumerations not being fully supported at the time of original development.Enumerations are now generally supported in tools so these should be updated (at a major release).
The text was updated successfully, but these errors were encountered: