|
From: | Koslowski, Sebastian (CEL) |
Subject: | Re: [Discuss-gnuradio] Suppressing UHD prints |
Date: | Thu, 2 Jul 2015 17:06:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 07/01/2015 10:19 AM, Piotr Krysik
wrote:
Hi all, UHD host library generates prints on the stdout. For example on each retune I get something like: -- Tune Request: 959.000000 MHz -- The RF LO does not support the requested frequency: -- Requested LO Frequency: 959.000000 MHz -- RF LO Result: 958.998779 MHz -- Attempted to use the DSP to reach the requested frequency: -- Desired DSP Frequency: -0.001221 MHz -- DSP Result: -0.001221 MHz -- Successfully tuned to 959.000000 MHzThese prints are sometimes cluttering the console - especially when someone wants to use console to print other useful information. There is possibility to disable them in UHD from the level of C++: http://files.ettus.com/manual/page_general.html ("Disabling or redirecting prints to stdout") Is it possible to disable the prints from GNU Radio? I had looked into that some time ago. In the current form it is not possible. Even if ' uhd::msg::register_handler' would be exposed to python, you still can't drop-in your own null-handler. Swig doesn't support callbacks in the target language (python). However, you can add custom handlers like a null_handler in C++ and then use that. Try the attached patch. Works for me. Only output left is that standard version_string. Sebastian |
0001-uhd-add-null-msg-handler-and-expose-to-python.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |