OpenCSD - CoreSight Trace Decode Library
1.3.3
|
#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 |
ocsdError & | operator= (const ocsdError *p_err) |
ocsdError & | operator= (const ocsdError &err) |
Static Public Member Functions | |
static const std::string | getErrorString (const ocsdError &error) |
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.
ocsdError::ocsdError | ( | const ocsd_err_severity_t | sev_type, |
const ocsd_err_t | code | ||
) |
Default error constructor with severity and error code.
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::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::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::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::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::ocsdError | ( | const ocsdError * | pError | ) |
Copy constructor
ocsdError::ocsdError | ( | const ocsdError & | Error | ) |
Copy constructor
ocsdError::~ocsdError | ( | ) |
Destructor
|
inline |
Get trace index associated with the error.
Definition at line 80 of file ocsd_error.h.
|
inline |
Get custom error message
Definition at line 77 of file ocsd_error.h.
|
inline |
Get error severity.
Definition at line 79 of file ocsd_error.h.
|
inline |
Get error code.
Definition at line 78 of file ocsd_error.h.
|
static |
Get the trace source channel ID associated with the error. Generate a formatted error string for the supplied error.
|
inline |
Set custom error message
Definition at line 75 of file ocsd_error.h.
Definition at line 106 of file ocsd_error.h.
|
inline |
Definition at line 74 of file ocsd_error.h.