Ideas how to measure delays with RTnet
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 33 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a slave. I
want
Quoted 1 line
to measure the time, which a message, sent from master to slave, takes.
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete time of
all
Quoted 12 lines
software layers this data is processed through.
_______________ _______________
| A | | D | |______________| |______________| | B | | C | |______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|Quoted 1 line
So, I create the data, that should be send, in Layer A (Master) and send
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it arrives D
with
Quoted 4 lines
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
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have to
Quoted 9 lines
manipulate
Quoted 1 line
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_TIMEOFFSETfrom 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
Signature · 1 line
von Karl Reichert
Quoted 36 lines · Karl Reichert
Quoted 35 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a slave. I
want
Quoted 1 line
to measure the time, which a message, sent from master to slave, takes.
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete time of
all
Quoted 12 lines
software layers this data is processed through.
_______________ _______________
| A | | D | |______________| |______________| | B | | C | |______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|Quoted 1 line
So, I create the data, that should be send, in Layer A (Master) and send
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it arrives D
with
Quoted 4 lines
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
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have to
manipulate
Quoted 1 line
the stack to pass the offset to the higher layers (C and D)?
Quoted 8 lines
Quoted 6 lines
If RTmac/TDMA is in use, you can obtain the clock offset via
RTMAC_RTIOC_TIMEOFFSETfrom 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 forrtdm_clock_read()) is for kernel mode tasks only.
So you are in userland, obviously...
Quoted 2 lines
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
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 51 lines · Jan Kiszka
Quoted 36 lines · Karl Reichert
Quoted 35 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a slave. I
want
Quoted 1 line
to measure the time, which a message, sent from master to slave, takes.
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete time of
all
Quoted 12 lines
software layers this data is processed through.
_______________ _______________
| A | | D | |______________| |______________| | B | | C | |______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|Quoted 1 line
So, I create the data, that should be send, in Layer A (Master) and send
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it arrives D
with
Quoted 4 lines
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
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have to
manipulate
Quoted 1 line
the stack to pass the offset to the higher layers (C and D)?
Quoted 8 lines
Quoted 6 lines
If RTmac/TDMA is in use, you can obtain the clock offset via
RTMAC_RTIOC_TIMEOFFSETfrom 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 forrtdm_clock_read()) is for kernel mode tasks only.So you are in userland, obviously...
Quoted 1 line
Quoted 7 lines
Quoted 1 line
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.hto 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.
Signature · 1 line
Gilles
Quoted 55 lines · Gilles Chanteperdrix
Quoted 53 lines · Jan Kiszka
Quoted 36 lines · Karl Reichert
Quoted 35 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a slave. I
want
Quoted 1 line
to measure the time, which a message, sent from master to slave, takes.
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete time of
all
Quoted 12 lines
software layers this data is processed through.
_______________ _______________
| A | | D | |______________| |______________| | B | | C | |______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|Quoted 1 line
So, I create the data, that should be send, in Layer A (Master) and send
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it arrives D
with
Quoted 4 lines
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
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have to
manipulate
Quoted 1 line
the stack to pass the offset to the higher layers (C and D)?
Quoted 8 lines
Quoted 6 lines
If RTmac/TDMA is in use, you can obtain the clock offset via
RTMAC_RTIOC_TIMEOFFSETfrom 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 forrtdm_clock_read()) is for kernel mode tasks only.So you are in userland, obviously...
Quoted 2 lines
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?
Quoted 8 lines
Quoted 5 lines
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.hto 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 innative/timer.hare 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 ?
Signature · 1 line
Gilles
Quoted 76 lines
Quoted 7 lines · Gilles Chanteperdrix
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · Karl Reichert
Quoted 4 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a
slave. I
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
want
Quoted 1 line
to measure the time, which a message, sent from master to slave,
takes.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete
time of
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
all
Quoted 4 lines
software layers this data is processed through.
_______________ _______________
| A | | D|Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
|______________| |______________| | B | | C|Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
|______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|So, I create the data, that should be send, in Layer A (Master)
and send
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it
arrives D
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
with
Quoted 1 line
rtdm_clock_read(). If I have the offset between master andslave, I can
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
calculate the time it took to pass A, B, both RTnet stacks, C
and D.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
As RTnet keeps track of the offset in it's stack, I want to use
this
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
value. Is
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have
to
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
manipulate
Quoted 1 line
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_TIMEOFFSETfrom the RTDM device "TDMA<x>" (where"<x>"
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
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 forrtdm_clock_read()) is for kernel mode tasks only.Quoted 6 lines
Quoted 6 lines
So you are in userland, obviously...
Quoted 2 lines
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?Quoted 2 lines
Quoted 2 lines
Nope, there is
rt_timer_read& Co. for native user-modeapplications.
Quoted 2 lines
Quoted 2 lines
I was about to remark that everything can be found in the API docs -
but
Quoted 1 line
Quoted 1 line
it can't! Any volunteer to add the missing functions from
native/timer.h
Quoted 11 lines
Quoted 4 lines
Quoted 1 line
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 innative/timer.hare in the !__KERNEL__ section.Other headers do #if (
defined(__KERNEL__)||defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
Maybe we should use the same construction innative/timer.h?Signature · 1 line
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
Signature · 1 line
von Karl Reichert
Quoted 3 lines · Karl Reichert
Hmm ... what is the difference between
rt_timer_read,rt_timer_inquireandrt_timer_tsc? I thinkrt_timer_inquireis 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_PROCESSORandCONFIG_APMdisabled?! So I can usert_timer_tsc?! Or should I better usert_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.
Signature · 1 line
Gilles.
Quoted 63 lines · Gilles Chanteperdrix
Quoted 61 lines · Gilles Chanteperdrix
Quoted 58 lines · Jan Kiszka
Quoted 36 lines · Karl Reichert
Quoted 35 lines · Jan Kiszka
Quoted 3 lines · Karl Reichert
Hello,
I have two stations running RTnet, one as a master and one as a slave. I
want
Quoted 1 line
to measure the time, which a message, sent from master to slave, takes.
But,
Quoted 1 line
I don't want the time of the transmission only, but the complete time of
all
Quoted 12 lines
software layers this data is processed through.
_______________ _______________
| A | | D | |______________| |______________| | B | | C | |______________| |______________| | RTnet (Master) | | RTnet (Slave) | |______________| |______________| | | |______________|Quoted 1 line
So, I create the data, that should be send, in Layer A (Master) and send
it
Quoted 3 lines
over RTnet to Layer D (Slave).
I want to take the time when the data leaves A and when it arrives D
with
Quoted 4 lines
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
Quoted 1 line
it possible via the API? I didn't found anything. Or do I have to
manipulate
Quoted 1 line
the stack to pass the offset to the higher layers (C and D)?
Quoted 8 lines
Quoted 6 lines
If RTmac/TDMA is in use, you can obtain the clock offset via
RTMAC_RTIOC_TIMEOFFSETfrom 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 forrtdm_clock_read()) is for kernel mode tasks only.So you are in userland, obviously...
Quoted 2 lines
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.hto the docs? Maybe there is just something broken for doxygen. TIA!
Quoted 6 lines
Quoted 2 lines
The problem is that
__KERNEL__is in the list of PREDEFINED macros, and the comments innative/timer.hare in the !__KERNEL__ section.Other headers do #if (
defined(__KERNEL__)||defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
Maybe we should use the same construction innative/timer.h?
Fixed in trunk and v2.4.x. Next documentation generation should include native/timer.h inlines documentation.
Signature · 1 line
Gilles.
Karl Reichert a écrit : 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