OpenCSD - CoreSight Trace Decode Library  1.3.3
Public Member Functions | Static Public Member Functions | List of all members

#include <ocsd_error.h>

Public Member Functions

 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code)
 
 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code, const ocsd_trc_index_t idx)
 
 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code, const ocsd_trc_index_t idx, const uint8_t chan_id)
 
 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code, const std::string &msg)
 
 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code, const ocsd_trc_index_t idx, const std::string &msg)
 
 ocsdError (const ocsd_err_severity_t sev_type, const ocsd_err_t code, const ocsd_trc_index_t idx, const uint8_t chan_id, const std::string &msg)
 
 ocsdError (const ocsdError *pError)
 
 ocsdError (const ocsdError &Error)
 
 ~ocsdError ()
 
void setMessage (const std::string &msg)
 
const std::string & getMessage () const
 
const ocsd_err_t getErrorCode () const
 
const ocsd_err_severity_t getErrorSeverity () const
 
const ocsd_trc_index_t getErrorIndex () const
 
const uint8_t getErrorChanID () const
 
ocsdErroroperator= (const ocsdError *p_err)
 
ocsdErroroperator= (const ocsdError &err)
 

Static Public Member Functions

static const std::string getErrorString (const ocsdError &error)
 

Detailed Description

This class is the error object for the Ocsd.

Errors are created with a severity (ocsd_err_severity_t) and a standard ocsd_err_t error code. Errors can optionally be created with a trace index (offset from start of capture buffer), and trace CoreSight source channel ID.

A custom error message can be appended to the error.

The ocsdError class contains a static function to output a formatted string representation of an error.

Definition at line 58 of file ocsd_error.h.

Constructor & Destructor Documentation

◆ ocsdError() [1/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code 
)

Default error constructor with severity and error code.

◆ ocsdError() [2/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code,
const ocsd_trc_index_t  idx 
)

Constructor with optional trace index.

◆ ocsdError() [3/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code,
const ocsd_trc_index_t  idx,
const uint8_t  chan_id 
)

Constructor with optional trace index and channel ID.

◆ ocsdError() [4/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code,
const std::string &  msg 
)

Default error constructor with severity and error code - plus message.

◆ ocsdError() [5/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code,
const ocsd_trc_index_t  idx,
const std::string &  msg 
)

Constructor with optional trace index - plus message.

◆ ocsdError() [6/8]

ocsdError::ocsdError ( const ocsd_err_severity_t  sev_type,
const ocsd_err_t  code,
const ocsd_trc_index_t  idx,
const uint8_t  chan_id,
const std::string &  msg 
)

Constructor with optional trace index and channel ID - plus message.

◆ ocsdError() [7/8]

ocsdError::ocsdError ( const ocsdError pError)

Copy constructor

◆ ocsdError() [8/8]

ocsdError::ocsdError ( const ocsdError Error)

Copy constructor

◆ ~ocsdError()

ocsdError::~ocsdError ( )

Destructor

Member Function Documentation

◆ getErrorChanID()

const uint8_t ocsdError::getErrorChanID ( ) const
inline

Get trace index associated with the error.

Definition at line 80 of file ocsd_error.h.

Here is the caller graph for this function:

◆ getErrorCode()

const ocsd_err_t ocsdError::getErrorCode ( ) const
inline

Get custom error message

Definition at line 77 of file ocsd_error.h.

Here is the caller graph for this function:

◆ getErrorIndex()

const ocsd_trc_index_t ocsdError::getErrorIndex ( ) const
inline

Get error severity.

Definition at line 79 of file ocsd_error.h.

Here is the caller graph for this function:

◆ getErrorSeverity()

const ocsd_err_severity_t ocsdError::getErrorSeverity ( ) const
inline

Get error code.

Definition at line 78 of file ocsd_error.h.

Here is the caller graph for this function:

◆ getErrorString()

static const std::string ocsdError::getErrorString ( const ocsdError error)
static

Get the trace source channel ID associated with the error. Generate a formatted error string for the supplied error.

◆ getMessage()

const std::string& ocsdError::getMessage ( ) const
inline

Set custom error message

Definition at line 75 of file ocsd_error.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

ocsdError & ocsdError::operator= ( const ocsdError err)
inline

Definition at line 106 of file ocsd_error.h.

◆ operator=() [2/2]

ocsdError & ocsdError::operator= ( const ocsdError p_err)
inline

Definition at line 96 of file ocsd_error.h.

Here is the call graph for this function:

◆ setMessage()

void ocsdError::setMessage ( const std::string &  msg)
inline

Definition at line 74 of file ocsd_error.h.


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