aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-04-10 13:06:52 -0700
committerBen Hilburn <ben.hilburn@ettus.com>2014-04-10 13:06:52 -0700
commitdd07f5b40c822febde400cec817f7e8eddf860f2 (patch)
tree3120ebb0b6b4e76c5dd33e2db3b5def2de410b2d /host/include
parentd3459ad697b4c38354731eb6e6fc1075b194d5ea (diff)
parent853901782f07b62bf774551c344a65606e545a4f (diff)
downloaduhd-dd07f5b40c822febde400cec817f7e8eddf860f2.tar.gz
uhd-dd07f5b40c822febde400cec817f7e8eddf860f2.tar.bz2
uhd-dd07f5b40c822febde400cec817f7e8eddf860f2.zip
Merge branch 'origin/uhd/issue_294_errcode'
Convert numeric errors to PP strings that are actually useful.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/types/metadata.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/host/include/uhd/types/metadata.hpp b/host/include/uhd/types/metadata.hpp
index 6a79720d0..51a2b7c43 100644
--- a/host/include/uhd/types/metadata.hpp
+++ b/host/include/uhd/types/metadata.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2012 Ettus Research LLC
+// Copyright 2010-2012,2014 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -117,6 +117,20 @@ namespace uhd{
//! Out of sequence. The transport has either dropped a packet or received data out of order.
bool out_of_sequence;
+
+ /*!
+ * Convert a rx_metadata_t into a pretty print string.
+ *
+ * \param compact Set to false for a more verbose output.
+ * \return a printable string representing the metadata.
+ */
+ std::string to_pp_string(bool compact=true) const;
+
+ /*!
+ * Similar to C's strerror() function, creates a std::string describing the error code.
+ * \return a printable string representing the error.
+ */
+ std::string strerror(void) const;
};
/*!