From: Hannes Mayer <h.mayer@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] How can I now when it will be next periodic task release point?
Date: Tue, 25 Jul 2006 23:00:10 +0200 [thread overview]
Message-ID: <44C6865A.9010403@domain.hid> (raw)
In-Reply-To: <200607251735.35500.lbocseg@domain.hid>
Ciao Rodrigo!
Rodrigo Rosenfeld Rosas wrote:
> I want to capture and process images each 300 ms. The processing routines take
> a (fixed, but unknown) time. I'd like to request a new image about 50 ms
> before next release point, like this:
>
> for(;;)
> {
> rt_task_wait_period(NULL);
> ProcessImage();
> rt_task_sleep(XXX); // until 50 ms before next release point
> RequestNewImage();
> }
>
> I could use rt_task_inquire() if RT_TASK_INFO was documented. From
> source-code:
> RTIME relpoint; /* !< Periodic release point. */
>
> The question is which release point? Next or the last reached?
> Anyway, a new function like rt_task_getnextrelpoint() would be very welcome...
>
> rt_task_sleep(rt_task_getnextrelpoint() - 50*1000*1000);
Just trying to understand your problem:
If you wanna capture a image every 300ms, the processing must not take
longer than 300ms, otherwise you have some kind over overrun (?)
So you capture an image, process it within 300ms and then capture
the next one, right ?
OK, wait a sec. I think I got it.
I guess your problem is having both capturing and processing in one loop ?
Why not make 2 threads, one for capturing, and one for processing ?
I may be totally wrong - just trying to understand and maybe help :-)
Best regards,
Hannes.
PS.: Why do all replies go only to the sender ? This hasn't been that
way in the (far) past, right ?
next prev parent reply other threads:[~2006-07-25 21:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 20:35 [Xenomai-help] How can I now when it will be next periodic task release point? Rodrigo Rosenfeld Rosas
2006-07-25 21:00 ` Hannes Mayer [this message]
2006-07-26 15:07 ` Rodrigo Rosenfeld Rosas
2006-07-25 21:52 ` Jan Kiszka
2006-07-26 10:08 ` Philippe Gerum
2006-07-26 15:15 ` Rodrigo Rosenfeld Rosas
2006-07-26 15:29 ` Jan Kiszka
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=44C6865A.9010403@domain.hid \
--to=h.mayer@domain.hid \
--cc=lbocseg@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.