-
Notifications
You must be signed in to change notification settings - Fork 31
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
Provide number of received bytes in UDPReceive block as output #236
Comments
Additionally, there could be an output |
1. Additional output nRecvBytes. Output is not visible on diagram layer as default, but can be made visible by a parameter in "Advanced" tab. 2. Additional output nRecvbufOverwrites
UDPReceive blocks enhancements. Closes #236
Do you want me to update the SimulationX-specific ITI_MDD.dll already now? |
Yes that would be fine, since I don't have another PR in the pipeline. Could also be good idea to integrate a SimulationX target in the CMakeLists.txt file so that a user of the master branch can easily recompile for SimulationX, if needed. |
We have it already, don't we? |
The commited changes actually break the API for the UDP send functions, both on Modelica and C level. Should we rather add (and utilize) new functions and keep the existing functions (as obsolete), in order to not break custom models relying on the function layer? |
I don't think this will be an issue since existing code should still work. Since there had been no return value, existing code will not check for any return value, hence it should be backwards compatible, shouldn't it? |
It can be an issue for copied code (for example, https://github.com/RWTH-EBC/AixLib/blob/a4b2a05dcf0f6db46341851ef3ea4957cfcb2e8c/AixLib/Controls/HVACAgentBasedControl/BaseClasses/Internal/sendTo.mo) |
To be on the safe side and in compliance with semantic versioning I'd recommend to introduce new/extended functions or to label the new version 2.0.0. |
Hm, in general I don't see the signature of external C functions as part of the public API of a Modelica library, but rather as a part of the internal implementation. However, it's not a big deal to add some functions to maintain backwards compatibility of the C layer in this case, so I will do it. |
Sometimes one would like to know how many new bytes were received. Particularly, one would like to know if a new package has been received at all (hence, received bytes > 0).
The idea is to introduce an additional integer output
nRecvBytes
to the UDPReceive blocks. This output will be0
if no new package was received, otherwise its value will be the number of received bytes.The text was updated successfully, but these errors were encountered: