diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/msg.hpp | 13 |
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: |