Skip to content

Adding get_fmu_kind function - #420

Merged
PeterMeisrimelModelon merged 3 commits into
masterfrom
dev-pm-551
Sep 8, 2026
Merged

Adding get_fmu_kind function#420
PeterMeisrimelModelon merged 3 commits into
masterfrom
dev-pm-551

Conversation

@PeterMeisrimelModelon

Copy link
Copy Markdown
Collaborator

No description provided.

@efredriksson-modelon efredriksson-modelon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍉

Comment thread src/pyfmi/fmi.pyx Outdated
Comment thread src/pyfmi/fmi1.pyx Outdated
@PeterMeisrimelModelon
PeterMeisrimelModelon force-pushed the dev-pm-551 branch 2 times, most recently from ed58f39 to 4ed1837 Compare September 8, 2026 08:36
Add the string enum `FMUKind` and `get_fmu_kind()`, so the kind of an FMU
instance can be queried directly instead of via
`isinstance(fmu, (FMUModelCS1, FMUModelCS2, FMUModelCS3))`.
Replace the ME-vs-CS `isinstance(self, ...)` checks in `FMUModelBase2` with
`get_fmu_kind()`, and fold the private FMI3 `_get_fmu_kind()` into the new
public function, so the kind is determined in one place per class.

@efredriksson-modelon efredriksson-modelon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PeterMeisrimelModelon
PeterMeisrimelModelon merged commit 65c4f52 into master Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants