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

Support blocking UDP receive call #275

Closed
bernhard-thiele opened this issue Feb 1, 2019 · 4 comments
Closed

Support blocking UDP receive call #275

bernhard-thiele opened this issue Feb 1, 2019 · 4 comments
Assignees
Milestone

Comments

@bernhard-thiele
Copy link
Collaborator

Rationale: Support of a blocking UDP receive call allows synchronizing a simulation to an external application sending the UDP datagrams.

The proposal is to add an option useRecvThread to the UDPReceive block. So far a separate thread is created for receiving datagrams (corresponds to the proposed default value useRecvThread=true). By setting the option to false a user can prevent that a separate thread is created and simulation progress is blocked when calling out to UDP recvfrom(..).

grafik

@bernhard-thiele bernhard-thiele added this to the v1.7.0 milestone Feb 1, 2019
@bernhard-thiele bernhard-thiele self-assigned this Feb 1, 2019
@beutlich
Copy link
Contributor

beutlich commented Feb 1, 2019

"detached" is used in various places, where I guess it should read "dedicated" as well.

@bernhard-thiele
Copy link
Collaborator Author

Yes, I'm not sure what the better word is. But thinking about it, I lean to "dedicated". I will change it.

@beutlich
Copy link
Contributor

beutlich commented Feb 1, 2019

I will change it.

Thanks.

And please also add a separate test for it.

@beutlich beutlich pinned this issue Feb 1, 2019
bernhard-thiele added a commit that referenced this issue Feb 1, 2019
bernhard-thiele added a commit that referenced this issue Feb 12, 2019
Support blocking UDP receive call (closes #275)
@bernhard-thiele
Copy link
Collaborator Author

I've now also successfully tested the code using OpenModelica running on Linux. The code seems okay and thus I squashed & merged it.

@bernhard-thiele bernhard-thiele unpinned this issue Feb 12, 2019
bernhard-thiele added a commit to bernhard-thiele/Modelica_DeviceDrivers that referenced this issue Dec 4, 2019
Ported the blocking UDP receive calls feature (modelica-3rdparty#275, modelica-3rdparty#276) from
Blocks.Communication.UDPReceive to ClockedBlocks.Communication.UDPReceive.
See example ClockedBlocks.Examples.TestSerialPackager_UDPWithoutReceiveThread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants