All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>,
	Karl Reichert <Karl-Trampe@domain.hid>,
	xenomai@xenomai.org, rtnet-users@domain.hid
Subject: Re: [Xenomai-help] [RTnet-users] Ideas how to measure delays with RTnet
Date: Wed, 14 May 2008 21:07:38 +0200	[thread overview]
Message-ID: <18475.14458.258289.608003@domain.hid> (raw)
In-Reply-To: <2ff1a98a0805140831w6c9b2c2ble3cefec79dce1081@domain.hid>

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.


  parent reply	other threads:[~2008-05-14 19:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2008-05-15  6:07     ` Stéphane ANCELOT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18475.14458.258289.608003@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Karl-Trampe@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=rtnet-users@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.