Python and real-time OS timing/task communication?

R

Ray Schumacher

Has anyone used Python and a hard real-time OS/patch to schedule timed events?
We have started in on Debian and RTAI, and may be using LXRT.
(I've been reading http://people.mech.kuleuven.be/~psoetens/lxrt/portingtolxrt.html)
I was envisioning that we really only need a separate RT-process in C using RDTSC or ACPI clocking that can get its control messages from non-RT Python every 50ms or so, to toggle pins on parport0.
Any pointers, examples, etc for communicating from Python to an RT task?

Thanks,
Ray
 
S

seletz

Hi,

Ray said:
Has anyone used Python and a hard real-time OS/patch to schedule timed events?
We have started in on Debian and RTAI, and may be using LXRT.
(I've been reading http://people.mech.kuleuven.be/~psoetens/lxrt/portingtolxrt.html)

you should really also try http://www.xenomai.org; IMHO it has a much
cleaner API than
RTAI. And it even works for PPC targets, if thats of interst to you
(both 2.4 and 2.6 kernels).

Userspace RT programming works like a charm.
I was envisioning that we really only need a separate RT-process in C using RDTSC or ACPI clocking that can get its control messages from non-RT Python every 50ms or so, to toggle pins on parport0.
Any pointers, examples, etc for communicating from Python to an RT task?

Xenomai has lots of communication primitives -- I even can imagine a
simple c-coded python extension to communicate over rt queues.

Xenomai also has a "posix RT" skin, which tries to provide all of the
POSIX RT extensions, maybe even a recompile of python and linking
against the posix rt skin of xenomai would be enough.

HTH,
Stefan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top