On Sun, 30 Jan 2000, Andrew Hooper wrote:

> Im reading the encoder via a module, I need this to communicate to the user
> application, i have setup a fifo for this but the data in the fifo is not over 
>written
> and when i read it it starts at the top rather than giving the current count of 
> the encoder.

FIFO is a pipe - it accumulates data, you need to read all to get to the
bottom. For your application you could better use shared memory. See the
mbuff module and the MANUAL file.

> Do i have to destroy the fifo then rebuild and write the data to it?, or is
> there another way of doing it.

Just read all pending data.

> 
> Also i need to make the user application talk to the module and tell it how
> many encoder pulses to wait before sending a signal to the user

Probably also task for shared memory. Just declare one big structure with all
the parameters you want to share and keep it in shared memory, accessing
through the pointer to the structure.

http://crds.chemie.unibas.ch/PCI-MIO-E/pcontrol-0.4.2.tar.gz
is a set of 3 applications (one RT trigger generator, 1 user space deamon
reading A/D card and tcl/tk interface for controlling the parameters). It
has not been approved by FDA, but you can get a few ideas from there.

Best regards,
--
Tomek

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to