ts-7000
[Top] [All Lists]

[ts-7000] Re: Flushing an RX buffer.

To:
Subject: [ts-7000] Re: Flushing an RX buffer.
From: "Jon L" <>
Date: Thu, 31 Dec 2009 17:18:18 -0000

--- In  "Jon L" <> wrote:
>
> Ok, I finally got an RS232 uart to work properly on the TS-7500 (the fpga 
> program needed to be upgraded to revision x03) 
> 
> but whats interesting is the RX buffer of the uart fills so long as data is 
> coming in and queues up.  
> 
> So what is the best way to dump this data for the freshest?   For example say 
> I have a GPS hooked up to a uart, and its constantly spewing  data which I 
> don't care about.  Now say all of a sudden I want the next gps data;  I don't 
> want wade through the entire /dev/gpsuart file to get to the last data; I 
> want to be able to reset /dev/gpsuart, and have it fill fresh when I want it. 
>  
> 
> Any ideas?  
> 
> 
> 
> Also what happens if I ignore the Gps data for a loooong time, what is the 
> buffer limit on the /dev/gpsuart as set up by 
> 
> xuartctl ???
>


ok, I hooked up my GPS to the /dev/gpsuart and it receives the data just fine, 
but the problem is the queueing of the data. 

If I ignore the RX for minutes, the buffer fills to around 12,285 bytes (any 
Idea the significance of this amount?)  That is fine but if I dump the buffer 
with say "cat /dev/gpsuart >/dev/null" It seems that I just get the next 
section of gps data.  There is still a hidden queue of the data somewhere 
queuing up rather than dumping on the floor.  

I tried "tail /dev/gpsuart" but that only gives me the "tail" of the 12,285 
section.  I was hoping that tail would move the pointer to the end of 
everything. The only thing I've gotten to work so far is if I:

"tail -f /dev/gpsuart" then wait xxx seconds until I see the data streaming 
(much slower than the regular tail to screen) and I know I'm tailing the 
current data coming in.  

This is not a good way to do this as that "wait xxx seconds" is not guaranteed 
to empty and I don't know how to even calculate the xxx, or how to program 
"wait until I seed the data streaming" 

I'm also concerned about where all this data is being stored, I mean what if I 
don't get to tail -f for days?  is this going to grow forever?



any ideas?  





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU