Ticket #38 (new enhancement)
Introducing a GenricEnumeration[Signal|Input|Output]
| Reported by: | dietmarw | Owned by: | otter |
|---|---|---|---|
| Priority: | low | Milestone: | Design58 |
| Component: | --Modelica Specification-- | Version: | Spec3.0 |
| Severity: | normal | Keywords: | |
| Cc: | modelica-design@… | Hide ticket: | no |
Description
I copied this issue from the modelica-design mailing list so that it's not lost:
Dietmar Winkler wrote:
my colleague just tried to solve a problem with the help of
enumerations. He has a signal which is very similar to the signal of
type "VehicleInterfaces.Types.GearMode" of the VehicleInterfaces 1.0 RC1
Library. It can have different states (e.g. Park, Drive, Neutral,...).
Currently the VehicleInterfaces library is using the MSL2.2.x workaround
by accessing the signal via the temp model, i.e.
VehicleInterfaces.Types.GearMode.temp. This makes it quite easy to use
the "temp" type as a signal since it's the type of Integer with
connectors like "IntegerInput" and "IntegerOutput" available.
The question now is, since the enumeration workaround was now replaced
by the "real thing" in MSL3.0_dev will there also be an enumeration
*signal* type and the corresponding connectors "EnumerationSignal",
"EnumerationInput" and "EnumerationOutput".
The big benefit for example for automotive applications with lots of bus
control signals would be that the number of bus signals could be reduced
significantly (since lot's of them have only a boolean state depending
on each other, i.e. GearMode).
