Re: [Discuss-gnuradio] Integration of python's time.time() and work() calls

2015-05-29 Thread Anil Kumar Yerrapragada
Hi Marcus, Thanks for the explanation, it is very clear. But is there a way to keep track of time elapsed across *consecutive* work calls? Like I said in the first post in this thread, if I have a sliding window based energy detect. Samples keep coming in, but at some point I will have to say, r

Re: [Discuss-gnuradio] Integration of python's time.time() and work() calls

2015-05-29 Thread Anil Kumar Yerrapragada
Hi Marcus, Thank you for your patient replies. Last question. >>Your block is asked "I'd like to ask you to produce 512 items. How much input do you need?". >>If your block then says "I need 400 items", This means that for the block to output 512 items it needs 400 items in the input. >>no matt

[Discuss-gnuradio] Question on state machine implementation in GNURadio

2015-05-30 Thread Anil Kumar Yerrapragada
Hi I was just wondering if it is possible to implement a state machine logic using GNURadio. Where each state is a block and incoming data passes through these states. I want to be able to control which block gets executed when, based on some state transition logic which I will define. For exampl

[Discuss-gnuradio] question on implementing a state machine

2015-06-08 Thread Anil Kumar Yerrapragada
Hi Please forgive me if the questions are silly/basic. I've learnt a lot from replies on this forum and I'm making steps in the right direction, if only baby ones. I am trying to implement a state machine based synchronization algorithm. The 2 states being "search for synch sequence" and "pass da

[Discuss-gnuradio] Question on tags - offsets

2015-06-18 Thread Anil Kumar Yerrapragada
Hi, A quick question on tags. I'm coding a custom block in python and my forecast function is like so: def forecast(self, noutput_items, ninput_items_required): #setup size of input_items[i] for work call for i in range(len(ninput_items_required)): ninput_items_requir

[Discuss-gnuradio] Does a block always *have* to return something?

2015-06-21 Thread Anil Kumar Yerrapragada
Will something like this in the work function be correct? self.consume(0, len(input_items[0]) if (something): return else: out[:] = in0 ** 2 #example return len(output_items[0]) ___ Discuss-gnuradio mailing list Discuss-gnuradio@g

[Discuss-gnuradio] Which type of block do I use here?

2015-05-19 Thread Anil Kumar Yerrapragada
Hi Say I want to create an energy detect block that takes a certain number of input samples, measures the (signal) power and compares it against a threshold. Only if the power exceeds the threshold, the block has to make the decision that some genuine signal is being received and then move only th

Re: [Discuss-gnuradio] Notion of buffering up input data in GNURadio

2015-05-25 Thread Anil Kumar Yerrapragada
Hi Marcus, Thanks for your reply. > So, you're writing that application and ask us how your buffering works? > that doesn't sound right, so maybe I'm misunderstanding you? My bad. What I meant to say was the block that I NEED to implement involves a fixed number of samples that I need to collect

[Discuss-gnuradio] Integration of python's time.time() and work() calls

2015-05-27 Thread Anil Kumar Yerrapragada
Hi I'm writing a custom block in python. The application goes like this: I specify the minimum number of samples I need by using the forecast function. This ensures that I have that many samples available in the in-buffer of the block every time work is called. Once I have as many samples as I ne

Re: [Discuss-gnuradio] Integration of python's time.time() and work() calls

2015-05-28 Thread Anil Kumar Yerrapragada
>>Or is there a way to make sure that the in-buffer gets updated multiple times within the same work call? Will placing the work function inside a while 1 do the trick? But I guess the issue with that is, as long as data is available, the scheduler calls work function again and again anyway. I'm

[Discuss-gnuradio] Question on number of input items per work call

2017-11-15 Thread Anil Kumar Yerrapragada
Hi all I am experimenting with my own python block. I started by simply interrogating each variable to see their types and shapes. I connected a vector source that just generates increasing numbers (0, 1, 2, 3, 4, 5 and so on upto a big number). I noticed that the length of (input_items[0]) s

Re: [Discuss-gnuradio] Question on number of input items per work call

2017-11-19 Thread Anil Kumar Yerrapragada
ogged down by too many cases / > specifics. I'd encourage you to see what you can find in that regard; GRCon > and people's blogs are always good places to learn about how GR works. > > On Wed, Nov 15, 2017, at 09:56 PM, Anil Kumar Yerrapragada wrote: > > Hi all >