Macros | Typedefs | Enumerations
sbgDebug.h File Reference

Define and handle error logging for the SBG Systems common C library. More...

#include "platform/sbgConfig.h"
Include dependency graph for sbgDebug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SBG_ASSERT(expression)   SBG_PLATFORM_ASSERT(expression)
 
#define SBG_LOG_ERROR(errorCode, format, ...)   sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_ERROR, errorCode, format, ##__VA_ARGS__)
 
#define SBG_LOG_INFO(format, ...)   sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_INFO, SBG_NO_ERROR, format, ##__VA_ARGS__)
 
#define SBG_LOG_VERBOSE(format, ...)   sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_VERBOSE, SBG_NO_ERROR, format, ##__VA_ARGS__)
 
#define SBG_LOG_WARNING(errorCode, format, ...)   sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_WARNING, errorCode, format, ##__VA_ARGS__)
 

Typedefs

typedef enum _SbgDebugLogType SbgDebugLogType
 

Enumerations

enum  _SbgDebugLogType { SBG_DEBUG_LOG_TYPE_ERROR, SBG_DEBUG_LOG_TYPE_WARNING, SBG_DEBUG_LOG_TYPE_INFO, SBG_DEBUG_LOG_TYPE_VERBOSE }
 

Detailed Description

Define and handle error logging for the SBG Systems common C library.

Author
SBG Systems (Raphael Siryani)
Date
17 March 2015

The methods defined here should be implemented in sbgPlatform.h/sbgPlatform.c according to your platform and needs.

Copyright Notice

Copyright (C) 2007-2015, SBG Systems SAS. All rights reserved.

This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

Definition in file sbgDebug.h.

Macro Definition Documentation

#define SBG_ASSERT (   expression)    SBG_PLATFORM_ASSERT(expression)

Run time assert that is raised if the expression is false.

Parameters
[in]expressionThe boolean expression to test, the execution is interrupted if the expression is evaluated as false.

Definition at line 52 of file sbgDebug.h.

#define SBG_LOG_ERROR (   errorCode,
  format,
  ... 
)    sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_ERROR, errorCode, format, ##__VA_ARGS__)

Log an error with its associated message.

Parameters
[in]errorCodeThe error code that has thrown this error.
[in]formatString litteral for the associated error message (you can use printf like string formating).

Definition at line 63 of file sbgDebug.h.

#define SBG_LOG_INFO (   format,
  ... 
)    sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_INFO, SBG_NO_ERROR, format, ##__VA_ARGS__)

Log an information message.

Parameters
[in]formatString litteral for the information message (you can use printf like string formating).

Definition at line 84 of file sbgDebug.h.

#define SBG_LOG_VERBOSE (   format,
  ... 
)    sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_VERBOSE, SBG_NO_ERROR, format, ##__VA_ARGS__)

Log an information message only in verbose mode

Parameters
[in]formatString litteral for the information message (you can use printf like string formating).

Definition at line 93 of file sbgDebug.h.

#define SBG_LOG_WARNING (   errorCode,
  format,
  ... 
)    sbgPlatformDebugLogMsg((const char*)__BASE_FILE__, (const char*)__FUNCTION__, __LINE__, SBG_DEBUG_LOG_TYPE_WARNING, errorCode, format, ##__VA_ARGS__)

Log a warning with its associated message.

Parameters
[in]errorCodeThe error code that has thrown this warning.
[in]formatString litteral for the associated warning message (you can use printf like string formating).

Definition at line 74 of file sbgDebug.h.

Typedef Documentation

Enum that identify the type of error / warning that has been thrown.

Enumeration Type Documentation

Enum that identify the type of error / warning that has been thrown.

Enumerator
SBG_DEBUG_LOG_TYPE_ERROR 

The message to log is an error.

SBG_DEBUG_LOG_TYPE_WARNING 

The message to log is a warning.

SBG_DEBUG_LOG_TYPE_INFO 

The message to log is an information.

SBG_DEBUG_LOG_TYPE_VERBOSE 

The message to log is a verbose information.

Definition at line 35 of file sbgDebug.h.



sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20