Martin Schacher wrote:
> 
> Hi
> i'm programming a PID-controller in RTLinux.
> Now my problem is that i have about 10 diffrent Variables that changes
> with every step of controlling. I's it a good idea to store the
> Variables in a Fifo before leaving the RT Task and restore them at the
> begin of the RT Task ? For the first initialisation i tought i can write
> the start values from the Linux app in the Fifo, so the RT Task get
> these values for the first step of controlling.
> 
> That do you think about it ?

I think the "good way" would be to implement an ioctl-function
within the standard-kernel side of the module.

Then you could have something like this in your controlling
application:


struct my_variables {
  int x,y,z
} myvar = {1,2,3};

int fd=open("/dev/mypid",O_RDRW);
ioctl(fd,PUTVARS,&myvar);
ioctl(fd,STARTPID,0);

/* wait until user decides to end task */

ioctl(fd,STOPPID,0);
ioctl(fd,GETVARS,&myvar);
close(fd);

comments?
--- [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