Experimental Physics and Industrial Control System
|
Nice summary Eric. I'll add that in the FACE Technical Standard which tailors POSIX for safety critical avionics systems, all profiles include UDP while only the larger two include TCP. TCP is of higher complexity and harder to put through the verification processes required in some domains.
In fact, lwIP even includes a build option to disable TCP which is one of the factors in how it can be configured to be so small.
For those who haven't noticed, for RTEMS 6 you build RTEMS, then have a choice of libbsd, lwip, or the legacy stack. And Eric was the one who originally ported what is now the legacy stack.
--joel The most important reason that UDP is more appropriate for basic command/reply operations is that it puts you in control of the retries. You can keep track of how many times they are required and you can tune the retry timeouts as you wish. For example, many of my ’network attached device’ UDP ASYN drivers work as follows: - Send a command
- if a reply is not received in 100 ms then send the command again
- if a reply is not received in 1 second then send the command again — after 5 attempts report an error
Some other UDP advantages: - UDP is much simpler — direct implementation in FPGA firmware is quite feasible.
- UDP has lower network overhead — in the absence of errors the only packets on the wire are the commands and replies.
- UDP is connectionless — there’s no overhead in setting up communication nor the possibility of dangling resources on unexpected loss of an IOC (e.g. the IOC host crashes without closing all the TCP streams).
Although TCP is ‘reliable’ you still have to check the success of every I/O request so there’s really not much programming overhead needed when using UDP.
If you’re transferring very large amounts of data then TCP is likely easier to implement to provide high bandwidth, but in pretty much all other cases I’d recommend UDP.
Thanks for all the feedback, I have to admit I did not properly checked the memory of the chip compared to the requirements for an IOC. And I also might have mixed up RTEMS with RTOS 😅 I guess I either stay with my current design (TCP socket on the module using StreamDevice + Asyn for communication with an external IOC) or I'll switch to ModbusTCP. Btw Eric, why do you think UDP would be more appropriate than TCP?
Cheers, Florian
- References:
- EPICS on ESP32 Florian Feldbauer via Tech-talk
- Re: EPICS on ESP32 Eric Norum via Tech-talk
- Re: EPICS on ESP32 Florian Feldbauer via Tech-talk
- Re: EPICS on ESP32 Eric Norum via Tech-talk
- Navigate by Date:
- Prev:
Re: EPICS on ESP32 Eric Norum via Tech-talk
- Next:
Re: EPICS on ESP32 Eric Norum via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS on ESP32 Eric Norum via Tech-talk
- Next:
Re: EPICS on ESP32 Eric Norum via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024
|
ANJ, 14 Sep 2022 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|