2 #ifndef USRP_DIAG_INCLUDED 3 #define USRP_DIAG_INCLUDED 6 #include <uhd/types/metadata.hpp> 15 int get_rx_errors(uhd::rx_metadata_t *metadata,
bool verbose =
false);
18 int get_tx_error(uhd::async_metadata_t *async_md,
bool verbose =
false);
25 typedef std::chrono::high_resolution_clock Time;
26 typedef std::chrono::duration<double> dsec;
50 boost::chrono::high_resolution_clock::time_point start_t;
52 double elapsed_time = 0;
54 double total_time = 0;
56 std::vector<double> acc;
67 typedef boost::log::sinks::synchronous_sink< boost::log::sinks::text_file_backend >
file_sink;
70 extern boost::shared_ptr< file_sink >
pLogSink;
void set_this_thread_name(std::string thread_name)
Set the htread name reported in the logging.
int get_rx_errors(uhd::rx_metadata_t *metadata, bool verbose=false)
void interptet_rx_error(uhd::rx_metadata_t::error_code_t error)
int get_tx_error(uhd::async_metadata_t *async_md, bool verbose=false)
Interpret tx errors from the async usrp comunication.
void init_logger()
initialize the logger for the server. Creates or access the folder logs. each time the server starts...
boost::log::sinks::synchronous_sink< boost::log::sinks::text_file_backend > file_sink
Define the pointer to the logging file backend.
void print_params(usrp_param my_parameter)
Print parameters on the terminal in a readable way.
boost::shared_ptr< file_sink > pLogSink
Shared pointer to the logfile writer object.