Real Time Embedded Systems Monitor in Python?

Hendrik van Rooyen mail at microcorp.co.za
Tue Mar 20 01:46:55 EDT 2007


"frikk" <frikker at gmail.com> wrote:
> 
> I am looking into a project for the company I work for.  Essentially
> it involves setting up a real time monitor / signal injector in
> between a CPU board and a system controller.  The system controller
> sends signals (message packets) to the CPU board.  We would like to
> create an environment where we can modify signals, inject new
> messages, drop signals, etc.  This would simulate communication
> failures and message dropouts to see how the CPU board responds.  The
> application monitor would use a COM port to send and receive
> messages.  The most important part about this monitor is that
> absolutely no messages get delayed or dropped due to inturrupts or lag
> on the PC that the monitor is running on. What would be the expected
> sampling time range that I could expect to handle?

What speed is the serial port running at?   I have run a port at 115200 Baud
(albeit not carrying back to back packets), on a pentium II running Linux.

If you are not trying to do something insane like a Fast Fourier Transform in
real time, then Python should do the job for you - I would suggest you just
try it, starting with the smallest subset of commands - should take no longer 
than about a week to get a prototype running.

When you say "in between" do you mean in one port and out of another?
So that you have to handle an upstream and downstream serial port?

The sampling time range will be directly (more or less, given some spillage
for turn around times) related to the baud rate, unless its a sort of sliding 
window full duplex protocol.   (I assume there is some sort of error
detection and recovery scheme - these normally waste about 10% of the 
available bandwidth)

> 
> I have seen similar applications written for other projects that we
> have which were done in Visual Basic. I assume that if VB is up to the
> task, Python should be as well.  What kind of libraries am I looking
> at? I will probably use wxWindows, but what about for the serial ports
> and packet timing?

Start off with a basic character interface, and use the serial module,
solving the protocol hassles first.
You can add the pretty pictures afterwards.

hth - Hendrik





More information about the Python-list mailing list