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

Allow multiple devices to be compiled #305

Merged
merged 4 commits into from
Jan 26, 2025

Conversation

cochicde
Copy link
Contributor

The deafult cases falls to RMT_DEV, but the default can be set via cmake using DFORTE_DEVICE_DEFAULT. For now, the RMT_DEV is always compiled. The opcua one is compiled by default whenever the opcua layer is compiled, but can be disabled with FORTE_DISABLE_OPCUA_DEV.

The FakeTimeDev device is compile if the FAKE_TIME is enabled.

should be at least a partial fix to #270

Copy link
Contributor

@azoitl azoitl left a comment

Choose a reason for hiding this comment

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

Can we have an optimisation that if there is only one device configured that we don't need the factory or the factory is optimized to use less code that can be optimized away.

src/arch/utils/mainparam_utils.cpp Outdated Show resolved Hide resolved
@cochicde
Copy link
Contributor Author

Can we have an optimisation that if there is only one device configured that we don't need the factory or the factory is optimized to use less code that can be optimized away.

I tried a solutionn regarding this in the last commit. I added a define variable if we are using one or many devices, and the deviceFactoy.h then has two flavors, one for each case. If a single device is used, the createDevice method has a direct return as it was before. I hope this is optmized by the compiler. If many devices are used, the more complex factory is compile together with the cpp.

The command line parameter is also not implemente if only one device is compiled

@cochicde cochicde requested a review from azoitl January 25, 2025 17:43
src/deviceFactory.h.in Outdated Show resolved Hide resolved
@azoitl
Copy link
Contributor

azoitl commented Jan 26, 2025

I just see we have conflicts now. Could you please locally rebase on top of develop and force push to resolve it.

@cochicde cochicde force-pushed the compile-many-devices branch from 8248e8b to a85ee8a Compare January 26, 2025 13:07
@azoitl azoitl merged commit f273eb5 into eclipse-4diac:develop Jan 26, 2025
6 checks passed
@cochicde cochicde deleted the compile-many-devices branch January 26, 2025 16:33
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