///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2017-2022 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  chistatsdebug.h
/// @brief Statistics debug information
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


#ifndef CHISTATSDEBUG_H
#define CHISTATSDEBUG_H

#include "camxcdktypes.h"

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

/** @addtogroup chi_stats_logging
@{ */

/// @brief Verbosity tag for a specified debug print message. (See #LoggingLevel.)
typedef UINT32 StatsLog;

/// @brief Verbosity tags for logging.
typedef enum
{
    StatsLogDebug             = (1 << 0),     ///< Debug messages.
    StatsLogError             = (1 << 1),     ///< Error messages.
    StatsLogWarning           = (1 << 2),     ///< Warning messages.
    StatsLogEntryExit         = (1 << 3),     ///< Entry and exit messages.
    StatsLogInfo              = (1 << 4),     ///< Informational messages.
    StatsLogVerbose           = (1 << 5),     ///< Verbose messages.
    StatsLogConfig            = (1 << 6),     ///< Configuration messages.
    StatsLogMax               = (1 << 7)      ///< Maximum number of verbosity levels.
}LoggingLevel;

/// @brief Group tag for a specified debug print message. (See #LoggingGroup.)
typedef UINT32 StatsLogGroup;

/// @brief Group tags for logging.
typedef enum
{
    StatsLogGroupNone         = (1 << 0),     ///< Generic group of debug print messages.
    StatsLogGroupAEC          = (1 << 1),     ///< Debug print messages for the AEC module.
    StatsLogGroupAF           = (1 << 2),     ///< Debug print messages for the Autofocus module.
    StatsLogGroupAWB          = (1 << 3),     ///< Debug print messages for the AWB module.
    StatsLogGroupAFD          = (1 << 4),     ///< Debug print messages for the AFD module.
    StatsLogGroupASD          = (1 << 5),     ///< Debug print messages for the ASD module.
    StatsLogGroupTracker      = (1 << 6),     ///< Debug print messages for the Tracker module.
    StatsLogGroupStatsNN      = (1 << 7),     ///< Debug print messages for the Neural Network module.
    StatsLogGroupAWBR         = (1 << 8)      ///< Debug print messages for the Neural Network module.
}LoggingGroup;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @cond StatsLoggingFunction @endcond
///
/// @brief Defines the logging function.
///
/// @datatypes
/// #StatsLogGroup \n
/// #StatsLog
///
/// @param[in] pFileName      Pointer to the name of the logging file from which logging is invoked.
/// @param[in] lineNumber     Line number of the logging file from which logging is invoked.
/// @param[in] pFunctionName  Pointer to the name of the function from which logging is invoked.
/// @param[in] group          Group level for the type of debug print message.
/// @param[in] level          Verbosity level for the type of debug print message.
/// @param[in] pFormat        Pointer to the format string.
/// @param[in] ...            Parameters required by the specified format.
///
/// @return None. @newpage
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
typedef VOID (*StatsLoggingFunction)(
    const CHAR* pFileName,
    const INT lineNumber,
    const CHAR* pFunctionName,
    StatsLogGroup group,
    StatsLog level,
    const CHAR* pFormat,
    ...);

/** @} */ /* end_addtogroup chi_stats_logging */

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // CHISTATSDEBUG_H
