discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] vector_sink read problem


From: kaleem ahmad
Subject: Re: [Discuss-gnuradio] vector_sink read problem
Date: Mon, 29 Sep 2008 08:31:50 -0700 (PDT)

OK thanks I solved the problem!!!


kaleem ahmad wrote:
> 
> Hi,
> 
> I want to implement an infinite loop which receives data (using USRP +
> RFX2400) in a vector_sink_b(). The packets are sent by a transmitter after
> every 't milliseconds'. I tried the code given at the end of paragraph.
> But it doesnt works and problem which I am facing is that it receives the
> first correct packet and then rather to wait for the next correct packet
> it keep on reading the copy of same packet (from I dont know ...may be
> from buffers??) and extending it every time with previously read data. I
> mean it do as follows > Suppose first packet contains the string : TEST.
> at first read it gets: TEST...second time TEST TEST....third time TEST
> TEST TEST and so on. I was expecting that it will receive a packet and
> will then waits for other packet? So can you please suggest me what is the
> problem and how can I solve it. 
> ------------------------------------------------------------------------------------
>         rx, vec_sink = receive()
>       rx.start()
>       while (rx.is_running):
>               rx_data = vec_sink.data()
>               if (len(rx_data) > 0):
>                         #process rx_data
>                         rx_data = ' ' #re-initilaze the receive buffer
>                      
> -----------------------------------------------------------------------------------------------------------------------------
> The following code works but it only receive one packet and then shutdowns
> the flowgraph
> -----------------------------------------------------------------------------------------------------------------------------
>         rx, vec_sink = receive()
>       rx.start()
>       flag = 1
>       while (rx.is_running and flag):
>               rx_data = vec_sink.data()
>               if (len(rx_data) > 0):
>                       #process rx_data
>                       flag = 0
>                       rx.stop()
> --------------------------------------------------------------------------
> 

-- 
View this message in context: 
http://www.nabble.com/vector_sink-read-problem-tp19722765p19726127.html
Sent from the GnuRadio mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]