Hi Emiliano,

Hi to everybody,

I'm working with RtNet for my thesis in Software Engineer and I would know
how UDP is implemented in RTNet.

My main task is the meaning of "realtime" in UDP protocol. Maybe a message
sent using UDP under RtNet it will always arrive because RtNet will garantee
the arrival? or if the message does not arrive in the timeline it does not
arrive at all?


Remember UDP is a connection-less protocol. Fire and forget. Besides reserving a certain bandwidth and prioritising packets RTnet does not handle transmission faults. If a packet gets lost due to some hardware errors or electromagnetic interferences, RTnet will NOT try to retransmit this packet (but that's just like any other UDP/IP implementation). The philosophy is that this is up to the application. The advantage is that the application is absolutely free to deal with this situation as required e.g by the controlled process (ignore, retransmit, safe shutdown, etc.). And this is also the reason why TCP is not suitable for hard real-time communication.


Searching in this mailing list I find other people with the same problems
and the answer it was:

   o the way the UDP/IP stack and the drivers are implemented (bounded
     locking times, the usage of a RTOS API)
   o the media access protocol for Ethernet (RTmac) which avoids the
     undeterministic CSMA/CD mechanism

but my question is: in which way the UDP/IP stack is implemented? and the
drivers how they work? and how it works the RTmac?

Well, the best way to get it is to read the source code :). Not every line, but there are some key parts, e.g. the rtskb management, the RTmac layer (without TDMA which is a bit tricky to understand), or the UDP/IP input and output paths. There are also some comments (in rtskb.h) and docs (see Documentation directory).


Regarding the stack implementation: it's not a single "trick" to make it realtime. The hole implementation follows basic goals:

 * more important stack users should be served first
 * less important (e.g non realtime) user must not be able to block
   others
 * concurrent users should interfer eachother as less as possible
   (e.g. we use early demultiplexing of incoming packets)
 * the worst case execution time of all stack operations has to be
   bounded, even under load


I'using RtNet v0.2.6, RTAI v24.1.10, RedHat with 2.4.19Kernel and a Network Adapter based on 8139Realtek.


Argh, 0.2.6 is very outdated and does not contain many of the core mechanisms we have in the latest version 0.6.1. Take *at least* 0.5.5.


Even the latest version is still not perfect. But almost all of the known to-dos for the protocol core concern the initialisation or shutdown phase of RTnet (see roadmap), the real-time mode itself already works the way it should be (ok, *nothing* is ever perfect :) ).

Try to browse the code and the docs a bit, and if you have further questions, feel free to ask!

Jan


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ RTnet-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to