[USRP-users] check send successfully

Marcus Müller marcus.mueller at ettus.com
Mon Dec 1 10:27:03 EST 2014


Hello xdw,

>I just want to send 10 bursts,then stop the program,for example.

That is definitely a question of writing basic C++ code, which I cannot
really explain to you. There are plenty nice C++ guides out there!
You could, for example, have a counter variable, that you reduce by 1
every iteration (ie. every burst), and check for that variable being > 0
in the while() condition.

Best regards,
Marcus Müller


On 12/01/2014 04:22 PM, w xd wrote:
> Hi Marcus:
>                 Thank you a lot.I just means that.
>                 But in this case("they will be sent when as soon as the
> time comes),how to stop it in our design program?
> For example,the tx_burst.cpp.I just want to send 10 bursts,then stop the
> program,for example.
> Best regards,
> xdw
>
> 2014-12-01 22:36 GMT+08:00 Marcus Müller <marcus.mueller at ettus.com>:
>
>> Hi xdw,
>>
>> I think I understood you correctly. If you successfully transmitted the
>> time-stamped samples to the USRP, they will be sent when as soon as the
>> time comes.
>> You shouldn't have to care about whether the USRP sends the signal; it's
>> designed to do that, and unless you do something drastic, that *will*
>> happen.
>>
>> Best regards,
>> Marcus
>>
>> On 12/01/2014 03:34 PM, w xd wrote:
>>> Hi Müller:
>>>              Thank you.Maybe you haven't catch my problems.Because the
>>> signal i want to send will be send in the future.But the software will be
>>> run when i run it.When the software has been run,but the signal maybe
>>> haven't send.It will be send in the future.So the software isn't
>>> synchronized with the usrp.I can't know how to judge when the signal
>> send.
>>>              Maybe my describe have a little confusing.Sorry for that.
>>> Best regards,
>>> xdw
>>>
>>> 2014-12-01 22:26 GMT+08:00 Marcus Müller <marcus.mueller at ettus.com>:
>>>
>>>> Hi w xd/xdw/xd/Xianda,
>>>>
>>>> If you were able to transmit the samples to your USRP, then they will be
>>>> sent.
>>>>
>>>> I don't understand your second question; are you asking us how to
>>>> terminate a C++ while loop?
>>>>
>>>> Best regards,
>>>> Marcus Müller
>>>>
>>>>
>>>> On 12/01/2014 03:17 PM, w xd wrote:
>>>>> Hi Müller:
>>>>>               Thank you.
>>>>>               Because the signal  is send in the future.It has been
>>>>> described by metadata.It haven't send now.For example,I set a counter
>> in
>>>>> the loop.The counter have already reach some number.But the signal now
>>>>> haven't send.
>>>>>              counter=1
>>>>>              Do:
>>>>>                      1.send a frame
>>>>>                      2.counter++;
>>>>>              while(...);
>>>>> For example,when counter=15.But it haven't send 15 times.Because it
>> send
>>>> in
>>>>> the future.
>>>>>             Another question:how to stop the loop?When i set
>>>>> while(counter<=15),it stop fastly.And it haven't send.I have read the
>>>>> example:tx_burst.cpp.And it set: while (not stop_signal_called and
>>>>> repeat);Now i just want the program send 15 times.
>>>>> Best regards,
>>>>> xdw
>>>>>
>>>>> 2014-12-01 22:04 GMT+08:00 Marcus Müller <usrp-users at lists.ettus.com>:
>>>>>
>>>>>>  Hi xdw,
>>>>>>
>>>>>> what do you mean with "check send successfully"?
>>>>>> usually, unless your send() call says something went wrong (ie. the
>>>> number
>>>>>> it returns isn't the number of samples you wanted to send), it should
>>>> have
>>>>>> been successfull.
>>>>>>
>>>>>> Could you explain in a little more depth what you are trying to do and
>>>>>> which problems you encounter?
>>>>>>
>>>>>> Best regards,
>>>>>> Marcus Müller
>>>>>>
>>>>>>
>>>>>> On 12/01/2014 04:01 AM, w xd via USRP-users wrote:
>>>>>>
>>>>>> Hi all:
>>>>>>          I just want to realize the following function,but i don't
>> know
>>>> how
>>>>>> to check the usrp send successfully.
>>>>>>         Loop:
>>>>>>                 1.send a frame--->sending a timed burst
>>>>>>                 2.after send successfully--->tcpip accept and receive
>>>>>>
>>>>>>         The above repeated.Can someone have some ideas?
>>>>>> Thank you.
>>>>>> Best regards,
>>>>>> xdw
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> USRP-users mailing listUSRP-users at lists.ettus.comhttp://
>>>> lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>>>>>
>>>>>> _______________________________________________
>>>>>> USRP-users mailing list
>>>>>> USRP-users at lists.ettus.com
>>>>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>>>>>
>>>>>>
>>





More information about the USRP-users mailing list