Jan Kiszka wrote: > matrix_df hotmail wrote: >> Hello >> >>>> A bug? >>> Grmbl, maybe. Is TDMA running smoothly? >> The frag-ip examples (without modification, user and kernel mode) runs >> perfectly. >> Do I need to start (define) tdma slots with tdma.conf / tdmacfg to use >> WAITONCYCLE? >> I am not using tdma.conf by now, just the rtnet.conf. > > Nope, it's using a "simple" TDMA setup by default. If you run ping or > rtping, you should see the TDMA cycles in the RTT delays, but I'm quite > sure that this is ok. > > Given that basic communication works, there must be something wrong with > the interface. Will have a look at it later today.
Ok, this fixes the bug (also in SVN):
--- stack/rtmac/tdma/tdma_proto.c (revision 1031)
+++ stack/rtmac/tdma/tdma_proto.c (working copy)
@@ -66,6 +66,9 @@ void tdma_xmit_sync_frame(struct tdma_pr
rtmac_xmit(rtskb);
+ /* signal local waiters */
+ rtdm_event_pulse(&tdma->sync_event);
+
return;
err_out:
You must have run your test on the master - just like I did fortunately.
And this revealed that the sync_event is only signalled on slave
stations, because it's used there internally by TDMA anyway. Now it's
also signalled on the master, thus waiting should work fine everywhere.
Jan
PS: My primitive test looked like this:
#include <stdio.h>
#include <sys/mman.h>
#include <native/task.h>
#include <rtnet.h>
#include <rtmac.h>
main()
{
int i, fd, err;
RT_TASK task;
mlockall(MCL_CURRENT | MCL_FUTURE);
fd = rt_dev_open("TDMA0", O_RDWR);
printf("open = %d\n", fd);
rt_task_shadow(&task, "waitonsync", 1, 0);
for (i=0; i < 100; i++) {
err = rt_dev_ioctl(fd, RTMAC_RTIOC_WAITONCYCLE,
TDMA_WAIT_ON_SYNC);
if (err)
printf("TDMA_WAIT_ON_SYNC = %d\n", err);
}
printf("done\n");
rt_dev_close(fd);
}
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ RTnet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rtnet-users

