USRP_Server  2.0
A flexible, GPU-accelerated radio-frequency readout software.
USRP_server_diagnostic.hpp File Reference
#include "USRP_server_settings.hpp"
#include <uhd/types/metadata.hpp>
#include <chrono>
Include dependency graph for USRP_server_diagnostic.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  stop_watch
 

Macros

#define USRP_DIAG_INCLUDED
 

Typedefs

typedef boost::log::sinks::synchronous_sink< boost::log::sinks::text_file_backend > file_sink
 Define the pointer to the logging file backend. More...
 

Functions

void set_this_thread_name (std::string thread_name)
 Set the htread name reported in the logging. More...
 
void interptet_rx_error (uhd::rx_metadata_t::error_code_t error)
 
int get_rx_errors (uhd::rx_metadata_t *metadata, bool verbose=false)
 
int get_tx_error (uhd::async_metadata_t *async_md, bool verbose=false)
 Interpret tx errors from the async usrp comunication. More...
 
void print_params (usrp_param my_parameter)
 Print parameters on the terminal in a readable way. More...
 
void init_logger ()
 initialize the logger for the server. Creates or access the folder logs. each time the server starts, creates an enumerated log file. More...
 

Variables

boost::shared_ptr< file_sinkpLogSink
 Shared pointer to the logfile writer object. More...
 

Macro Definition Documentation

◆ USRP_DIAG_INCLUDED

#define USRP_DIAG_INCLUDED

Definition at line 3 of file USRP_server_diagnostic.hpp.

Typedef Documentation

◆ file_sink

typedef boost::log::sinks::synchronous_sink< boost::log::sinks::text_file_backend > file_sink

Define the pointer to the logging file backend.

Definition at line 67 of file USRP_server_diagnostic.hpp.

Function Documentation

◆ set_this_thread_name()

void set_this_thread_name ( std::string  thread_name)

Set the htread name reported in the logging.

Definition at line 4 of file USRP_server_diagnostic.cpp.

Referenced by hardware_manager::clean_rx_queue(), Sync_server::clear_stream_queue(), preallocator< float2 >::close(), main(), Sync_server::reconnect(), Async_server::recv_async(), and TXRX::stop().

Here is the caller graph for this function:

◆ interptet_rx_error()

void interptet_rx_error ( uhd::rx_metadata_t::error_code_t  error)

Definition at line 14 of file USRP_server_diagnostic.cpp.

References print_warning().

Referenced by get_rx_errors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_rx_errors()

int get_rx_errors ( uhd::rx_metadata_t *  metadata,
bool  verbose = false 
)

Definition at line 44 of file USRP_server_diagnostic.cpp.

References interptet_rx_error(), print_error(), and print_warning().

Referenced by hardware_manager::clean_rx_queue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_tx_error()

int get_tx_error ( uhd::async_metadata_t *  async_md,
bool  verbose = false 
)

Interpret tx errors from the async usrp comunication.

Definition at line 63 of file USRP_server_diagnostic.cpp.

References print_error(), and print_warning().

Referenced by hardware_manager::clean_rx_queue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_params()

void print_params ( usrp_param  my_parameter)

Print parameters on the terminal in a readable way.

Definition at line 108 of file USRP_server_diagnostic.cpp.

References ant_mode_to_str(), print_error(), and w_type_to_str().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_logger()

void init_logger ( )

initialize the logger for the server. Creates or access the folder logs. each time the server starts, creates an enumerated log file.

Definition at line 421 of file USRP_server_diagnostic.cpp.

References pLogSink.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

◆ pLogSink

boost::shared_ptr< file_sink > pLogSink

Shared pointer to the logfile writer object.

Definition at line 418 of file USRP_server_diagnostic.cpp.

Referenced by Sync_server::clear_stream_queue(), and init_logger().