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 Contextclone () 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 60 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 ),
80 { ; }
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 82 of file RemoteContext.hpp.

83 { ; }

Member Function Documentation

◆ application_name()

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

<

Returns
application name

Implements ers::Context.

Definition at line 124 of file RemoteContext.hpp.

125 { return m_process.m_app_name.c_str(); }

◆ clone()

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

<

Returns
copy of the current context

Implements ers::Context.

Definition at line 85 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.

89 { 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 91 of file RemoteContext.hpp.

92 { 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 94 of file RemoteContext.hpp.

95 { return m_function_name.c_str(); }

◆ 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 { return m_process.m_host_name.c_str(); }

◆ 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 100 of file RemoteContext.hpp.

101 { return m_line_number; }

◆ package_name()

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

<

Returns
CMT package name

Implements ers::Context.

Definition at line 103 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.

107 { 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 115 of file RemoteContext.hpp.

116 { return 0; }

◆ stack_symbols()

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

<

Returns
stack frames

Implements ers::Context.

Definition at line 112 of file RemoteContext.hpp.

113 { return 0; }

◆ thread_id()

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

<

Returns
thread id

Implements ers::Context.

Definition at line 109 of file RemoteContext.hpp.

110 { return m_process.m_tid; }

◆ user_id()

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

<

Returns
user id

Implements ers::Context.

Definition at line 118 of file RemoteContext.hpp.

119 { return m_process.m_uid; }

◆ user_name()

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

<

Returns
user name

Implements ers::Context.

Definition at line 121 of file RemoteContext.hpp.

122 { return m_process.m_uname.c_str(); }

Member Data Documentation

◆ m_file_name

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

source file name

Definition at line 130 of file RemoteContext.hpp.

◆ m_function_name

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

source function name

Definition at line 131 of file RemoteContext.hpp.

◆ m_line_number

const int ers::RemoteContext::m_line_number
private

source line number

Definition at line 132 of file RemoteContext.hpp.

◆ m_package_name

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

source package name

Definition at line 129 of file RemoteContext.hpp.

◆ m_process

const RemoteProcessContext ers::RemoteContext::m_process
private

process information

Definition at line 128 of file RemoteContext.hpp.


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