* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet [not found] ` <48276703.2020005@domain.hid> @ 2008-05-14 14:49 ` Karl Reichert 2008-05-14 15:04 ` Jan Kiszka 2008-05-15 6:07 ` Stéphane ANCELOT 0 siblings, 2 replies; 8+ messages in thread From: Karl Reichert @ 2008-05-14 14:49 UTC (permalink / raw) To: rtnet-users; +Cc: xenomai Jan Kiszka wrote: > Karl Reichert wrote: > > Hello, > > > > I have two stations running RTnet, one as a master and one as a slave. I > want > > to measure the time, which a message, sent from master to slave, takes. > But, > > I don't want the time of the transmission only, but the complete time of > all > > software layers this data is processed through. > > > > _______________ _______________ > > | A | | D | > > |______________| |______________| > > | B | | C | > > |______________| |______________| > > | RTnet (Master) | | RTnet (Slave) | > > |______________| |______________| > > | | > > |______________| > > > > So, I create the data, that should be send, in Layer A (Master) and send > it > > over RTnet to Layer D (Slave). > > > > I want to take the time when the data leaves A and when it arrives D > with > > rtdm_clock_read(). If I have the offset between master and slave, I can > > calculate the time it took to pass A, B, both RTnet stacks, C and D. > > > > As RTnet keeps track of the offset in it's stack, I want to use this > value. Is > > it possible via the API? I didn't found anything. Or do I have to > manipulate > > the stack to pass the offset to the higher layers (C and D)? > > If RTmac/TDMA is in use, you can obtain the clock offset via > RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where "<x>" > corresponds to "rteth<x>"). > > Jan > When I try to compile my application (xenomai native skin, user task), I get an error, saying rtdm_driver.h (which contains the prototype for rtdm_clock_read()) is for kernel mode tasks only. How can I get a timestamp in a xenomai native user task? Is there sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? Thanks Karl -- von Karl Reichert ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 14:49 ` [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet Karl Reichert @ 2008-05-14 15:04 ` Jan Kiszka 2008-05-14 15:17 ` Gilles Chanteperdrix 2008-05-15 6:07 ` Stéphane ANCELOT 1 sibling, 1 reply; 8+ messages in thread From: Jan Kiszka @ 2008-05-14 15:04 UTC (permalink / raw) To: Karl Reichert; +Cc: xenomai, rtnet-users Karl Reichert wrote: > Jan Kiszka wrote: >> Karl Reichert wrote: >>> Hello, >>> >>> I have two stations running RTnet, one as a master and one as a slave. I >> want >>> to measure the time, which a message, sent from master to slave, takes. >> But, >>> I don't want the time of the transmission only, but the complete time of >> all >>> software layers this data is processed through. >>> >>> _______________ _______________ >>> | A | | D | >>> |______________| |______________| >>> | B | | C | >>> |______________| |______________| >>> | RTnet (Master) | | RTnet (Slave) | >>> |______________| |______________| >>> | | >>> |______________| >>> >>> So, I create the data, that should be send, in Layer A (Master) and send >> it >>> over RTnet to Layer D (Slave). >>> >>> I want to take the time when the data leaves A and when it arrives D >> with >>> rtdm_clock_read(). If I have the offset between master and slave, I can >>> calculate the time it took to pass A, B, both RTnet stacks, C and D. >>> >>> As RTnet keeps track of the offset in it's stack, I want to use this >> value. Is >>> it possible via the API? I didn't found anything. Or do I have to >> manipulate >>> the stack to pass the offset to the higher layers (C and D)? >> If RTmac/TDMA is in use, you can obtain the clock offset via >> RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where "<x>" >> corresponds to "rteth<x>"). >> >> Jan >> > > When I try to compile my application (xenomai native skin, user task), I get an error, saying rtdm_driver.h (which contains the prototype for rtdm_clock_read()) is for kernel mode tasks only. So you are in userland, obviously... > > How can I get a timestamp in a xenomai native user task? Is there sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? Nope, there is rt_timer_read & Co. for native user-mode applications. I was about to remark that everything can be found in the API docs - but it can't! Any volunteer to add the missing functions from native/timer.h to the docs? Maybe there is just something broken for doxygen. TIA! Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 15:04 ` Jan Kiszka @ 2008-05-14 15:17 ` Gilles Chanteperdrix 2008-05-14 15:31 ` Gilles Chanteperdrix 0 siblings, 1 reply; 8+ messages in thread From: Gilles Chanteperdrix @ 2008-05-14 15:17 UTC (permalink / raw) To: Jan Kiszka; +Cc: xenomai, rtnet-users On Wed, May 14, 2008 at 5:04 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote: > > Karl Reichert wrote: > > Jan Kiszka wrote: > >> Karl Reichert wrote: > >>> Hello, > >>> > >>> I have two stations running RTnet, one as a master and one as a slave. I > >> want > >>> to measure the time, which a message, sent from master to slave, takes. > >> But, > >>> I don't want the time of the transmission only, but the complete time of > >> all > >>> software layers this data is processed through. > >>> > >>> _______________ _______________ > >>> | A | | D | > >>> |______________| |______________| > >>> | B | | C | > >>> |______________| |______________| > >>> | RTnet (Master) | | RTnet (Slave) | > >>> |______________| |______________| > >>> | | > >>> |______________| > >>> > >>> So, I create the data, that should be send, in Layer A (Master) and send > >> it > >>> over RTnet to Layer D (Slave). > >>> > >>> I want to take the time when the data leaves A and when it arrives D > >> with > >>> rtdm_clock_read(). If I have the offset between master and slave, I can > >>> calculate the time it took to pass A, B, both RTnet stacks, C and D. > >>> > >>> As RTnet keeps track of the offset in it's stack, I want to use this > >> value. Is > >>> it possible via the API? I didn't found anything. Or do I have to > >> manipulate > >>> the stack to pass the offset to the higher layers (C and D)? > >> If RTmac/TDMA is in use, you can obtain the clock offset via > >> RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where "<x>" > >> corresponds to "rteth<x>"). > >> > >> Jan > >> > > > > When I try to compile my application (xenomai native skin, user task), I get an error, saying rtdm_driver.h (which contains the prototype for rtdm_clock_read()) is for kernel mode tasks only. > > So you are in userland, obviously... > > > > > > How can I get a timestamp in a xenomai native user task? Is there sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? > > Nope, there is rt_timer_read & Co. for native user-mode applications. > > I was about to remark that everything can be found in the API docs - but > it can't! Any volunteer to add the missing functions from native/timer.h > to the docs? Maybe there is just something broken for doxygen. TIA! The problem is that __KERNEL__ is in the list of PREDEFINED macros, and the comments in native/timer.h are in the !__KERNEL__ section. -- Gilles ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 15:17 ` Gilles Chanteperdrix @ 2008-05-14 15:31 ` Gilles Chanteperdrix 2008-05-14 17:02 ` Karl Reichert 2008-05-14 19:07 ` Gilles Chanteperdrix 0 siblings, 2 replies; 8+ messages in thread From: Gilles Chanteperdrix @ 2008-05-14 15:31 UTC (permalink / raw) To: Jan Kiszka; +Cc: xenomai, rtnet-users On Wed, May 14, 2008 at 5:17 PM, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: > > On Wed, May 14, 2008 at 5:04 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote: > > > > Karl Reichert wrote: > > > Jan Kiszka wrote: > > >> Karl Reichert wrote: > > >>> Hello, > > >>> > > >>> I have two stations running RTnet, one as a master and one as a slave. I > > >> want > > >>> to measure the time, which a message, sent from master to slave, takes. > > >> But, > > >>> I don't want the time of the transmission only, but the complete time of > > >> all > > >>> software layers this data is processed through. > > >>> > > >>> _______________ _______________ > > >>> | A | | D | > > >>> |______________| |______________| > > >>> | B | | C | > > >>> |______________| |______________| > > >>> | RTnet (Master) | | RTnet (Slave) | > > >>> |______________| |______________| > > >>> | | > > >>> |______________| > > >>> > > >>> So, I create the data, that should be send, in Layer A (Master) and send > > >> it > > >>> over RTnet to Layer D (Slave). > > >>> > > >>> I want to take the time when the data leaves A and when it arrives D > > >> with > > >>> rtdm_clock_read(). If I have the offset between master and slave, I can > > >>> calculate the time it took to pass A, B, both RTnet stacks, C and D. > > >>> > > >>> As RTnet keeps track of the offset in it's stack, I want to use this > > >> value. Is > > >>> it possible via the API? I didn't found anything. Or do I have to > > >> manipulate > > >>> the stack to pass the offset to the higher layers (C and D)? > > >> If RTmac/TDMA is in use, you can obtain the clock offset via > > >> RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where "<x>" > > >> corresponds to "rteth<x>"). > > >> > > >> Jan > > >> > > > > > > When I try to compile my application (xenomai native skin, user task), I get an error, saying rtdm_driver.h (which contains the prototype for rtdm_clock_read()) is for kernel mode tasks only. > > > > So you are in userland, obviously... > > > > > > > > > > How can I get a timestamp in a xenomai native user task? Is there sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? > > > > Nope, there is rt_timer_read & Co. for native user-mode applications. > > > > I was about to remark that everything can be found in the API docs - but > > it can't! Any volunteer to add the missing functions from native/timer.h > > to the docs? Maybe there is just something broken for doxygen. TIA! > > The problem is that __KERNEL__ is in the list of PREDEFINED macros, > and the comments in native/timer.h are in the !__KERNEL__ section. Other headers do #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP) Maybe we should use the same construction in native/timer.h ? -- Gilles ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 15:31 ` Gilles Chanteperdrix @ 2008-05-14 17:02 ` Karl Reichert 2008-05-14 19:18 ` Gilles Chanteperdrix 2008-05-14 19:07 ` Gilles Chanteperdrix 1 sibling, 1 reply; 8+ messages in thread From: Karl Reichert @ 2008-05-14 17:02 UTC (permalink / raw) To: Gilles Chanteperdrix, jan.kiszka; +Cc: xenomai, rtnet-users > Gilles Chanteperdrix wrote: > > Jan Kiszka wrote: > > > Karl Reichert wrote: > > > > Jan Kiszka wrote: > > > >> Karl Reichert wrote: > > > >>> Hello, > > > >>> > > > >>> I have two stations running RTnet, one as a master and one as a > slave. I > > > >> want > > > >>> to measure the time, which a message, sent from master to slave, > takes. > > > >> But, > > > >>> I don't want the time of the transmission only, but the complete > time of > > > >> all > > > >>> software layers this data is processed through. > > > >>> > > > >>> _______________ _______________ > > > >>> | A | | D > | > > > >>> |______________| |______________| > > > >>> | B | | C > | > > > >>> |______________| |______________| > > > >>> | RTnet (Master) | | RTnet (Slave) | > > > >>> |______________| |______________| > > > >>> | | > > > >>> |______________| > > > >>> > > > >>> So, I create the data, that should be send, in Layer A (Master) > and send > > > >> it > > > >>> over RTnet to Layer D (Slave). > > > >>> > > > >>> I want to take the time when the data leaves A and when it > arrives D > > > >> with > > > >>> rtdm_clock_read(). If I have the offset between master and > slave, I can > > > >>> calculate the time it took to pass A, B, both RTnet stacks, C > and D. > > > >>> > > > >>> As RTnet keeps track of the offset in it's stack, I want to use > this > > > >> value. Is > > > >>> it possible via the API? I didn't found anything. Or do I have > to > > > >> manipulate > > > >>> the stack to pass the offset to the higher layers (C and D)? > > > >> If RTmac/TDMA is in use, you can obtain the clock offset via > > > >> RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where > "<x>" > > > >> corresponds to "rteth<x>"). > > > >> > > > >> Jan > > > >> > > > > > > > > When I try to compile my application (xenomai native skin, user > task), I get an error, saying rtdm_driver.h (which contains the prototype for > rtdm_clock_read()) is for kernel mode tasks only. > > > > > > So you are in userland, obviously... > > > > > > > > > > > > > > How can I get a timestamp in a xenomai native user task? Is there > sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? > > > > > > Nope, there is rt_timer_read & Co. for native user-mode > applications. > > > > > > I was about to remark that everything can be found in the API docs - > but > > > it can't! Any volunteer to add the missing functions from > native/timer.h > > > to the docs? Maybe there is just something broken for doxygen. TIA! > > > > The problem is that __KERNEL__ is in the list of PREDEFINED macros, > > and the comments in native/timer.h are in the !__KERNEL__ section. > > Other headers do #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && > !defined(DOXYGEN_CPP) > Maybe we should use the same construction in native/timer.h ? > > -- > Gilles Hmm ... what is the difference between rt_timer_read, rt_timer_inquire and rt_timer_tsc? I think rt_timer_inquire is giving the same results (and a little more, the period) like the other two ones, but in one call? As I understand, TSC is a reliable value on single processor machines with CONFIG_CPU_FREQ, CONFIG_ACPI_PROCESSOR and CONFIG_APM disabled?! So I can use rt_timer_tsc?! Or should I better use rt_timer_read? (Please see above for my UseCase) Thanks in advance. Karl -- von Karl Reichert ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 17:02 ` Karl Reichert @ 2008-05-14 19:18 ` Gilles Chanteperdrix 0 siblings, 0 replies; 8+ messages in thread From: Gilles Chanteperdrix @ 2008-05-14 19:18 UTC (permalink / raw) To: Karl Reichert; +Cc: jan.kiszka, xenomai, rtnet-users Karl Reichert wrote: > Hmm ... what is the difference between rt_timer_read, rt_timer_inquire and rt_timer_tsc? I think rt_timer_inquire is giving the same results (and a little more, the period) like the other two ones, but in one call? > > As I understand, TSC is a reliable value on single processor machines with CONFIG_CPU_FREQ, CONFIG_ACPI_PROCESSOR and CONFIG_APM disabled?! So I can use rt_timer_tsc?! Or should I better use rt_timer_read? (Please see above for my UseCase) rt_timer_tsc has less overhead than rt_timer_read (it does not issue a syscall, and it does not do any conversion). On the other hand, rt_timer_read gives you an absolute value whose reference is the well known 1st january 1970. With rt_timer_inquire, you get rt_timer_tsc and rt_timer_read at the same time, and you know the relation between the two values. -- Gilles. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 15:31 ` Gilles Chanteperdrix 2008-05-14 17:02 ` Karl Reichert @ 2008-05-14 19:07 ` Gilles Chanteperdrix 1 sibling, 0 replies; 8+ messages in thread From: Gilles Chanteperdrix @ 2008-05-14 19:07 UTC (permalink / raw) To: Jan Kiszka, Karl Reichert, xenomai, rtnet-users Gilles Chanteperdrix wrote: > On Wed, May 14, 2008 at 5:17 PM, Gilles Chanteperdrix > <gilles.chanteperdrix@xenomai.org> wrote: > > > > On Wed, May 14, 2008 at 5:04 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote: > > > > > > Karl Reichert wrote: > > > > Jan Kiszka wrote: > > > >> Karl Reichert wrote: > > > >>> Hello, > > > >>> > > > >>> I have two stations running RTnet, one as a master and one as a slave. I > > > >> want > > > >>> to measure the time, which a message, sent from master to slave, takes. > > > >> But, > > > >>> I don't want the time of the transmission only, but the complete time of > > > >> all > > > >>> software layers this data is processed through. > > > >>> > > > >>> _______________ _______________ > > > >>> | A | | D | > > > >>> |______________| |______________| > > > >>> | B | | C | > > > >>> |______________| |______________| > > > >>> | RTnet (Master) | | RTnet (Slave) | > > > >>> |______________| |______________| > > > >>> | | > > > >>> |______________| > > > >>> > > > >>> So, I create the data, that should be send, in Layer A (Master) and send > > > >> it > > > >>> over RTnet to Layer D (Slave). > > > >>> > > > >>> I want to take the time when the data leaves A and when it arrives D > > > >> with > > > >>> rtdm_clock_read(). If I have the offset between master and slave, I can > > > >>> calculate the time it took to pass A, B, both RTnet stacks, C and D. > > > >>> > > > >>> As RTnet keeps track of the offset in it's stack, I want to use this > > > >> value. Is > > > >>> it possible via the API? I didn't found anything. Or do I have to > > > >> manipulate > > > >>> the stack to pass the offset to the higher layers (C and D)? > > > >> If RTmac/TDMA is in use, you can obtain the clock offset via > > > >> RTMAC_RTIOC_TIMEOFFSET from the RTDM device "TDMA<x>" (where "<x>" > > > >> corresponds to "rteth<x>"). > > > >> > > > >> Jan > > > >> > > > > > > > > When I try to compile my application (xenomai native skin, user task), I get an error, saying rtdm_driver.h (which contains the prototype for rtdm_clock_read()) is for kernel mode tasks only. > > > > > > So you are in userland, obviously... > > > > > > > > > > > > > > How can I get a timestamp in a xenomai native user task? Is there sth equivalent to rtdm_clock_read()? Or do I have to write a kernel task? > > > > > > Nope, there is rt_timer_read & Co. for native user-mode applications. > > > > > > I was about to remark that everything can be found in the API docs - but > > > it can't! Any volunteer to add the missing functions from native/timer.h > > > to the docs? Maybe there is just something broken for doxygen. TIA! > > > > The problem is that __KERNEL__ is in the list of PREDEFINED macros, > > and the comments in native/timer.h are in the !__KERNEL__ section. > > Other headers do #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && > !defined(DOXYGEN_CPP) > Maybe we should use the same construction in native/timer.h ? Fixed in trunk and v2.4.x. Next documentation generation should include native/timer.h inlines documentation. -- Gilles. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet 2008-05-14 14:49 ` [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet Karl Reichert 2008-05-14 15:04 ` Jan Kiszka @ 2008-05-15 6:07 ` Stéphane ANCELOT 1 sibling, 0 replies; 8+ messages in thread From: Stéphane ANCELOT @ 2008-05-15 6:07 UTC (permalink / raw) To: Karl Reichert; +Cc: xenomai, rtnet-users [-- Attachment #1: Type: text/html, Size: 3185 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-05-15 6:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200805112104.56166.karl-trampe@domain.hid>
[not found] ` <48276703.2020005@domain.hid>
2008-05-14 14:49 ` [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet Karl Reichert
2008-05-14 15:04 ` Jan Kiszka
2008-05-14 15:17 ` Gilles Chanteperdrix
2008-05-14 15:31 ` Gilles Chanteperdrix
2008-05-14 17:02 ` Karl Reichert
2008-05-14 19:18 ` Gilles Chanteperdrix
2008-05-14 19:07 ` Gilles Chanteperdrix
2008-05-15 6:07 ` Stéphane ANCELOT
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.