realtime design

James J. Besemer jb at cascade-sys.com
Sun Oct 13 03:17:08 CEST 2002


Will Stuyvesant wrote:

>We would like to prototype a realtime system.  Is anybody doing this using Python?
>
Depends on what you mean by "real time".  ;o)

I am using Python for a home automation system.  Very low-level digital, 
analog and X10 I/O is handled by hardware or custom hardware/firmware 
modules but the overall command and control logic is handled in Python. 
 In particular, a Real Time event actuator commands all of the 
autonomous events, such as lighting being turned on or off on a preset 
schedule.  Non-x10 signals can be processed in around 10 msec.; X10 by 
it's nature takes on the order of 1 second per command code sent or 
received.

The base control system runs on a dedicated Linux computer but all the 
basic controls operate via TCP/IP sockets and thus can be monitored or 
operated upon by any computer on the network.  The idea is that each 
"client" can connect to the system and monitor and change just those few 
signals it cares about.  For most services, I start out with a unix 
"command line" interface and then follow later with more elaborate GUI 
front ends.

I feel Python is eminently suitable for many real time applications.  It 
only begins to break down in those circumstances where the real time 
constraints are very tight.  Even then, C modules can be written to 
handle some of the time-critical functions.  Only on the high-end of 
real time performance would I say that Python is probably not the right 
choice.

Regards

--jb

-- 
James J. Besemer		503-280-0838 voice
2727 NE Skidmore St.		503-280-0375 fax
Portland, Oregon 97211-6557	mailto:jb at cascade-sys.com
				http://cascade-sys.com	








More information about the Python-list mailing list