Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum connectors #7403

Merged
merged 4 commits into from Apr 27, 2021
Merged

Enum connectors #7403

merged 4 commits into from Apr 27, 2021

Conversation

lochel
Copy link
Member

@lochel lochel commented Apr 23, 2021

@adeas31 The enum connectors do not yet have an icon in the libraries browser. I don't know how to do that.

@lochel lochel requested a review from adeas31 April 23, 2021 11:11
@adeas31
Copy link
Member

adeas31 commented Apr 23, 2021

So you want to handle the enum same as integer, right?

@lochel
Copy link
Member Author

lochel commented Apr 23, 2021

Not really, but sort of. They are compatible but not the same. Do you have a good idea how to handle enums? If we don't know better, then we can treat them similar to integers.

@adeas31
Copy link
Member

adeas31 commented Apr 26, 2021

For now I updated to handle enum same as integers. We will see if this leads to any problem.

@adrpo
Copy link
Member

adrpo commented Apr 26, 2021

If you have EnumType arr[EnumType] you will get an error if you use an integer to index it, you need to index it with EnumType(integerIndex).
If you have EnumType arr[someIntegerSize] and try to index it with the EnumType you will gen an error, you need to index it with Integer(EnumType)

@lochel
Copy link
Member Author

lochel commented Apr 26, 2021

This will just affect SSP connection...

@adrpo
Copy link
Member

adrpo commented Apr 26, 2021

This will just affect SSP connection...

Geez, nevermind then, just ignore my comment :)

@lochel lochel enabled auto-merge (squash) April 27, 2021 11:04
@lochel lochel added the COMP/OMSimulator Issue and pull request related to OMSimulator label Apr 27, 2021
@lochel lochel merged commit 6fe0e58 into OpenModelica:master Apr 27, 2021
@lochel lochel deleted the enum branch April 27, 2021 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/OMSimulator Issue and pull request related to OMSimulator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants