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 49 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 59 of file RemoteContext.hpp.

64 : m_process( pc ),
65 m_package_name( package ),
69 { ; }
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
int line_number() const

◆ ~RemoteContext()

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

Definition at line 71 of file RemoteContext.hpp.

72 { ; }

Member Function Documentation

◆ application_name()

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

<

Returns
application name

Implements ers::Context.

Definition at line 113 of file RemoteContext.hpp.

114 { 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 74 of file RemoteContext.hpp.

75 { 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 77 of file RemoteContext.hpp.

78 { 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 80 of file RemoteContext.hpp.

81 { 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 83 of file RemoteContext.hpp.

84 { 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 86 of file RemoteContext.hpp.

87 { return m_process.m_host_name.c_str(); }
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 89 of file RemoteContext.hpp.

90 { return m_line_number; }

◆ package_name()

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

<

Returns
CMT package name

Implements ers::Context.

Definition at line 92 of file RemoteContext.hpp.

93 { 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 95 of file RemoteContext.hpp.

96 { 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 104 of file RemoteContext.hpp.

105 { return 0; }

◆ stack_symbols()

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

<

Returns
stack frames

Implements ers::Context.

Definition at line 101 of file RemoteContext.hpp.

102 { return 0; }

◆ thread_id()

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

<

Returns
thread id

Implements ers::Context.

Definition at line 98 of file RemoteContext.hpp.

99 { return m_process.m_tid; }

◆ user_id()

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

<

Returns
user id

Implements ers::Context.

Definition at line 107 of file RemoteContext.hpp.

108 { return m_process.m_uid; }

◆ user_name()

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

<

Returns
user name

Implements ers::Context.

Definition at line 110 of file RemoteContext.hpp.

111 { 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 119 of file RemoteContext.hpp.

◆ m_function_name

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

source function name

Definition at line 120 of file RemoteContext.hpp.

◆ m_line_number

const int ers::RemoteContext::m_line_number
private

source line number

Definition at line 121 of file RemoteContext.hpp.

◆ m_package_name

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

source package name

Definition at line 118 of file RemoteContext.hpp.

◆ m_process

const RemoteProcessContext ers::RemoteContext::m_process
private

process information

Definition at line 117 of file RemoteContext.hpp.


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