discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Reconfiguring Flowgraphs


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Reconfiguring Flowgraphs
Date: Fri, 25 Jul 2014 11:40:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Xianda,
my advice: Please try to draw a complete picture of what you are doing.
What are your sources, blocks you interchange, your sinks, what do you
do to make your flowgraph stop (under which circumstances)? I really
can't read your mind; all I know about your flow graph is what you tell
me, which is that you have 1 source, and two in-and-output blocks and
two sinks, and that you first connect src - blk1 - sink1 and then src -
blk2 - sink2.

You omitted that it is a USRP source until you send an excerpt of your
code, you omit what kind of blocks blk{1,2} and what kind of sinks
sink{1,2} are. You don't tell me in what relationship your "new"
flowgraph stands to your reconfigured one etc.

It's like you expect me to guess what you are doing in my own time to
try to help you, just to save you from revealing what you are doing.
This won't work.
Please explain, in whole, what you're trying to do, what you have tried
to verify that it goes wrong, which problems you encountered and so on,
and we, as a list, might be able to figure out what's going on.

Greetings,
Marcus


On 25.07.2014 11:32, xianda wrote:
> Hi Marcus:
>                 Thank you so much.Do you indicate my new flowgraph had run?I 
> have add a file sink,but it is null.And I think it don't run.I don't know 
> why.Can you give me some advices?Thank you so much.
> Best regards,
> xd
>
>
>
>
>
>
>
>
> At 2014-07-25 05:27:28, "Marcus Müller" <address@hidden> wrote:
>> Hi xianda,
>>
>> tb.wait() does exactly what you said it does: Wait for the flow graph to
>> complete.A flowgraph will run until one of the blocks in that flowgraph
>> signal that they're done, or you call tb.stop().
>> If you don't have such a block, your tb will run forever, and wait()
>> will never return.
>>
>> Greetings,
>> Marcus
>>
>>
>> On 25.07.2014 11:13, xianda wrote:
>>> Hi Marcus:
>>>                 Thank you for your reply.Sorry for that if you can't 
>>> understand.I will try my best to explain my question.
>>>
>>>  def main():
>>>             tb=my_top_block()
>>>             tb.start()
>>>             time.sleep(30)
>>>
>>>             #stop flowgraph
>>>             tb.lock()
>>>             tb.disconnect((tb.uhd_usrp_source_0,0),(tb.rx_0,0))
>>>                 tb.disconnct((tb.rx_0,0),tb.snk1)
>>>                  #start flowgraph
>>>             tb.connect((tb.uhd_usrp_source_0,0),(tb.rx_1,0))
>>>             tb.connect((tb.rx_1,0),tb.snk)
>>>                  #  blockA:(tb.rx_0,0)    blockB:(tb.rx_1,0)        
>>>                  tb.unlock()
>>>              tb.wait()
>>>                  print "start"
>>>
>>> I want to disconnct flow graph, and then to start a new connect.My code 
>>> hang in tb.wait(),it can't go on.I add print "start" and it can't display 
>>> "start".Sorry for my poor english if you can't understand.
>>>                 Thank you so much.
>>> Best regards,
>>> xd
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> At 2014-07-25 04:59:52, "Marcus Müller" <address@hidden> wrote:
>>>> Hi Xianda,
>>>>
>>>> as usual, saying "doesn't work", "can't run", "behaves wrong" really
>>>> gives no clue what's wrong.
>>>> Please follow
>>>> http://gnuradio.org/redmine/projects/gnuradio/wiki/ReportingErrors ,
>>>> especially "How do I ask?".
>>>>
>>>> Greetings,
>>>> Marcus
>>>>
>>>> On 25.07.2014 09:36, xianda wrote:
>>>>> Hi Marcus:
>>>>>                     Thank you so much for your kindly reply. And I 
>>>>> disconnect block A and sink 1.
>>>>>
>>>>> def main():
>>>>>           tb=my_top_block()
>>>>>           tb.start()
>>>>>           time.sleep(30)
>>>>>
>>>>>           #stop flowgraph
>>>>>           tb.lock()
>>>>>           tb.disconnect((tb.uhd_usrp_source_0,0),(tb.rx_0,0))
>>>>>                 tb.disconnct((tb.rx_0,0),tb.snk1)
>>>>>                  #start flowgraph
>>>>>           tb.connect((tb.uhd_usrp_source_0,0),(tb.rx_1,0))
>>>>>           tb.connect((tb.rx_1,0),tb.snk)
>>>>>                 #  blockA:(tb.rx_0,0)    blockB:(tb.rx_1,0)       
>>>>>                 tb.unlock()
>>>>>
>>>>>           tb.wait()
>>>>> And It can run.But new problem exists.My new flowgraph:
>>>>>
>>>>>  source--->block B(just one block)--->sink2
>>>>> can't run(I have already tested my new flowgraph alone,it's normal.But 
>>>>> after reconfiguring flowgraph,it can't run normally. ).I think it's 
>>>>> blocking because of the tb.wait().I know the wait is a blocking call that 
>>>>> sits there and waits for the flowgraph to finish.I just want my new 
>>>>> flowgraph run.Thank you.
>>>>> Best regards,
>>>>> xd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> At 2014-07-21 08:06:52, "Marcus Müller" <address@hidden> wrote:
>>>>> unless you also disconnect block A and sink1, GNU Radio will continue to 
>>>>> assume that block A should produce output for sink1, and it can't do that 
>>>>> without input.
>>>>>
>>>>> Greetings,
>>>>> Marcus
>>>>>
>>>>> On 21.07.2014 13:43, xianda wrote:
>>>>>
>>>>> I forget to say:the "sink" also different with each other.Namely:
>>>>>                         source--->block A(just one block)--->sink1
>>>>>                         source--->block B(just one block)--->sink2
>>>>> Can someone help me?Thanks.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> At 2014-07-21 06:50:10, "xianda" <address@hidden> wrote:
>>>>>
>>>>> Hi all:
>>>>>          Thank you in advance.I want to ask some questions about the 
>>>>> "Reconfiguring Flowgraphs".
>>>>>          My flowgraphs:
>>>>>                                   source--->block A(just one 
>>>>> block)--->sink
>>>>> And I want to run the flowgraphs for 30 seconds,and then run the other 
>>>>> flowgraphs:
>>>>>                                    source--->block B(just one 
>>>>> block)--->sink
>>>>> And I have read the API,and then I write something like this:
>>>>>
>>>>> def main():
>>>>>           tb=my_top_block()
>>>>>           tb.start()
>>>>>           time.sleep(30)
>>>>>
>>>>>           #stop flowgraph
>>>>>           tb.lock()
>>>>>           tb.disconnect((tb.uhd_usrp_source_0,0),(tb.rx_0,0))
>>>>>
>>>>>           #start flowgraph
>>>>>           tb.connect((tb.uhd_usrp_source_0,0),(tb.rx_1,0))
>>>>>           tb.connect((tb.rx_1,0),tb.snk)
>>>>>                 #  blockA:(tb.rx_0,0)    blockB:(tb.rx_1,0)       
>>>>>                 tb.unlock()
>>>>>
>>>>>           tb.wait()
>>>>> But it go error:    RuntimeError: delay(4): insufficient connected input 
>>>>> ports (1 needed, 0 connected)
>>>>> Can someone help me?Thank you.
>>>>> Best regards,
>>>>> xd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Discuss-gnuradio mailing list
>>>>> address@hidden://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>>>




reply via email to

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