sogno-platform / dpsim

Real-time power system simulator including powerflow, (dynamic) phasors and EMT
https://sogno.energy/dpsim/
Mozilla Public License 2.0
67 stars 49 forks source link

fix clang compilation and FPGA integration #293

Closed n-eiling closed 1 month ago

n-eiling commented 1 month ago

This used to work before but the CI test was not migrated to github and therefore we lost the compatibility. We need clang compilation to make the clangd language server work.

n-eiling commented 1 month ago

I noticed a lot of errors in the models due to proper override semantics not being enforced. For example most clone implementations were not overriding but only hiding. Same for some log implementations. I fixed all of what clang catches and also added a CI target to build using clang. This makes clangd/intellisense work.

This also fixes a few minor issues with the VILLAS interface and adds a draft for an FPGA interface.

Let's merge this quickly, to avoid having to touch even more files. @stv0g @m-mirz

btw: We also lost the cppcheck CI. This was also catching a lot of the mistakes I had to fix here. we should make the cppcheck CI more strict.

fixes #256 , #227

stv0g commented 1 month ago

LGTM. I also fixed the uninitialized mOpened member in another PR. But let's go ahead and merge this here.

@m-mirz I am in support of merging this. Can you pull the trigger?

n-eiling commented 1 month ago

Pybind is not working with clang because of some template error that are beyond me. I just deactivated pybind in the CI until somehow who has a better understanding of the attribute templates gets around to fixing it.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
12 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
49.9% Duplication on New Code

See analysis details on SonarCloud

leonardocarreras commented 1 month ago

I suggest we can continue in #294, if everyone agrees