Tobias Holzer wrote: > Hello, > > Iam new to the Project and want to measure some values like delay or > offset to get a sense for the whole thing. My first approch was to set > up an additional IEEE style synching on top of the TDMA protocol. Thats > just for practice as tdma is allready synched. The Oppertunity is to > compare the tdma delay and offset values with the additional measured > ones. > > Well, after i have discovered the web and the source i found that the > XMIT Event is not implemented yet. I have added it and now i have a few > questions.
Yep, RTMAC_WAIT_ON_XMIT was still waiting for a use case. I just wonder if measuring the TDMA performance and accuracy is a good one. Keep in mind that this mechanism will come with some own inherent latencies and jitters. Maybe you rather want to take a look at a system-level tracer like LTTng. And if that adds too much overhead, I would add some instrumentation to RTnet so that it triggers some hardware output (UART, parallel port etc.) and measure externally. > > But first the piece i changed: > > Index: > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/include/rtmac.h ^^^ Hehe, again someone trying to do Linux development under Windows. Have fun! :) > =================================================================== > --- > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/include/rtmac.h > (revision 1204) > +++ > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/include/rtmac.h > (working copy) > @@ -48,7 +48,9 @@ > #define TDMA_WAIT_ON_SYNC RTMAC_WAIT_ON_DEFAULT > #define TDMA_WAIT_ON_SOF TDMA_WAIT_ON_SYNC /* legacy support > */ > > +#define TDMA_WAIT_ON_XMIT RTMAC_WAIT_ON_XMIT > > + > /* RTMAC_RTIOC_WAITONCYCLE_EX control and status data */ > struct rtmac_waitinfo { > /** Set to wait type before invoking the service */ > Index: > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_worker.c > =================================================================== > --- > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_worker.c > > (revision 1204) > +++ > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_worker.c > > (working copy) > @@ -48,6 +48,7 @@ > rtdm_lock_put_irqrestore(&tdma->lock, lockctx); > > rtmac_xmit(rtskb); > + rtdm_event_pulse(&tdma->xmit_event); > > rtdm_lock_get_irqsave(&tdma->lock, lockctx); > } > Index: > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_dev.c > =================================================================== > --- > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_dev.c > (revision 1204) > +++ > > Q:/projekte/Prototyping/scale-net/rtnet-0.9.10/stack/rtmac/tdma/tdma_dev.c > (working copy) > @@ -113,12 +113,11 @@ > case RTMAC_RTIOC_WAITONCYCLE: > if (!rtdm_in_rt_context()) > return -ENOSYS; > + // Why this Function? Why do i need to restrict the number > of waiting Tasks to one? And why not just destroy the events? > + if (( long ) arg == TDMA_WAIT_ON_SYNC ) return > wait_on_sync(ctx, &tdma->sync_event); > + else if (( long ) arg == TDMA_WAIT_ON_XMIT ) return > rtdm_event_wait(&tdma->xmit_event); > + else return -EINVAL; > > - if ((long)arg !=TDMA_WAIT_ON_SYNC) > - return -EINVAL; > - > - return wait_on_sync(ctx, &tdma->sync_event); > - > case RTMAC_RTIOC_WAITONCYCLE_EX: { > struct rtmac_waitinfo *waitinfo = (struct rtmac_waitinfo > *)arg; > struct rtmac_waitinfo waitinfo_buf; > > > 1. Q: > For what is the wait_on_sync() function exactly needed? Doesn't Xenomai > take care of wakeing up tasks waiting on an events which got destroyed? > Is the user in charge of signaling events before destroying them? What > is the pupose of the cycle_waiter variable? Does XMIT_SYNCH also need to > queue itself into it? You can't simply destroy the event object as it may be shared between multiple TDMA device instances. But as you want to release the waiter associated with the instance that is supposed to be closed, you need to have a reference. Of course, you could also build a list of waiters and walk that one on close. > > 2. Q: > Is it correct that the XMIT Event should get pulsed after a packet was > sent to the Hardware? Or should it happen if a packet could be sent to > the hardware? Even if there is no Package in the Queue? I would say it should fire independent of the queue state. Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users