Imre Paniti wrote: >> >> > Thanks for the example at >> > >> http://www.rts.uni-hannover.de/rtnet/lxr/source/examples/xenomai/native/tdma-api.c?v=SVN >> >> > >> > >> > It seems that we can use this concept with RTAI too (without a native >> > Xenomai task). >> >> You should (i.e. yet untested but must work). >> >> > >> > If I'm right, then waitinfo.clock_offset is the offset between master >> and >> > slave clock (system clocks) for the current cycle. >> >> Yes. The same value is also returned by RTMAC_RTIOC_TIMEOFFSET. >> >> > The returned time offset is a difference between two timestamps at that >> > moment when the ioctl function is called or it gives a time with the >> > (included) execution time of the task? >> >> Sorry, -ENOPARSE for me. What "returned time offset" do you mean now? > > > > > >> Jan >> > What I meant, is wether the difference between the clocks of master and > slave includes the time it takes to send over the current time from one > machine to the other, or wether this has already been subtracted.
There is compensation for the transmission time included (typically
around 20-30 us on 100 MBit Ethernet, measured individually during TDMA
startup).
>
> Something else...
>
> In any case RTAI is based on the system clock and I have to adjust that
> clock if I want to synchronize two PCs, am I right?
>
Either that way, or you convert between both time bases in your
application ("sleep until global time T <=> sleep until local time
T'=T-offset").
Jan
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

