aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorPaul David <paul.david@ettus.com>2017-01-17 18:23:56 -0500
committerMartin Braun <martin.braun@ettus.com>2017-01-19 18:26:35 -0800
commitb95eccb40d4d603131f77f609f596c3032847cb0 (patch)
tree5623c50eafc7c62c98b2a0f8644ca10ea9b3e489 /host/include
parent157b17049f2ffe407183900954f56b103eb710fb (diff)
downloaduhd-b95eccb40d4d603131f77f609f596c3032847cb0.tar.gz
uhd-b95eccb40d4d603131f77f609f596c3032847cb0.tar.bz2
uhd-b95eccb40d4d603131f77f609f596c3032847cb0.zip
x300: Output system messages in order for multi-threaded initialization
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/msg.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/host/include/uhd/utils/msg.hpp b/host/include/uhd/utils/msg.hpp
index 2cc5893e7..48ffb28a1 100644
--- a/host/include/uhd/utils/msg.hpp
+++ b/host/include/uhd/utils/msg.hpp
@@ -57,6 +57,13 @@ namespace uhd{ namespace msg{
typedef void (*handler_t)(type_t, const std::string &);
/*!
+ * Default message handler for printing uhd system messages
+ * \param type message type, such as status, warning, or error
+ * \param msg contents of the system message as a string
+ */
+ void default_msg_handler(type_t type, const std::string &msg);
+
+ /*!
* Register the handler for uhd system messages.
* Only one handler can be registered at once.
* This replaces the default std::cout/cerr handler.
@@ -64,6 +71,12 @@ namespace uhd{ namespace msg{
*/
UHD_API void register_handler(const handler_t &handler);
+ /*!
+ * Returns the current message handler for uhd system messages
+ * \returns the current message handler
+ */
+ UHD_API const handler_t& get_handler();
+
//! Internal message object (called by UHD_MSG macro)
class UHD_API _msg{
public: