////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// THIS IS AUTO-GENERATED CODE.  PLEASE DO NOT EDIT (File bug reports against tools).
///
/// Auto-generated by: Parameter Parser V5.5.1 (2411131018)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxfdconfig.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "camxfdconfig.h"
#include "parametersetmanager.h"

CAMXFDCONFIG_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDStabilizationFilter(
    ParameterFileSymbolTableEntry* const entry,
    FDStabilizationFilter& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDStabilizationFilter::NoFilter):
            enumValue = FDStabilizationFilter::NoFilter;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationFilter::Temporal):
            enumValue = FDStabilizationFilter::Temporal;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationFilter::Hysteresis):
            enumValue = FDStabilizationFilter::Hysteresis;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationFilter::Average):
            enumValue = FDStabilizationFilter::Average;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationFilter::Median):
            enumValue = FDStabilizationFilter::Median;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDStabilizationFilter", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDStabilizationMode(
    ParameterFileSymbolTableEntry* const entry,
    FDStabilizationMode& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDStabilizationMode::Equal):
            enumValue = FDStabilizationMode::Equal;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::Smaller):
            enumValue = FDStabilizationMode::Smaller;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::Bigger):
            enumValue = FDStabilizationMode::Bigger;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::CloserToReference):
            enumValue = FDStabilizationMode::CloserToReference;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::ContinuesEqual):
            enumValue = FDStabilizationMode::ContinuesEqual;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::ContinuesSmaller):
            enumValue = FDStabilizationMode::ContinuesSmaller;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::ContinuesBigger):
            enumValue = FDStabilizationMode::ContinuesBigger;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::ContinuesCloserToReference):
            enumValue = FDStabilizationMode::ContinuesCloserToReference;
            result    = true;
            break;
        case static_cast<UINT32>(FDStabilizationMode::WithinThreshold):
            enumValue = FDStabilizationMode::WithinThreshold;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDStabilizationMode", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDSearchDensity(
    ParameterFileSymbolTableEntry* const entry,
    FDSearchDensity& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDSearchDensity::FDSearchDensityLowest):
            enumValue = FDSearchDensity::FDSearchDensityLowest;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchDensity::FDSearchDensityLow):
            enumValue = FDSearchDensity::FDSearchDensityLow;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchDensity::FDSearchDensityNormal):
            enumValue = FDSearchDensity::FDSearchDensityNormal;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchDensity::FDSearchDensityHigh):
            enumValue = FDSearchDensity::FDSearchDensityHigh;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchDensity::FDSearchDensityHighest):
            enumValue = FDSearchDensity::FDSearchDensityHighest;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDSearchDensity", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDDetectionMode(
    ParameterFileSymbolTableEntry* const entry,
    FDDetectionMode& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDDetectionMode::FDDetectionModeDefault):
            enumValue = FDDetectionMode::FDDetectionModeDefault;
            result    = true;
            break;
        case static_cast<UINT32>(FDDetectionMode::FDDetectionModeFull):
            enumValue = FDDetectionMode::FDDetectionModeFull;
            result    = true;
            break;
        case static_cast<UINT32>(FDDetectionMode::FDDetectionModeLite):
            enumValue = FDDetectionMode::FDDetectionModeLite;
            result    = true;
            break;
        case static_cast<UINT32>(FDDetectionMode::FDDetectionModeContinuous):
            enumValue = FDDetectionMode::FDDetectionModeContinuous;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDDetectionMode", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDSearchAngle(
    ParameterFileSymbolTableEntry* const entry,
    FDSearchAngle& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDSearchAngle::FDAngleNone):
            enumValue = FDSearchAngle::FDAngleNone;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngle15):
            enumValue = FDSearchAngle::FDAngle15;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngle45):
            enumValue = FDSearchAngle::FDAngle45;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngle75):
            enumValue = FDSearchAngle::FDAngle75;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngle105):
            enumValue = FDSearchAngle::FDAngle105;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngle135):
            enumValue = FDSearchAngle::FDAngle135;
            result    = true;
            break;
        case static_cast<UINT32>(FDSearchAngle::FDAngleAll):
            enumValue = FDSearchAngle::FDAngleAll;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDSearchAngle", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDFaceSizeType(
    ParameterFileSymbolTableEntry* const entry,
    FDFaceSizeType& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDFaceSizeType::FDFaceAdjFixed):
            enumValue = FDFaceSizeType::FDFaceAdjFixed;
            result    = true;
            break;
        case static_cast<UINT32>(FDFaceSizeType::FDFaceAdjFloating):
            enumValue = FDFaceSizeType::FDFaceAdjFloating;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDFaceSizeType", uintValue);
            break;
        }
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Read enum value
/// @param entry [in] Symbol table entry
/// @param enumValue [out] Enum value to read
/// @param alignment [in] Symbol table byte alignment
/// @return true if successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool ReadEnum_FDFaceAccuracy(
    ParameterFileSymbolTableEntry* const entry,
    FDFaceAccuracy& enumValue,
    BYTE const alignment)
{
    bool result {false};

    UINT32 uintValue {entry->ReadEnum(&result, alignment)};

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FDFaceAccuracy::FDAccuracyHigh):
            enumValue = FDFaceAccuracy::FDAccuracyHigh;
            result    = true;
            break;
        case static_cast<UINT32>(FDFaceAccuracy::FDAccuracyNormal):
            enumValue = FDFaceAccuracy::FDAccuracyNormal;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FDFaceAccuracy", uintValue);
            break;
        }
    }
    return result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FaceDetectionCtrlTypeClass::FaceDetectionCtrlTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(maxNumberOfFaces);
    PARAMETER_INITIALIZE(maxFPSWithFaces);
    PARAMETER_INITIALIZE(maxFPSWithNoFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithNoFaces);
    PARAMETER_INITIALIZE(lockDetectedFaces);
    PARAMETER_INITIALIZE(initialNoFrameSkipCount);
    PARAMETER_INITIALIZE(maxPendingFrames);
    PARAMETER_INITIALIZE(delayCount);
    PARAMETER_INITIALIZE(holdCount);
    PARAMETER_INITIALIZE(retryCount);
    PARAMETER_INITIALIZE(accuracy);
    PARAMETER_INITIALIZE(hwConfig);
    PARAMETER_INITIALIZE(swConfig);
    PARAMETER_INITIALIZE(FPFilter);
    PARAMETER_INITIALIZE(ROIGenerator);
    PARAMETER_INITIALIZE(managerConfig);
    PARAMETER_INITIALIZE(stabilization);
    PARAMETER_INITIALIZE(swPreprocess);
    PARAMETER_INITIALIZE(facialAttrConfig);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FaceDetectionCtrlTypeClass::FaceDetectionCtrlTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(maxNumberOfFaces);
    PARAMETER_INITIALIZE(maxFPSWithFaces);
    PARAMETER_INITIALIZE(maxFPSWithNoFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithNoFaces);
    PARAMETER_INITIALIZE(lockDetectedFaces);
    PARAMETER_INITIALIZE(initialNoFrameSkipCount);
    PARAMETER_INITIALIZE(maxPendingFrames);
    PARAMETER_INITIALIZE(delayCount);
    PARAMETER_INITIALIZE(holdCount);
    PARAMETER_INITIALIZE(retryCount);
    PARAMETER_INITIALIZE(accuracy);
    PARAMETER_INITIALIZE(hwConfig);
    PARAMETER_INITIALIZE(swConfig);
    PARAMETER_INITIALIZE(FPFilter);
    PARAMETER_INITIALIZE(ROIGenerator);
    PARAMETER_INITIALIZE(managerConfig);
    PARAMETER_INITIALIZE(stabilization);
    PARAMETER_INITIALIZE(swPreprocess);
    PARAMETER_INITIALIZE(facialAttrConfig);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Destructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FaceDetectionCtrlTypeClass::~FaceDetectionCtrlTypeClass()
{
    if (Loaded)
    {
        UnloadModule();
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetName
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* FaceDetectionCtrlTypeClass::GetName(
    const CHAR* const type)
{
    const CHAR* name = type;
    CHAR temp[ParameterFileSymbolTableEntry::TYPE_LEN + 1];
    if (PARAMETER_STRCMP(type, ModuleData::GetType(temp, "fdconfigdata")) == 0)
    {
        name = "fdconfigdata";
    }
    return name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDFacialAttributeConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDFacialAttributeConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(PTDMaxNumberOfFaces);
    PARAMETER_INITIALIZE(SMDMaxNumberOfFaces);
    PARAMETER_INITIALIZE(GBDMaxNumberOfFaces);
    PARAMETER_INITIALIZE(CTDMaxNumberOfFaces);
    PARAMETER_INITIALIZE(FDStabilizationOverride);

    SYMBOL_TABLE_ENTRY_READ(entry, result, PTDMaxNumberOfFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SMDMaxNumberOfFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, GBDMaxNumberOfFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, CTDMaxNumberOfFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, FDStabilizationOverride, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDSWPreprocessConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDSWPreprocessConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(exposureShortBySafeThreshold);
    PARAMETER_INITIALIZE(deltaEVFromTargetThreshold);

    SYMBOL_TABLE_ENTRY_READ(entry, result, exposureShortBySafeThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, deltaEVFromTargetThreshold, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDMedianFilter
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDMedianFilter::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(historyLength);

    SYMBOL_TABLE_ENTRY_READ(entry, result, historyLength, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDAverageFilter
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDAverageFilter::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(historyLength);
    PARAMETER_INITIALIZE(movingHistoryLength);
    PARAMETER_INITIALIZE(preFilterHistoryLength);

    SYMBOL_TABLE_ENTRY_READ(entry, result, historyLength, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingHistoryLength, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, preFilterHistoryLength, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDHysteresisFilter
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDHysteresisFilter::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(startA);
    PARAMETER_INITIALIZE(endA);
    PARAMETER_INITIALIZE(startB);
    PARAMETER_INITIALIZE(endB);

    SYMBOL_TABLE_ENTRY_READ(entry, result, startA, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, endA, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, startB, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, endB, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDTemporalFilter
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDTemporalFilter::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(numerator);
    PARAMETER_INITIALIZE(denominator);

    SYMBOL_TABLE_ENTRY_READ(entry, result, numerator, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, denominator, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDSizeMotionDetector
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDSizeMotionDetector::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(cutOffThreshold);

    SYMBOL_TABLE_ENTRY_READ(entry, result, cutOffThreshold, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDDefaultMotionDetector
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDDefaultMotionDetector::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(movingLinkFactor);
    PARAMETER_INITIALIZE(movingThreshold);
    PARAMETER_INITIALIZE(movingScalerAtBoundary);

    SYMBOL_TABLE_ENTRY_READ(entry, result, movingLinkFactor, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingScalerAtBoundary, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDStabilizationAttributeConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDStabilizationAttributeConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(mode);
    PARAMETER_INITIALIZE(minStableState);
    PARAMETER_INITIALIZE(stableThreshold);
    PARAMETER_INITIALIZE(threshold);
    PARAMETER_INITIALIZE(maxUnstableStateCount);
    PARAMETER_INITIALIZE(useReference);
    PARAMETER_INITIALIZE(filterType);
    PARAMETER_INITIALIZE(movingInitStateCount);
    PARAMETER_INITIALIZE(movingMaxDelayCount);
    PARAMETER_INITIALIZE(movingMaxHoldCount);
    PARAMETER_INITIALIZE(defaultMotionDetector);
    PARAMETER_INITIALIZE(sizeMotionDetector);
    PARAMETER_INITIALIZE(value);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDStabilizationMode(entry, mode, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, minStableState, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, stableThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxUnstableStateCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, useReference, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDStabilizationFilter(entry, filterType, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingInitStateCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingMaxDelayCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingMaxHoldCount, alignment)
    if (result)
    {
        result = defaultMotionDetector.Load(entry, alignment);
    }
    if (result)
    {
        result = sizeMotionDetector.Load(entry, alignment);
    }
    if (result)
    {
        result = value.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDStabilizationAttributeConfig_valueStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDStabilizationAttributeConfig::valueStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(temporalFilter);
    PARAMETER_INITIALIZE(hysteresisFilter);
    PARAMETER_INITIALIZE(averageFilter);
    PARAMETER_INITIALIZE(medianFilter);

    result = temporalFilter.Load(entry, alignment);
    if (result)
    {
        result = hysteresisFilter.Load(entry, alignment);
    }
    if (result)
    {
        result = averageFilter.Load(entry, alignment);
    }
    if (result)
    {
        result = medianFilter.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDStabilizationConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDStabilizationConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(historyDepth);
    PARAMETER_INITIALIZE(boundaryCaseFactor);
    PARAMETER_INITIALIZE(position);
    PARAMETER_INITIALIZE(size);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, historyDepth, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, boundaryCaseFactor, alignment)
    if (result)
    {
        result = position.Load(entry, alignment);
    }
    if (result)
    {
        result = size.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDROIManagerConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDROIManagerConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(newGoodFaceConfidence);
    PARAMETER_INITIALIZE(newNormalFaceConfidence);
    PARAMETER_INITIALIZE(existingFaceConfidence);
    PARAMETER_INITIALIZE(angleDiffForStrictConfidence);
    PARAMETER_INITIALIZE(strictNewGoodFaceConfidence);
    PARAMETER_INITIALIZE(strictNewNormalFaceConfidence);
    PARAMETER_INITIALIZE(strictExistingFaceConfidence);
    PARAMETER_INITIALIZE(faceLinkMoveDistanceRatio);
    PARAMETER_INITIALIZE(faceLinkMinSizeRatio);
    PARAMETER_INITIALIZE(faceLinkMaxSizeRatio);
    PARAMETER_INITIALIZE(faceLinkRollAngleDifference);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newGoodFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newNormalFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, existingFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, angleDiffForStrictConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, strictNewGoodFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, strictNewNormalFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, strictExistingFaceConfidence, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceLinkMoveDistanceRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceLinkMinSizeRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceLinkMaxSizeRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceLinkRollAngleDifference, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDROIGeneratorConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDROIGeneratorConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(baseThreshold);
    PARAMETER_INITIALIZE(innerThreshold);
    PARAMETER_INITIALIZE(expandFaceSizePercentage);
    PARAMETER_INITIALIZE(expandBoxBorderPercentage);
    PARAMETER_INITIALIZE(faceSpreadTolerance);
    PARAMETER_INITIALIZE(searchDensity);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, baseThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, innerThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expandFaceSizePercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expandBoxBorderPercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceSpreadTolerance, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchDensity(entry, searchDensity, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDFPFilterConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDFPFilterConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(baseThreshold);
    PARAMETER_INITIALIZE(innerThreshold);
    PARAMETER_INITIALIZE(expandFaceSizePercentage);
    PARAMETER_INITIALIZE(expandBoxBorderPercentage);
    PARAMETER_INITIALIZE(faceSpreadTolerance);
    PARAMETER_INITIALIZE(searchDensity);
    PARAMETER_INITIALIZE(maxNumOfFacesSecondCheck);
    PARAMETER_INITIALIZE(maxFaceSizeSecondCheck);
    PARAMETER_INITIALIZE(minFaceSizeSecondCheck);
    PARAMETER_INITIALIZE(minHWConfidenceSecondCheck);
    PARAMETER_INITIALIZE(minDLConfidenceSecondCheck);
    PARAMETER_INITIALIZE(uprightFaceOnlySecondCheck);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, baseThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, innerThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expandFaceSizePercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, expandBoxBorderPercentage, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, faceSpreadTolerance, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchDensity(entry, searchDensity, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxNumOfFacesSecondCheck, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxFaceSizeSecondCheck, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minFaceSizeSecondCheck, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minHWConfidenceSecondCheck, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minDLConfidenceSecondCheck, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, uprightFaceOnlySecondCheck, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDProfileConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDProfileConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(searchAngle);
    PARAMETER_INITIALIZE(upFrontSearchAngle);
    PARAMETER_INITIALIZE(priorityAngleRange);
    PARAMETER_INITIALIZE(priorityThreshold);
    PARAMETER_INITIALIZE(nonPriorityThreshold);

    result = camxfdconfig::ReadEnum_FDSearchAngle(entry, searchAngle, alignment);
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchAngle(entry, upFrontSearchAngle, alignment);
    }
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchAngle(entry, priorityAngleRange, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, priorityThreshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, nonPriorityThreshold, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDFaceSize
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDFaceSize::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(value);

    result = camxfdconfig::ReadEnum_FDFaceSizeType(entry, type, alignment);
    if (result)
    {
        result = value.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDFaceSize_valueStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDFaceSize::valueStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(size);
    PARAMETER_INITIALIZE(ratio);

    SYMBOL_TABLE_ENTRY_READ(entry, result, size, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, ratio, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDSwConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDSwConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(minFaceSize);
    PARAMETER_INITIALIZE(maxFaceSize);
    PARAMETER_INITIALIZE(frontProfileConfig);
    PARAMETER_INITIALIZE(halfProfileConfig);
    PARAMETER_INITIALIZE(fullProfileConfig);
    PARAMETER_INITIALIZE(enableUpFrontAngles);
    PARAMETER_INITIALIZE(skipIfNoOrientation);
    PARAMETER_INITIALIZE(detectionMode);
    PARAMETER_INITIALIZE(newFaceSearchDensity);
    PARAMETER_INITIALIZE(existingFaceSearchDensity);
    PARAMETER_INITIALIZE(detectNewFacesInExistingFaceDirection);
    PARAMETER_INITIALIZE(noFaceSearchCycle);
    PARAMETER_INITIALIZE(newFaceSearchCycle);
    PARAMETER_INITIALIZE(newFaceSearchInterval);
    PARAMETER_INITIALIZE(upFrontNoFaceSearchCycle);
    PARAMETER_INITIALIZE(upFrontNewFaceSearchCycle);
    PARAMETER_INITIALIZE(upFrontNewFaceSearchInterval);
    PARAMETER_INITIALIZE(positionSteadiness);
    PARAMETER_INITIALIZE(sizeSteadiness);
    PARAMETER_INITIALIZE(rollAngleExtension);
    PARAMETER_INITIALIZE(yawAngleExtension);
    PARAMETER_INITIALIZE(noFaceFrameSkip);
    PARAMETER_INITIALIZE(newFaceFrameSkip);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = minFaceSize.Load(entry, alignment);
    }
    if (result)
    {
        result = maxFaceSize.Load(entry, alignment);
    }
    if (result)
    {
        result = frontProfileConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = halfProfileConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = fullProfileConfig.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableUpFrontAngles, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, skipIfNoOrientation, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDDetectionMode(entry, detectionMode, alignment);
    }
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchDensity(entry, newFaceSearchDensity, alignment);
    }
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchDensity(entry, existingFaceSearchDensity, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, detectNewFacesInExistingFaceDirection, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, noFaceSearchCycle, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newFaceSearchCycle, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newFaceSearchInterval, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, upFrontNoFaceSearchCycle, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, upFrontNewFaceSearchCycle, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, upFrontNewFaceSearchInterval, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, positionSteadiness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, sizeSteadiness, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, rollAngleExtension, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, yawAngleExtension, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, noFaceFrameSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newFaceFrameSkip, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FDHwConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FDHwConfig::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(minFaceSize);
    PARAMETER_INITIALIZE(maxFaceSize);
    PARAMETER_INITIALIZE(enableUpFrontAngles);
    PARAMETER_INITIALIZE(angle);
    PARAMETER_INITIALIZE(upFrontAngle);
    PARAMETER_INITIALIZE(threshold);
    PARAMETER_INITIALIZE(noFaceFrameSkip);
    PARAMETER_INITIALIZE(newFaceFrameSkip);
    PARAMETER_INITIALIZE(enableHWFP);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = minFaceSize.Load(entry, alignment);
    }
    if (result)
    {
        result = maxFaceSize.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableUpFrontAngles, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDSearchAngle(entry, angle, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, upFrontAngle, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, threshold, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, noFaceFrameSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, newFaceFrameSkip, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableHWFP, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load FaceDetectionCtrlType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FaceDetectionCtrlType::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(maxNumberOfFaces);
    PARAMETER_INITIALIZE(maxFPSWithFaces);
    PARAMETER_INITIALIZE(maxFPSWithNoFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithFaces);
    PARAMETER_INITIALIZE(multiCameraMaxFPSWithNoFaces);
    PARAMETER_INITIALIZE(lockDetectedFaces);
    PARAMETER_INITIALIZE(initialNoFrameSkipCount);
    PARAMETER_INITIALIZE(maxPendingFrames);
    PARAMETER_INITIALIZE(delayCount);
    PARAMETER_INITIALIZE(holdCount);
    PARAMETER_INITIALIZE(retryCount);
    PARAMETER_INITIALIZE(accuracy);
    PARAMETER_INITIALIZE(hwConfig);
    PARAMETER_INITIALIZE(swConfig);
    PARAMETER_INITIALIZE(FPFilter);
    PARAMETER_INITIALIZE(ROIGenerator);
    PARAMETER_INITIALIZE(managerConfig);
    PARAMETER_INITIALIZE(stabilization);
    PARAMETER_INITIALIZE(swPreprocess);
    PARAMETER_INITIALIZE(facialAttrConfig);

    result = module_version.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxNumberOfFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxFPSWithFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxFPSWithNoFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, multiCameraMaxFPSWithFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, multiCameraMaxFPSWithNoFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, lockDetectedFaces, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, initialNoFrameSkipCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxPendingFrames, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, delayCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, holdCount, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, retryCount, alignment)
    if (result)
    {
        result = camxfdconfig::ReadEnum_FDFaceAccuracy(entry, accuracy, alignment);
    }
    if (result)
    {
        result = hwConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = swConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = FPFilter.Load(entry, alignment);
    }
    if (result)
    {
        result = ROIGenerator.Load(entry, alignment);
    }
    if (result)
    {
        result = managerConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = stabilization.Load(entry, alignment);
    }
    if (result)
    {
        result = swPreprocess.Load(entry, alignment);
    }
    if (result)
    {
        result = facialAttrConfig.Load(entry, alignment);
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FaceDetectionCtrlType::module_versionStruct::Load(
    ParameterFileSymbolTableEntry* const entry,
    BYTE const alignment)
{
    bool result = true;

    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    SYMBOL_TABLE_ENTRY_READ(entry, result, major_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minor_revision, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, incr_revision, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Release the ParameterModule object
/// Requires that this object was created via a ParameterSetManager::GetModule call
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceDetectionCtrlType::Release()
{
    ((FaceDetectionCtrlTypeClass*)this)->Release();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Returns the ParameterModule::Modified value
/// The Modified value is incremented when the module's data or pointer values change
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT32 FaceDetectionCtrlType::GetModified()
{
    return ((FaceDetectionCtrlTypeClass*)this)->Modified;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* FaceDetectionCtrlTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    FaceDetectionCtrlTypeClass* cls = nullptr;

    if (PARAMETER_STRCMP(Type, moduleData->Type) == 0 && Version.Value == moduleData->Version.Value)
    {
        const UINT32 id = moduleData->DuplicateID > 0 ? moduleData->DuplicateID : moduleData->ID;

        ParameterModule* const module = defModule->Find(id);
        if (module != nullptr)
        {
            cls = (FaceDetectionCtrlTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW FaceDetectionCtrlTypeClass(GetName(moduleData->Type), moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create FaceDetectionCtrlTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create FaceDetectionCtrlTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module data, return true is successful
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FaceDetectionCtrlTypeClass::LoadModule(
    ParameterFileSymbolTable* const table)
{
    bool result = true;

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        FaceDetectionCtrlTypeClass* const cls = this;

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        result = table->Find(entryObj, SymbolTableID);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->SetManager, "FaceDetectionCtrlTypeClass::LoadModule Failed to find module ID (%d) in Symbol Table\n", SymbolTableID);
        }

        if (result)
        {
            result = cls->Load(entry, alignment);
        }
        Modified++;
        Loaded = true;
    }

    if (!result)
    {
        /// Module failed to fully load, unload it
        UnloadModule();
    }

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceDetectionCtrlTypeClass::UnloadModule()
{
    if (Loaded)
    {
        Loaded = false;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// /// Release the ParameterModule object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FaceDetectionCtrlTypeClass::Release()
{
    ParameterModule::Release();
}

CAMXFDCONFIG_NAMESPACE_END
