DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ers::RemoteContext Class Reference

#include <RemoteContext.hpp>

Inheritance diagram for ers::RemoteContext:
[legend]
Collaboration diagram for ers::RemoteContext:
[legend]

Public Member Functions

 RemoteContext (const std::string &package, const std::string &filename, int line_number, const std::string &function_name, const RemoteProcessContext &pc)
virtual ~RemoteContext ()
virtual Context * clone () const
const char * cwd () const
const char * file_name () const
const char * function_name () const
const char * host_name () const
int line_number () const
const char * package_name () const
pid_t process_id () const
pid_t thread_id () const
void *const * stack_symbols () const
int stack_size () const
int user_id () const
const char * user_name () const
const char * application_name () const
Public Member Functions inherited from ers::Context
virtual ~Context ()
std::string position (int verbosity=ers::Configuration::instance().verbosity_level()) const
std::vector< std::string > stack () const

Private Attributes

const RemoteProcessContext m_process
const std::string m_package_name
const std::string m_file_name
const std::string m_function_name
const int m_line_number

Detailed Description

Definition at line 61 of file RemoteContext.hpp.

Constructor & Destructor Documentation

◆ RemoteContext()

ers::RemoteContext::RemoteContext ( const std::string & package,
const std::string & filename,
int line_number,
const std::string & function_name,
const RemoteProcessContext & pc )
inline

creates a new instance of a context for an Issue that has been originated from another process.

Parameters
package_namename of the sw package
filenamename of the source code file
line_numberline_number in the source code
function_namename of the function

Definition at line 70 of file RemoteContext.hpp.

75 : m_process(pc)
76 , m_package_name(package)
77 , m_file_name(filename)
80 {
81 ;
82 }
const char * function_name() const
const std::string m_package_name
const RemoteProcessContext m_process
const std::string m_function_name
const std::string m_file_name

◆ ~RemoteContext()

virtual ers::RemoteContext::~RemoteContext ( )
inlinevirtual

Definition at line 84 of file RemoteContext.hpp.

84{ ; }

Member Function Documentation

◆ application_name()

const char * ers::RemoteContext::application_name ( ) const
inlinevirtual

<

Returns
application name

Implements ers::Context.

Definition at line 118 of file RemoteContext.hpp.

118{ return m_process.m_app_name.c_str(); }
const std::string m_app_name

◆ clone()

virtual Context * ers::RemoteContext::clone ( ) const
inlinevirtual

<

Returns
copy of the current context

Implements ers::Context.

Definition at line 86 of file RemoteContext.hpp.

86{ return new RemoteContext(*this); }
RemoteContext(const std::string &package, const std::string &filename, int line_number, const std::string &function_name, const RemoteProcessContext &pc)

◆ cwd()

const char * ers::RemoteContext::cwd ( ) const
inlinevirtual

<

Returns
current working directory of the process

Implements ers::Context.

Definition at line 88 of file RemoteContext.hpp.

88{ return m_process.m_cwd.c_str(); }

◆ file_name()

const char * ers::RemoteContext::file_name ( ) const
inlinevirtual

<

Returns
name of the file which created the issue

Implements ers::Context.

Definition at line 90 of file RemoteContext.hpp.

90{ return m_file_name.c_str(); }

◆ function_name()

const char * ers::RemoteContext::function_name ( ) const
inlinevirtual

<

Returns
name of the function which created the issue

Implements ers::Context.

Definition at line 92 of file RemoteContext.hpp.

93 {
94 return m_function_name.c_str();
95 }

◆ host_name()

const char * ers::RemoteContext::host_name ( ) const
inlinevirtual

<

Returns
host where the process is running

Implements ers::Context.

Definition at line 97 of file RemoteContext.hpp.

98 {
99 return m_process.m_host_name.c_str();
100 }
const std::string m_host_name

◆ line_number()

int ers::RemoteContext::line_number ( ) const
inlinevirtual

<

Returns
line number, in which the issue has been created

Implements ers::Context.

Definition at line 102 of file RemoteContext.hpp.

102{ return m_line_number; }

◆ package_name()

const char * ers::RemoteContext::package_name ( ) const
inlinevirtual

<

Returns
CMT package name

Implements ers::Context.

Definition at line 104 of file RemoteContext.hpp.

104{ return m_package_name.c_str(); }

◆ process_id()

pid_t ers::RemoteContext::process_id ( ) const
inlinevirtual

<

Returns
process id

Implements ers::Context.

Definition at line 106 of file RemoteContext.hpp.

106{ return m_process.m_pid; }

◆ stack_size()

int ers::RemoteContext::stack_size ( ) const
inlinevirtual

<

Returns
number of frames in stack

Implements ers::Context.

Definition at line 112 of file RemoteContext.hpp.

112{ return 0; }

◆ stack_symbols()

void *const * ers::RemoteContext::stack_symbols ( ) const
inlinevirtual

<

Returns
stack frames

Implements ers::Context.

Definition at line 110 of file RemoteContext.hpp.

110{ return 0; }

◆ thread_id()

pid_t ers::RemoteContext::thread_id ( ) const
inlinevirtual

<

Returns
thread id

Implements ers::Context.

Definition at line 108 of file RemoteContext.hpp.

108{ return m_process.m_tid; }

◆ user_id()

int ers::RemoteContext::user_id ( ) const
inlinevirtual

<

Returns
user id

Implements ers::Context.

Definition at line 114 of file RemoteContext.hpp.

114{ return m_process.m_uid; }

◆ user_name()

const char * ers::RemoteContext::user_name ( ) const
inlinevirtual

<

Returns
user name

Implements ers::Context.

Definition at line 116 of file RemoteContext.hpp.

116{ return m_process.m_uname.c_str(); }
const std::string m_uname

Member Data Documentation

◆ m_file_name

const std::string ers::RemoteContext::m_file_name
private

source file name

Definition at line 123 of file RemoteContext.hpp.

◆ m_function_name

const std::string ers::RemoteContext::m_function_name
private

source function name

Definition at line 124 of file RemoteContext.hpp.

◆ m_line_number

const int ers::RemoteContext::m_line_number
private

source line number

Definition at line 125 of file RemoteContext.hpp.

◆ m_package_name

const std::string ers::RemoteContext::m_package_name
private

source package name

Definition at line 122 of file RemoteContext.hpp.

◆ m_process

const RemoteProcessContext ers::RemoteContext::m_process
private

process information

Definition at line 121 of file RemoteContext.hpp.


The documentation for this class was generated from the following file: