From b95eccb40d4d603131f77f609f596c3032847cb0 Mon Sep 17 00:00:00 2001 From: Paul David Date: Tue, 17 Jan 2017 18:23:56 -0500 Subject: x300: Output system messages in order for multi-threaded initialization --- host/include/uhd/utils/msg.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'host/include') 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 @@ -56,6 +56,13 @@ namespace uhd{ namespace msg{ //! Typedef for a user-registered message handler 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. @@ -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: -- cgit v1.2.3