Loading...
Searching...
No Matches
trc_error_log_i.h
Go to the documentation of this file.
/*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ARM_TRC_ERROR_LOG_I_H_INCLUDED
#define ARM_TRC_ERROR_LOG_I_H_INCLUDED
#include "opencsd/ocsd_if_types.h"
#include <string>
class ocsdError;
class ocsdMsgLogger;
class ITraceErrorLog
{
public:
ITraceErrorLog() {};
virtual ~ITraceErrorLog() {};
virtual const ocsd_hndl_err_log_t RegisterErrorSource(const std::string &component_name) = 0;
virtual const ocsd_err_severity_t GetErrorLogVerbosity() const = 0;
virtual void LogError(const ocsd_hndl_err_log_t handle, const ocsdError *Error) = 0;
virtual void LogMessage(const ocsd_hndl_err_log_t handle, const ocsd_err_severity_t filter_level, const std::string &msg ) = 0;
virtual ocsdError *GetLastError() = 0;
virtual ocsdError *GetLastIDError(const uint8_t chan_id) = 0;
virtual ocsdMsgLogger *getOutputLogger() = 0;
virtual void setOutputLogger(ocsdMsgLogger *pLogger) = 0;
enum generic_handles {
HANDLE_GEN_ERR = 0,
HANDLE_GEN_WARN,
HANDLE_GEN_INFO,
/* last value in list */
HANDLE_FIRST_REGISTERED_COMPONENT
};
};
#endif // ARM_TRC_ERROR_LOG_I_H_INCLUDED
/* End of File trc_error_log_i.h */
ITraceErrorLog::getOutputLogger
virtual ocsdMsgLogger * getOutputLogger()=0
ITraceErrorLog::LogError
virtual void LogError(const ocsd_hndl_err_log_t handle, const ocsdError *Error)=0
ITraceErrorLog::generic_handles
generic_handles
Definition trc_error_log_i.h:123
ITraceErrorLog::HANDLE_FIRST_REGISTERED_COMPONENT
@ HANDLE_FIRST_REGISTERED_COMPONENT
Definition trc_error_log_i.h:128
ITraceErrorLog::HANDLE_GEN_INFO
@ HANDLE_GEN_INFO
Definition trc_error_log_i.h:126
ITraceErrorLog::HANDLE_GEN_WARN
@ HANDLE_GEN_WARN
Definition trc_error_log_i.h:125
ITraceErrorLog::HANDLE_GEN_ERR
@ HANDLE_GEN_ERR
Definition trc_error_log_i.h:124
ITraceErrorLog::GetLastError
virtual ocsdError * GetLastError()=0
ITraceErrorLog::~ITraceErrorLog
virtual ~ITraceErrorLog()
Definition trc_error_log_i.h:60
ITraceErrorLog::GetLastIDError
virtual ocsdError * GetLastIDError(const uint8_t chan_id)=0
ITraceErrorLog::setOutputLogger
virtual void setOutputLogger(ocsdMsgLogger *pLogger)=0
ITraceErrorLog::ITraceErrorLog
ITraceErrorLog()
Definition trc_error_log_i.h:59
ITraceErrorLog::GetErrorLogVerbosity
virtual const ocsd_err_severity_t GetErrorLogVerbosity() const =0
ITraceErrorLog::RegisterErrorSource
virtual const ocsd_hndl_err_log_t RegisterErrorSource(const std::string &component_name)=0
ITraceErrorLog::LogMessage
virtual void LogMessage(const ocsd_hndl_err_log_t handle, const ocsd_err_severity_t filter_level, const std::string &msg)=0
ocsdError
Definition ocsd_error.h:58
ocsdMsgLogger
Definition ocsd_msg_logger.h:51
ocsd_hndl_err_log_t
unsigned int ocsd_hndl_err_log_t
Definition ocsd_if_types.h:145
ocsd_err_severity_t
enum _ocsd_err_severity_t ocsd_err_severity_t
ocsd_if_types.h
OpenCSD : Standard Types used in the library interfaces.