i am working on a similar project to you guys. The program checks a real
time buffer periodically, every second, for serial input data. rt_com
functions read the data in real time and store it to a real time buffer
which is big enough to accomodate a few packets in the occasion that the
buffer is not read by the user functions. I am hoping that serial input
data is not lost when the program is busy in the user space storing the
older data. I basically mixed Michael's frank example and Jochen's
testcom.c to come up with this.
I am still working on the storage of the data in the user space. i was
going to post it to the newsgroup when its done. but i'd be happy to
send you a copy if you think it is going to be of any help.
please drop me a line if you are interested.
emeel noohi
[EMAIL PROTECTED]
eric wrote:
>
> Adi Sudewa wrote:
> >
> > Hi all,
> >
> > In my application, I build a kind of real-time server that handle requests
> > from serial port. I use rt_com_read() function from rt_com package.
> >
> > The current implementation of rt_com_read() is non-blocking and return
> > immediately when no data available at serial port. So, my task must
> > periodically check if any data available.
> >
> > I wonder if I can use interrupt that notify my task to continue only if
> > data available at serial port, and still use rt_com_read() to read data.
> > Is it possible to do this ? Have anyone do this before ?
>
> I have a similar application which i am going to have to get working by
> next
> week or never show my face around here again:) My plan is as follows:
> There is
> a fake interrupt routine in the rt_com package that then calls the real
> interrupt
> routine. I plan to modify the fake interrupt routine to wake up my
> thread when
> more data appears. Thus instead of doing a blocking read, i will just
> do a wait
> in my thread when i want more data and then
> pthread_kill(thread_to_wakeup,RTL_SIGNAL_WAKEUP).
> Then you can call rt_com_read() from the thread.
>
> As i'm writing this i realize i am in trouble:)
> eric
> -- [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/
-- [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/