Re: Serial port access

From: Brian Denheyer <briand_at_deldotd.com>
Date: Thu, 17 Jun 1999 10:27:20 -0700 (PDT)

Grant,

I looked through the source and there does not appear to be one.
However, I _think_ that you could do this strictly with an FFI,
i.e. you should not need to write any C. The functions are already
there, you just need to call them and be able to handle return values.

It will be a little tedious (you would have to create all the defines
in scheme, but you should just be able to "munge" the header files)
but not very difficult. There is a foreign function interface
generator :

  http://www.ccs.neu.edu/home/lth/ffigen/

which might be helpful.

Even if you had to write a C interface it wouldn't be terrible.

It would be great if you coded the whole thing ( as opposed to just
what you needed) as a serial port interface would be a _most_ useful
contribution.

Brian

--
Brian Denheyer             briand_at_deldotd.com
Deldot Design, Inc.        (503) 788-1607
__              
\/.d = Electronic design and development
>>>>> "Grant" == Grant Edwards <grante_at_visi.com> writes:
  Grant> Hi all,
  Grant> I am thinking about using STk to write a user interface for a
  Grant> laboratory scale (a Sartorius LP-something, if you care).
  Grant> The scale has a serial port and implements a simple ASCII
  Grant> command/response protocol (each command or reply is
  Grant> terminated by cr/lf).
  Grant> Is there a Scheme version of the termios interface
  Grant> (tcgetattr(), tcsetattr())?  I need to be able to set baud
  Grant> rate, data bits, handshaking, etc.  It would also be nice if
  Grant> I could take advantage of the MIN and TIME settings in
  Grant> termios so that reads on the port will time out if the scale
  Grant> doesn't reply.
  Grant> I could write a C function that is called via the foriegn
  Grant> function interface, but I thought there might be something
  Grant> already done...
Received on Thu Jun 17 1999 - 19:27:57 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST