////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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  aecxsync.cpp
/// @brief Auto-generated Chromatix parameter file
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "aecxsync.h"
#include "parametersetmanager.h"

AECXSYNC_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AlignMasterDynamicRange::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableAlignDynamicRange") == 0)
    {
        ParameterUtils::DoubleToString((double)enableAlignDynamicRange, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AlignMasterDynamicRange::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableAlignDynamicRange") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableAlignDynamicRange = (BOOL)dblValue; 
        }
    }

    return __result;
}

bool AlignMasterDynamicRange::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enableAlignDynamicRange
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableAlignDynamicRange", ParameterParserDataType::Boolean, (double)enableAlignDynamicRange, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableAlignDynamicRange") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableAlignDynamicRange, 0));
    }

    return __result;
}

bool StaticMixingConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "staticWeight") == 0)
    {
        ParameterUtils::DoubleToString((double)staticWeight, __value, __size);
        __result = true;
    }

    return __result;
}

bool StaticMixingConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "staticWeight") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            staticWeight = (float)dblValue; 
        }
    }

    return __result;
}

bool StaticMixingConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // staticWeight
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("staticWeight", ParameterParserDataType::Float, (double)staticWeight));
    }
    else if (PARAMETER_STRCMP(__name, "staticWeight") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)staticWeight));
    }

    return __result;
}

bool DynamicMixingConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "dynamicWeightTrigger") == 0)
    {
        if (__index < dynamicWeightTriggerCount)
        {
            __result = dynamicWeightTrigger[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "postExpCompTrigger") == 0)
    {
        if (__index < postExpCompTriggerCount)
        {
            __result = postExpCompTrigger[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool DynamicMixingConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "dynamicWeightTrigger") == 0)
    {
        if (__index < dynamicWeightTriggerCount)
        {
            __result = dynamicWeightTrigger[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "postExpCompTrigger") == 0)
    {
        if (__index < postExpCompTriggerCount)
        {
            __result = postExpCompTrigger[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool DynamicMixingConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // dynamicWeightTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("dynamicWeightTrigger", ParameterParserDataType::Structure, true, false, dynamicWeightTriggerCount));
    }
    else if (PARAMETER_STRCMP(__name, "dynamicWeightTrigger") == 0)
    {
        if (__index < dynamicWeightTriggerCount)
        {
            __result = dynamicWeightTrigger[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, dynamicWeightTriggerCount));
        }
    }

    // postExpCompTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("postExpCompTrigger", ParameterParserDataType::Structure, true, false, postExpCompTriggerCount));
    }
    else if (PARAMETER_STRCMP(__name, "postExpCompTrigger") == 0)
    {
        if (__index < postExpCompTriggerCount)
        {
            __result = postExpCompTrigger[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, postExpCompTriggerCount));
        }
    }

    return __result;
}

bool AECMeteringMixConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        __result = dynamicMixingConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECMeteringMixConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        __result = dynamicMixingConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool AECMeteringMixConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // dynamicMixingConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("dynamicMixingConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "dynamicMixingConfig") == 0)
    {
        __result = dynamicMixingConfig.GetInfo(&__path[__pos], __info);
    }

    // staticMixingConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("staticMixingConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "staticMixingConfig") == 0)
    {
        __result = staticMixingConfig.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool CalibrationFileConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableSaveLoadFile") == 0)
    {
        ParameterUtils::DoubleToString((double)enableSaveLoadFile, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "lumaDiffThresToSave") == 0)
    {
        ParameterUtils::DoubleToString((double)lumaDiffThresToSave, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "CCTRoundingToSave") == 0)
    {
        ParameterUtils::DoubleToString((double)CCTRoundingToSave, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "saveDataBufferLength") == 0)
    {
        ParameterUtils::DoubleToString((double)saveDataBufferLength, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToSave") == 0)
    {
        ParameterUtils::DoubleToString((double)frameDurationToSave, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "dataFilterMethod") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)dataFilterMethod, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool CalibrationFileConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enableSaveLoadFile") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableSaveLoadFile = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "lumaDiffThresToSave") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lumaDiffThresToSave = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "CCTRoundingToSave") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            CCTRoundingToSave = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "saveDataBufferLength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            saveDataBufferLength = (UINT8)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToSave") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frameDurationToSave = (UINT8)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataFilterMethod") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataFilterMethod = (FilterMethodType)(UINT32)dblValue; 
        }
    }

    return __result;
}

bool CalibrationFileConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enableSaveLoadFile
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableSaveLoadFile", ParameterParserDataType::Boolean, (double)enableSaveLoadFile, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableSaveLoadFile") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableSaveLoadFile, 0));
    }

    // lumaDiffThresToSave
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lumaDiffThresToSave", ParameterParserDataType::Float, (double)lumaDiffThresToSave));
    }
    else if (PARAMETER_STRCMP(__name, "lumaDiffThresToSave") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)lumaDiffThresToSave));
    }

    // CCTRoundingToSave
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("CCTRoundingToSave", ParameterParserDataType::Int32, (double)CCTRoundingToSave, 0));
    }
    else if (PARAMETER_STRCMP(__name, "CCTRoundingToSave") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)CCTRoundingToSave, 0));
    }

    // saveDataBufferLength
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("saveDataBufferLength", ParameterParserDataType::UInt8, (double)saveDataBufferLength, 0));
    }
    else if (PARAMETER_STRCMP(__name, "saveDataBufferLength") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt8, (double)saveDataBufferLength, 0));
    }

    // frameDurationToSave
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("frameDurationToSave", ParameterParserDataType::UInt8, (double)frameDurationToSave, 0));
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToSave") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt8, (double)frameDurationToSave, 0));
    }

    // dataFilterMethod
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("dataFilterMethod", ParameterParserDataType::Enum, (double)(UINT32)dataFilterMethod, 0));
    }
    else if (PARAMETER_STRCMP(__name, "dataFilterMethod") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)dataFilterMethod, 0));
    }

    return __result;
}

bool ConvCappingConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "cappingType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)cappingType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "cappingRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)cappingRatio, __value, __size);
        __result = true;
    }

    return __result;
}

bool ConvCappingConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "cappingType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            cappingType = (OLBMFactorConvCappingType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "cappingRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            cappingRatio = (float)dblValue; 
        }
    }

    return __result;
}

bool ConvCappingConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // cappingType
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("cappingType", ParameterParserDataType::Enum, (double)(UINT32)cappingType, 0));
    }
    else if (PARAMETER_STRCMP(__name, "cappingType") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)cappingType, 0));
    }

    // cappingRatio
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("cappingRatio", ParameterParserDataType::Float, (double)cappingRatio));
    }
    else if (PARAMETER_STRCMP(__name, "cappingRatio") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)cappingRatio));
    }

    return __result;
}

bool BFWStatsInputDataSourceType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaChannel") == 0)
    {
        PARAMETER_STRCPY(__value, __size, lumaChannel);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctChannel") == 0)
    {
        PARAMETER_STRCPY(__value, __size, nonSatPctChannel);
        __result = true;
    }

    return __result;
}

bool BFWStatsInputDataSourceType::SetValue(
    const CHAR* const __path,
    const CHAR* const /*__value*/)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaChannel") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctChannel") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

bool BFWStatsInputDataSourceType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // lumaChannel
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lumaChannel", ParameterParserDataType::String, lumaChannel));
    }
    else if (PARAMETER_STRCMP(__name, "lumaChannel") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, lumaChannel));
    }

    // nonSatPctChannel
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("nonSatPctChannel", ParameterParserDataType::String, nonSatPctChannel));
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctChannel") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, nonSatPctChannel));
    }

    return __result;
}

bool BEROIAlignConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "statsChannelToAlign") == 0)
    {
        PARAMETER_STRCPY(__value, __size, statsChannelToAlign);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "lumaRangeCriteria") == 0)
    {
        __result = lumaRangeCriteria.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToRun") == 0)
    {
        ParameterUtils::DoubleToString((double)frameDurationToRun, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "runOnlyWhenSceneChanged") == 0)
    {
        ParameterUtils::DoubleToString((double)runOnlyWhenSceneChanged, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        ParameterUtils::DoubleToString((double)SCDID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scoreThres") == 0)
    {
        ParameterUtils::DoubleToString((double)scoreThres, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "scoreImproveThres") == 0)
    {
        ParameterUtils::DoubleToString((double)scoreImproveThres, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "offsetThres") == 0)
    {
        ParameterUtils::DoubleToString((double)offsetThres, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BEROIAlignConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "statsChannelToAlign") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "lumaRangeCriteria") == 0)
    {
        __result = lumaRangeCriteria.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToRun") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            frameDurationToRun = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "runOnlyWhenSceneChanged") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            runOnlyWhenSceneChanged = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SCDID = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "scoreThres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scoreThres = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "scoreImproveThres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            scoreImproveThres = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "offsetThres") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            offsetThres = (UINT8)dblValue; 
        }
    }

    return __result;
}

bool BEROIAlignConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enable", ParameterParserDataType::Boolean, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enable, 0));
    }

    // statsChannelToAlign
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("statsChannelToAlign", ParameterParserDataType::String, statsChannelToAlign));
    }
    else if (PARAMETER_STRCMP(__name, "statsChannelToAlign") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, statsChannelToAlign));
    }

    // lumaRangeCriteria
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lumaRangeCriteria", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "lumaRangeCriteria") == 0)
    {
        __result = lumaRangeCriteria.GetInfo(&__path[__pos], __info);
    }

    // frameDurationToRun
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("frameDurationToRun", ParameterParserDataType::UInt32, (double)frameDurationToRun, 0));
    }
    else if (PARAMETER_STRCMP(__name, "frameDurationToRun") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)frameDurationToRun, 0));
    }

    // runOnlyWhenSceneChanged
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("runOnlyWhenSceneChanged", ParameterParserDataType::Boolean, (double)runOnlyWhenSceneChanged, 0));
    }
    else if (PARAMETER_STRCMP(__name, "runOnlyWhenSceneChanged") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)runOnlyWhenSceneChanged, 0));
    }

    // SCDID
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("SCDID", ParameterParserDataType::UInt32, (double)SCDID, 0));
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)SCDID, 0));
    }

    // scoreThres
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("scoreThres", ParameterParserDataType::Float, (double)scoreThres));
    }
    else if (PARAMETER_STRCMP(__name, "scoreThres") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)scoreThres));
    }

    // scoreImproveThres
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("scoreImproveThres", ParameterParserDataType::Float, (double)scoreImproveThres));
    }
    else if (PARAMETER_STRCMP(__name, "scoreImproveThres") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)scoreImproveThres));
    }

    // offsetThres
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("offsetThres", ParameterParserDataType::UInt8, (double)offsetThres, 0));
    }
    else if (PARAMETER_STRCMP(__name, "offsetThres") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt8, (double)offsetThres, 0));
    }

    return __result;
}

bool BEStatsInputDataSourceType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaDB") == 0)
    {
        __result = lumaDB.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctDB") == 0)
    {
        __result = nonSatPctDB.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "ROIDBDataID") == 0)
    {
        ParameterUtils::DoubleToString((double)ROIDBDataID, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool BEStatsInputDataSourceType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "lumaDB") == 0)
    {
        __result = lumaDB.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctDB") == 0)
    {
        __result = nonSatPctDB.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "ROIDBDataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            ROIDBDataID = (INT32)dblValue; 
        }
    }

    return __result;
}

bool BEStatsInputDataSourceType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // lumaDB
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("lumaDB", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "lumaDB") == 0)
    {
        __result = lumaDB.GetInfo(&__path[__pos], __info);
    }

    // nonSatPctDB
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("nonSatPctDB", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctDB") == 0)
    {
        __result = nonSatPctDB.GetInfo(&__path[__pos], __info);
    }

    // ROIDBDataID
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ROIDBDataID", ParameterParserDataType::Int32, (double)ROIDBDataID, 0));
    }
    else if (PARAMETER_STRCMP(__name, "ROIDBDataID") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)ROIDBDataID, 0));
    }

    return __result;
}

bool OfflineCalibrationImageResolutionType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        ParameterUtils::DoubleToString((double)width, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        ParameterUtils::DoubleToString((double)height, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool OfflineCalibrationImageResolutionType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            width = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            height = (UINT32)dblValue; 
        }
    }

    return __result;
}

bool OfflineCalibrationImageResolutionType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // width
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("width", ParameterParserDataType::UInt32, (double)width, 0));
    }
    else if (PARAMETER_STRCMP(__name, "width") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)width, 0));
    }

    // height
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("height", ParameterParserDataType::UInt32, (double)height, 0));
    }
    else if (PARAMETER_STRCMP(__name, "height") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)height, 0));
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "statsSelection") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)statsSelection, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "resolution") == 0)
    {
        __result = resolution.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BEStatsConfig") == 0)
    {
        __result = BEStatsConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "BFWStatsConfig") == 0)
    {
        __result = BFWStatsConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctThresToSync") == 0)
    {
        ParameterUtils::DoubleToString((double)nonSatPctThresToSync, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "convCapping") == 0)
    {
        __result = convCapping.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "calibrationFileConfig") == 0)
    {
        __result = calibrationFileConfig.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "statsSelection") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            statsSelection = (StatsTypeToSync)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "resolution") == 0)
    {
        __result = resolution.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BEStatsConfig") == 0)
    {
        __result = BEStatsConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "BFWStatsConfig") == 0)
    {
        __result = BFWStatsConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctThresToSync") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            nonSatPctThresToSync = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "convCapping") == 0)
    {
        __result = convCapping.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "calibrationFileConfig") == 0)
    {
        __result = calibrationFileConfig.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enable", ParameterParserDataType::Boolean, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enable, 0));
    }

    // statsSelection
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("statsSelection", ParameterParserDataType::Enum, (double)(UINT32)statsSelection, 0));
    }
    else if (PARAMETER_STRCMP(__name, "statsSelection") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)statsSelection, 0));
    }

    // resolution
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("resolution", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "resolution") == 0)
    {
        __result = resolution.GetInfo(&__path[__pos], __info);
    }

    // BEStatsConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BEStatsConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BEStatsConfig") == 0)
    {
        __result = BEStatsConfig.GetInfo(&__path[__pos], __info);
    }

    // BFWStatsConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("BFWStatsConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "BFWStatsConfig") == 0)
    {
        __result = BFWStatsConfig.GetInfo(&__path[__pos], __info);
    }

    // nonSatPctThresToSync
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("nonSatPctThresToSync", ParameterParserDataType::Float, (double)nonSatPctThresToSync));
    }
    else if (PARAMETER_STRCMP(__name, "nonSatPctThresToSync") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)nonSatPctThresToSync));
    }

    // convCapping
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("convCapping", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "convCapping") == 0)
    {
        __result = convCapping.GetInfo(&__path[__pos], __info);
    }

    // calibrationFileConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("calibrationFileConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "calibrationFileConfig") == 0)
    {
        __result = calibrationFileConfig.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BEStatsConfigStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "ROIAlignment") == 0)
    {
        __result = ROIAlignment.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BEStatsConfigStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "ROIAlignment") == 0)
    {
        __result = ROIAlignment.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BEStatsConfigStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // inputData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("inputData", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.GetInfo(&__path[__pos], __info);
    }

    // ROIAlignment
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("ROIAlignment", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "ROIAlignment") == 0)
    {
        __result = ROIAlignment.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BFWStatsConfigStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "fixedWeights") == 0)
    {
        if (__index < fixedWeightsCount)
        {
            ParameterUtils::DoubleToString((double)fixedWeights[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < fixedWeightsCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)fixedWeights[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "satBasedWeights") == 0)
    {
        if (__index < satBasedWeightsCount)
        {
            __result = satBasedWeights[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BFWStatsConfigStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "fixedWeights") == 0)
    {
        if (__index < fixedWeightsCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                fixedWeights[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

            __index = 0;
            while (__pos < __valueLen && __index < fixedWeightsCount)
            {
                CHAR __valueStr[MAX_SIZE];

                __pos += ParameterUtils::GetSubString(&__value[__pos], ',', __valueStr, MAX_SIZE);
                __pos++;

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    fixedWeights[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "satBasedWeights") == 0)
    {
        if (__index < satBasedWeightsCount)
        {
            __result = satBasedWeights[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool OverlapBrightnessMatchConfig::BFWStatsConfigStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // inputData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("inputData", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "inputData") == 0)
    {
        __result = inputData.GetInfo(&__path[__pos], __info);
    }

    // fixedWeights
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("fixedWeights", ParameterParserDataType::Float, true, false, fixedWeightsCount));
    }

    // satBasedWeights
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("satBasedWeights", ParameterParserDataType::Structure, true, false, satBasedWeightsCount));
    }
    else if (PARAMETER_STRCMP(__name, "satBasedWeights") == 0)
    {
        if (__index < satBasedWeightsCount)
        {
            __result = satBasedWeights[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, satBasedWeightsCount));
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "globalExpComp") == 0)
    {
        __result = globalExpComp.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "cctBasedExpComp") == 0)
    {
        __result = cctBasedExpComp.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        ParameterUtils::DoubleToString((double)enableExposureTimeMatch, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "bLockExpWhenSwitch") == 0)
    {
        ParameterUtils::DoubleToString((double)bLockExpWhenSwitch, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minFrameNumToLock") == 0)
    {
        ParameterUtils::DoubleToString((double)minFrameNumToLock, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        ParameterUtils::DoubleToString((double)SCDID, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AECExposureSyncConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "globalExpComp") == 0)
    {
        __result = globalExpComp.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "cctBasedExpComp") == 0)
    {
        __result = cctBasedExpComp.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableExposureTimeMatch = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "bLockExpWhenSwitch") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            bLockExpWhenSwitch = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minFrameNumToLock") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minFrameNumToLock = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            SCDID = (UINT32)dblValue; 
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // globalExpComp
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("globalExpComp", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "globalExpComp") == 0)
    {
        __result = globalExpComp.GetInfo(&__path[__pos], __info);
    }

    // cctBasedExpComp
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("cctBasedExpComp", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "cctBasedExpComp") == 0)
    {
        __result = cctBasedExpComp.GetInfo(&__path[__pos], __info);
    }

    // enableExposureTimeMatch
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enableExposureTimeMatch", ParameterParserDataType::Boolean, (double)enableExposureTimeMatch, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enableExposureTimeMatch") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enableExposureTimeMatch, 0));
    }

    // bLockExpWhenSwitch
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("bLockExpWhenSwitch", ParameterParserDataType::Boolean, (double)bLockExpWhenSwitch, 0));
    }
    else if (PARAMETER_STRCMP(__name, "bLockExpWhenSwitch") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)bLockExpWhenSwitch, 0));
    }

    // minFrameNumToLock
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("minFrameNumToLock", ParameterParserDataType::UInt32, (double)minFrameNumToLock, 0));
    }
    else if (PARAMETER_STRCMP(__name, "minFrameNumToLock") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)minFrameNumToLock, 0));
    }

    // SCDID
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("SCDID", ParameterParserDataType::UInt32, (double)SCDID, 0));
    }
    else if (PARAMETER_STRCMP(__name, "SCDID") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt32, (double)SCDID, 0));
    }

    return __result;
}

bool AECExposureSyncConfigType::globalExpCompStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "useTuning") == 0)
    {
        ParameterUtils::DoubleToString((double)useTuning, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::globalExpCompStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "useTuning") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            useTuning = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::globalExpCompStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enable", ParameterParserDataType::Boolean, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enable, 0));
    }

    // useTuning
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("useTuning", ParameterParserDataType::Boolean, (double)useTuning, 0));
    }
    else if (PARAMETER_STRCMP(__name, "useTuning") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)useTuning, 0));
    }

    // trigger1Data
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("trigger1Data", ParameterParserDataType::Structure, true, false, trigger1DataCount));
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, trigger1DataCount));
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::cctBasedExpCompStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        ParameterUtils::DoubleToString((double)enable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "cctCompTrigger") == 0)
    {
        if (__index < cctCompTriggerCount)
        {
            __result = cctCompTrigger[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::cctBasedExpCompStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "cctCompTrigger") == 0)
    {
        if (__index < cctCompTriggerCount)
        {
            __result = cctCompTrigger[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AECExposureSyncConfigType::cctBasedExpCompStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // enable
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("enable", ParameterParserDataType::Boolean, (double)enable, 0));
    }
    else if (PARAMETER_STRCMP(__name, "enable") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Boolean, (double)enable, 0));
    }

    // cctCompTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("cctCompTrigger", ParameterParserDataType::Structure, true, false, cctCompTriggerCount));
    }
    else if (PARAMETER_STRCMP(__name, "cctCompTrigger") == 0)
    {
        if (__index < cctCompTriggerCount)
        {
            __result = cctCompTrigger[__index].GetInfo(&__path[__pos], __info);
        }
        else
        {
            __result = true;
            __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Structure, true, false, cctCompTriggerCount));
        }
    }

    return __result;
}

bool MtrExpType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "meteirngType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)meteirngType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)exposureType, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool MtrExpType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "meteirngType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            meteirngType = (AECMtrConfigType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (AECExpConfigType)(UINT32)dblValue; 
        }
    }

    return __result;
}

bool MtrExpType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // meteirngType
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("meteirngType", ParameterParserDataType::Enum, (double)(UINT32)meteirngType, 0));
    }
    else if (PARAMETER_STRCMP(__name, "meteirngType") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)meteirngType, 0));
    }

    // exposureType
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("exposureType", ParameterParserDataType::Enum, (double)(UINT32)exposureType, 0));
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)exposureType, 0));
    }

    return __result;
}

bool MasterAndSlaveConfigType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        __result = master.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        __result = slave.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "aux") == 0)
    {
        __result = aux.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool MasterAndSlaveConfigType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        __result = master.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        __result = slave.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "aux") == 0)
    {
        __result = aux.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool MasterAndSlaveConfigType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // master
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("master", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "master") == 0)
    {
        __result = master.GetInfo(&__path[__pos], __info);
    }

    // slave
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("slave", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "slave") == 0)
    {
        __result = slave.GetInfo(&__path[__pos], __info);
    }

    // aux
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("aux", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "aux") == 0)
    {
        __result = aux.GetInfo(&__path[__pos], __info);
    }

    return __result;
}

bool AECXSyncType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "masterAndSlaveConfig") == 0)
    {
        __result = masterAndSlaveConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "luxSyncConfig") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)luxSyncConfig, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "olbmSyncConfig") == 0)
    {
        __result = olbmSyncConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "alignMasterDynamicRange") == 0)
    {
        __result = alignMasterDynamicRange.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "startConvMinFrames") == 0)
    {
        ParameterUtils::DoubleToString((double)startConvMinFrames, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AECXSyncType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "masterAndSlaveConfig") == 0)
    {
        __result = masterAndSlaveConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "luxSyncConfig") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            luxSyncConfig = (AECDualCamSlaveLuxType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "olbmSyncConfig") == 0)
    {
        __result = olbmSyncConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "alignMasterDynamicRange") == 0)
    {
        __result = alignMasterDynamicRange.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "startConvMinFrames") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            startConvMinFrames = (UINT8)dblValue; 
        }
    }

    return __result;
}

bool AECXSyncType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // module_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("module_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "module_version") == 0)
    {
        __result = module_version.GetInfo(&__path[__pos], __info);
    }

    // parameter_version
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("parameter_version", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "parameter_version") == 0)
    {
        __result = parameter_version.GetInfo(&__path[__pos], __info);
    }

    // masterAndSlaveConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("masterAndSlaveConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "masterAndSlaveConfig") == 0)
    {
        __result = masterAndSlaveConfig.GetInfo(&__path[__pos], __info);
    }

    // luxSyncConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("luxSyncConfig", ParameterParserDataType::Enum, (double)(UINT32)luxSyncConfig, 0));
    }
    else if (PARAMETER_STRCMP(__name, "luxSyncConfig") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Enum, (double)(UINT32)luxSyncConfig, 0));
    }

    // expSyncConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("expSyncConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "expSyncConfig") == 0)
    {
        __result = expSyncConfig.GetInfo(&__path[__pos], __info);
    }

    // olbmSyncConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("olbmSyncConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "olbmSyncConfig") == 0)
    {
        __result = olbmSyncConfig.GetInfo(&__path[__pos], __info);
    }

    // mtrMixConfig
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("mtrMixConfig", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "mtrMixConfig") == 0)
    {
        __result = mtrMixConfig.GetInfo(&__path[__pos], __info);
    }

    // alignMasterDynamicRange
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("alignMasterDynamicRange", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "alignMasterDynamicRange") == 0)
    {
        __result = alignMasterDynamicRange.GetInfo(&__path[__pos], __info);
    }

    // startConvMinFrames
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("startConvMinFrames", ParameterParserDataType::UInt8, (double)startConvMinFrames, 0));
    }
    else if (PARAMETER_STRCMP(__name, "startConvMinFrames") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::UInt8, (double)startConvMinFrames, 0));
    }

    return __result;
}

bool AECXSyncType::module_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)major_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)minor_revision, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        ParameterUtils::DoubleToString((double)incr_revision, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool AECXSyncType::module_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            major_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            minor_revision = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            incr_revision = (INT32)dblValue; 
        }
    }

    return __result;
}

bool AECXSyncType::module_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // major_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("major_revision", ParameterParserDataType::Int32, (double)major_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "major_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)major_revision, 0));
    }

    // minor_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("minor_revision", ParameterParserDataType::Int32, (double)minor_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "minor_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)minor_revision, 0));
    }

    // incr_revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("incr_revision", ParameterParserDataType::Int32, (double)incr_revision, 0));
    }
    else if (PARAMETER_STRCMP(__name, "incr_revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)incr_revision, 0));
    }

    return __result;
}

bool AECXSyncType::parameter_versionStruct::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        PARAMETER_STRCPY(__value, __size, revision);
        __result = true;
    }

    return __result;
}

bool AECXSyncType::parameter_versionStruct::SetValue(
    const CHAR* const __path,
    const CHAR* const /*__value*/)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

bool AECXSyncType::parameter_versionStruct::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // revision
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("revision", ParameterParserDataType::String, revision));
    }
    else if (PARAMETER_STRCMP(__name, "revision") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::String, revision));
    }

    return __result;
}

bool MultiCamCCTExpCompType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        ParameterUtils::DoubleToString((double)zoneData, __value, __size);
        __result = true;
    }

    return __result;
}

bool MultiCamCCTExpCompType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            zoneData = (float)dblValue; 
        }
    }

    return __result;
}

bool MultiCamCCTExpCompType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // zoneTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneTrigger", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetInfo(&__path[__pos], __info);
    }

    // zoneData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneData", ParameterParserDataType::Float, (double)zoneData));
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)zoneData));
    }

    return __result;
}

bool globalExpCompValueType::GetValue(
    const CHAR* const __path,
    CHAR* const       __value,
    UINT32 const      __size)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        ParameterUtils::DoubleToString((double)zoneData, __value, __size);
        __result = true;
    }

    return __result;
}

bool globalExpCompValueType::SetValue(
    const CHAR* const __path,
    const CHAR* const __value)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            zoneData = (float)dblValue; 
        }
    }

    return __result;
}

bool globalExpCompValueType::GetInfo(
    const CHAR* const           __path,
    PList<ParameterParserInfo>& __info)
{
    constexpr SIZE_T MAX_SIZE = 129;
    CHAR   __name[MAX_SIZE] = "";
    UINT32 __index          = MAX_UINT;
    bool   __result         = false;

    const UINT32 __pos = ParameterUtils::GetVariable(__path, __name, __index, MAX_SIZE);

    // zoneTrigger
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneTrigger", ParameterParserDataType::Structure));
    }
    else if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetInfo(&__path[__pos], __info);
    }

    // zoneData
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("zoneData", ParameterParserDataType::Float, (double)zoneData));
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Float, (double)zoneData));
    }

    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_FilterMethodType(
    ParameterFileSymbolTableEntry* const entry,
    FilterMethodType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(FilterMethodType::Median):
            enumValue = FilterMethodType::Median;
            result    = true;
            break;
        case static_cast<UINT32>(FilterMethodType::Average):
            enumValue = FilterMethodType::Average;
            result    = true;
            break;
        case static_cast<UINT32>(FilterMethodType::Previous):
            enumValue = FilterMethodType::Previous;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to FilterMethodType", 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_OLBMFactorConvCappingType(
    ParameterFileSymbolTableEntry* const entry,
    OLBMFactorConvCappingType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(OLBMFactorConvCappingType::CappingTypeSystemDelay):
            enumValue = OLBMFactorConvCappingType::CappingTypeSystemDelay;
            result    = true;
            break;
        case static_cast<UINT32>(OLBMFactorConvCappingType::CappingTypeCustomRatio):
            enumValue = OLBMFactorConvCappingType::CappingTypeCustomRatio;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to OLBMFactorConvCappingType", 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_StatsTypeToSync(
    ParameterFileSymbolTableEntry* const entry,
    StatsTypeToSync& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(StatsTypeToSync::BEStats):
            enumValue = StatsTypeToSync::BEStats;
            result    = true;
            break;
        case static_cast<UINT32>(StatsTypeToSync::BFWStats):
            enumValue = StatsTypeToSync::BFWStats;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to StatsTypeToSync", 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_AECDualCamSlaveLuxType(
    ParameterFileSymbolTableEntry* const entry,
    AECDualCamSlaveLuxType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(AECDualCamSlaveLuxType::Independent):
            enumValue = AECDualCamSlaveLuxType::Independent;
            result    = true;
            break;
        case static_cast<UINT32>(AECDualCamSlaveLuxType::UseMaster):
            enumValue = AECDualCamSlaveLuxType::UseMaster;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to AECDualCamSlaveLuxType", 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_AECExpConfigType(
    ParameterFileSymbolTableEntry* const entry,
    AECExpConfigType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(AECExpConfigType::AECAlgoExposureIndependent):
            enumValue = AECExpConfigType::AECAlgoExposureIndependent;
            result    = true;
            break;
        case static_cast<UINT32>(AECExpConfigType::AECAlgoExposureFollow):
            enumValue = AECExpConfigType::AECAlgoExposureFollow;
            result    = true;
            break;
        case static_cast<UINT32>(AECExpConfigType::AECAlgoExposureFollowAndFreeRun):
            enumValue = AECExpConfigType::AECAlgoExposureFollowAndFreeRun;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to AECExpConfigType", 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_AECMtrConfigType(
    ParameterFileSymbolTableEntry* const entry,
    AECMtrConfigType& enumValue,
    BYTE const alignment)
{
    bool result {false};

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

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXSyncTypeClass::AECXSyncTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(masterAndSlaveConfig);
    PARAMETER_INITIALIZE(luxSyncConfig);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(olbmSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);
    PARAMETER_INITIALIZE(alignMasterDynamicRange);
    PARAMETER_INITIALIZE(startConvMinFrames);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXSyncTypeClass::AECXSyncTypeClass(
    const CHAR* const name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(masterAndSlaveConfig);
    PARAMETER_INITIALIZE(luxSyncConfig);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(olbmSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);
    PARAMETER_INITIALIZE(alignMasterDynamicRange);
    PARAMETER_INITIALIZE(startConvMinFrames);
}

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

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

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

    PARAMETER_INITIALIZE(enableAlignDynamicRange);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableAlignDynamicRange, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(staticWeight);

    SYMBOL_TABLE_ENTRY_READ(entry, result, staticWeight, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(dynamicWeightTrigger);
    PARAMETER_INITIALIZE(postExpCompTrigger);


    // Reading Array dynamicWeightTrigger from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        dynamicWeightTriggerCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, dynamicWeightTriggerCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            dynamicWeightTriggerID = pointerEntry->ID;
            DupObjInfo* dynamicWeightTriggerDupInfo = pointerEntry->GetDupObject(dynamicWeightTriggerCount, file, line);
            if (dynamicWeightTriggerDupInfo != nullptr && dynamicWeightTriggerDupInfo->Object != nullptr)
            {
                dynamicWeightTrigger = (aecxglobalelements::aecTriggerDataFloatType*)dynamicWeightTriggerDupInfo->Object;
                if (dynamicWeightTrigger == nullptr)
                {
                    if (dynamicWeightTriggerDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dynamicWeightTrigger duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            dynamicWeightTriggerDupInfo->File, dynamicWeightTriggerDupInfo->Line, dynamicWeightTriggerDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "dynamicWeightTrigger duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            dynamicWeightTriggerDupInfo->Line, dynamicWeightTriggerDupInfo->RefCount);
                    }
                }
            }

            if (dynamicWeightTrigger == nullptr)
            {
                if (result && dynamicWeightTriggerCount > 0)
                {
                    dynamicWeightTrigger = PARAMETER_NEW aecxglobalelements::aecTriggerDataFloatType[dynamicWeightTriggerCount];
                    (void)pointerEntry->SetDupObject(dynamicWeightTrigger, dynamicWeightTriggerCount, file, line);
                }
                if (!result || dynamicWeightTrigger == nullptr)
                {
                    if (dynamicWeightTriggerCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate dynamicWeightTrigger\n");
                    }
                    dynamicWeightTriggerCount = 0;
                }
                for (UINT32 i = 0; result && i < dynamicWeightTriggerCount; i++)
                {
                    result = dynamicWeightTrigger[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (dynamicWeightTrigger == nullptr)
        {
            dynamicWeightTriggerCount = 0;
        }
    }

    // Reading Array postExpCompTrigger from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        postExpCompTriggerCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, postExpCompTriggerCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            postExpCompTriggerID = pointerEntry->ID;
            DupObjInfo* postExpCompTriggerDupInfo = pointerEntry->GetDupObject(postExpCompTriggerCount, file, line);
            if (postExpCompTriggerDupInfo != nullptr && postExpCompTriggerDupInfo->Object != nullptr)
            {
                postExpCompTrigger = (aecxglobalelements::aecTriggerDataFloatType*)postExpCompTriggerDupInfo->Object;
                if (postExpCompTrigger == nullptr)
                {
                    if (postExpCompTriggerDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "postExpCompTrigger duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            postExpCompTriggerDupInfo->File, postExpCompTriggerDupInfo->Line, postExpCompTriggerDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "postExpCompTrigger duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            postExpCompTriggerDupInfo->Line, postExpCompTriggerDupInfo->RefCount);
                    }
                }
            }

            if (postExpCompTrigger == nullptr)
            {
                if (result && postExpCompTriggerCount > 0)
                {
                    postExpCompTrigger = PARAMETER_NEW aecxglobalelements::aecTriggerDataFloatType[postExpCompTriggerCount];
                    (void)pointerEntry->SetDupObject(postExpCompTrigger, postExpCompTriggerCount, file, line);
                }
                if (!result || postExpCompTrigger == nullptr)
                {
                    if (postExpCompTriggerCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate postExpCompTrigger\n");
                    }
                    postExpCompTriggerCount = 0;
                }
                for (UINT32 i = 0; result && i < postExpCompTriggerCount; i++)
                {
                    result = postExpCompTrigger[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (postExpCompTrigger == nullptr)
        {
            postExpCompTriggerCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(dynamicMixingConfig);
    PARAMETER_INITIALIZE(staticMixingConfig);

    result = dynamicMixingConfig.Load(entry, alignment);
    if (result)
    {
        result = staticMixingConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableSaveLoadFile);
    PARAMETER_INITIALIZE(lumaDiffThresToSave);
    PARAMETER_INITIALIZE(CCTRoundingToSave);
    PARAMETER_INITIALIZE(saveDataBufferLength);
    PARAMETER_INITIALIZE(frameDurationToSave);
    PARAMETER_INITIALIZE(dataFilterMethod);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableSaveLoadFile, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, lumaDiffThresToSave, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, CCTRoundingToSave, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, saveDataBufferLength, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameDurationToSave, alignment)
    if (result)
    {
        result = aecxsync::ReadEnum_FilterMethodType(entry, dataFilterMethod, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(cappingType);
    PARAMETER_INITIALIZE(cappingRatio);

    result = aecxsync::ReadEnum_OLBMFactorConvCappingType(entry, cappingType, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, cappingRatio, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(lumaChannel);
    PARAMETER_INITIALIZE(nonSatPctChannel);


    // Reading String lumaChannel from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, lumaChannel, count, alignment)
    }

    // Reading String nonSatPctChannel from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, nonSatPctChannel, count, alignment)
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(statsChannelToAlign);
    PARAMETER_INITIALIZE(lumaRangeCriteria);
    PARAMETER_INITIALIZE(frameDurationToRun);
    PARAMETER_INITIALIZE(runOnlyWhenSceneChanged);
    PARAMETER_INITIALIZE(SCDID);
    PARAMETER_INITIALIZE(scoreThres);
    PARAMETER_INITIALIZE(scoreImproveThres);
    PARAMETER_INITIALIZE(offsetThres);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)

    // Reading String statsChannelToAlign from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, statsChannelToAlign, count, alignment)
    }
    if (result)
    {
        result = lumaRangeCriteria.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, frameDurationToRun, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, runOnlyWhenSceneChanged, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SCDID, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, scoreThres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, scoreImproveThres, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, offsetThres, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(lumaDB);
    PARAMETER_INITIALIZE(nonSatPctDB);
    PARAMETER_INITIALIZE(ROIDBDataID);

    result = lumaDB.Load(entry, alignment);
    if (result)
    {
        result = nonSatPctDB.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, ROIDBDataID, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(width);
    PARAMETER_INITIALIZE(height);

    SYMBOL_TABLE_ENTRY_READ(entry, result, width, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, height, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(statsSelection);
    PARAMETER_INITIALIZE(resolution);
    PARAMETER_INITIALIZE(BEStatsConfig);
    PARAMETER_INITIALIZE(BFWStatsConfig);
    PARAMETER_INITIALIZE(nonSatPctThresToSync);
    PARAMETER_INITIALIZE(convCapping);
    PARAMETER_INITIALIZE(calibrationFileConfig);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    if (result)
    {
        result = aecxsync::ReadEnum_StatsTypeToSync(entry, statsSelection, alignment);
    }
    if (result)
    {
        result = resolution.Load(entry, alignment);
    }
    if (result)
    {
        result = BEStatsConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = BFWStatsConfig.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, nonSatPctThresToSync, alignment)
    if (result)
    {
        result = convCapping.Load(entry, alignment);
    }
    if (result)
    {
        result = calibrationFileConfig.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(inputData);
    PARAMETER_INITIALIZE(ROIAlignment);

    result = inputData.Load(entry, alignment);
    if (result)
    {
        result = ROIAlignment.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(inputData);
    PARAMETER_INITIALIZE(fixedWeights);
    PARAMETER_INITIALIZE(satBasedWeights);

    result = inputData.Load(entry, alignment);

    // Reading Array fixedWeights from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        fixedWeightsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, fixedWeightsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            fixedWeightsID = pointerEntry->ID;
            DupObjInfo* fixedWeightsDupInfo = pointerEntry->GetDupObject(fixedWeightsCount, file, line);
            if (fixedWeightsDupInfo != nullptr && fixedWeightsDupInfo->Object != nullptr)
            {
                fixedWeights = (float*)fixedWeightsDupInfo->Object;
                if (fixedWeights == nullptr)
                {
                    if (fixedWeightsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "fixedWeights duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            fixedWeightsDupInfo->File, fixedWeightsDupInfo->Line, fixedWeightsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "fixedWeights duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            fixedWeightsDupInfo->Line, fixedWeightsDupInfo->RefCount);
                    }
                }
            }

            if (fixedWeights == nullptr)
            {
                if (result && fixedWeightsCount > 0)
                {
                    fixedWeights = pointerEntry->ReadArray<float>(fixedWeightsCount, alignment);
                    result = fixedWeights != nullptr;
                }
                if (!result || fixedWeights == nullptr)
                {
                    if (fixedWeightsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate fixedWeights\n");
                    }
                    fixedWeightsCount = 0;
                }
            }
        }
        if (fixedWeights == nullptr)
        {
            fixedWeightsCount = 0;
        }
    }

    // Reading Array satBasedWeights from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        satBasedWeightsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, satBasedWeightsCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            satBasedWeightsID = pointerEntry->ID;
            DupObjInfo* satBasedWeightsDupInfo = pointerEntry->GetDupObject(satBasedWeightsCount, file, line);
            if (satBasedWeightsDupInfo != nullptr && satBasedWeightsDupInfo->Object != nullptr)
            {
                satBasedWeights = (aecxglobalelements::TriggerSystemEndLevelType*)satBasedWeightsDupInfo->Object;
                if (satBasedWeights == nullptr)
                {
                    if (satBasedWeightsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "satBasedWeights duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            satBasedWeightsDupInfo->File, satBasedWeightsDupInfo->Line, satBasedWeightsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "satBasedWeights duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            satBasedWeightsDupInfo->Line, satBasedWeightsDupInfo->RefCount);
                    }
                }
            }

            if (satBasedWeights == nullptr)
            {
                if (result && satBasedWeightsCount > 0)
                {
                    satBasedWeights = PARAMETER_NEW aecxglobalelements::TriggerSystemEndLevelType[satBasedWeightsCount];
                    (void)pointerEntry->SetDupObject(satBasedWeights, satBasedWeightsCount, file, line);
                }
                if (!result || satBasedWeights == nullptr)
                {
                    if (satBasedWeightsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate satBasedWeights\n");
                    }
                    satBasedWeightsCount = 0;
                }
                for (UINT32 i = 0; result && i < satBasedWeightsCount; i++)
                {
                    result = satBasedWeights[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (satBasedWeights == nullptr)
        {
            satBasedWeightsCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(globalExpComp);
    PARAMETER_INITIALIZE(cctBasedExpComp);
    PARAMETER_INITIALIZE(enableExposureTimeMatch);
    PARAMETER_INITIALIZE(bLockExpWhenSwitch);
    PARAMETER_INITIALIZE(minFrameNumToLock);
    PARAMETER_INITIALIZE(SCDID);

    result = globalExpComp.Load(entry, alignment);
    if (result)
    {
        result = cctBasedExpComp.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableExposureTimeMatch, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, bLockExpWhenSwitch, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, minFrameNumToLock, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, SCDID, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(useTuning);
    PARAMETER_INITIALIZE(trigger1Data);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, useTuning, alignment)

    // Reading Array trigger1Data from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        trigger1DataCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, trigger1DataCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            trigger1DataID = pointerEntry->ID;
            DupObjInfo* trigger1DataDupInfo = pointerEntry->GetDupObject(trigger1DataCount, file, line);
            if (trigger1DataDupInfo != nullptr && trigger1DataDupInfo->Object != nullptr)
            {
                trigger1Data = (aecxglobalelements::aecTriggerDataFloatType*)trigger1DataDupInfo->Object;
                if (trigger1Data == nullptr)
                {
                    if (trigger1DataDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "trigger1Data duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            trigger1DataDupInfo->File, trigger1DataDupInfo->Line, trigger1DataDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "trigger1Data duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            trigger1DataDupInfo->Line, trigger1DataDupInfo->RefCount);
                    }
                }
            }

            if (trigger1Data == nullptr)
            {
                if (result && trigger1DataCount > 0)
                {
                    trigger1Data = PARAMETER_NEW aecxglobalelements::aecTriggerDataFloatType[trigger1DataCount];
                    (void)pointerEntry->SetDupObject(trigger1Data, trigger1DataCount, file, line);
                }
                if (!result || trigger1Data == nullptr)
                {
                    if (trigger1DataCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate trigger1Data\n");
                    }
                    trigger1DataCount = 0;
                }
                for (UINT32 i = 0; result && i < trigger1DataCount; i++)
                {
                    result = trigger1Data[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (trigger1Data == nullptr)
        {
            trigger1DataCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(cctCompTrigger);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)

    // Reading Array cctCompTrigger from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        cctCompTriggerCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, cctCompTriggerCount, alignment)
        constexpr const CHAR* const file {__FILE__};
        constexpr INT32 line {LINE_CONST};
        ParameterFileSymbolTableEntry  pointerEntryCls;
        ParameterFileSymbolTableEntry* const pointerEntry = &pointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(pointerEntryCls, entry, alignment);
        }

        if (result)
        {
            cctCompTriggerID = pointerEntry->ID;
            DupObjInfo* cctCompTriggerDupInfo = pointerEntry->GetDupObject(cctCompTriggerCount, file, line);
            if (cctCompTriggerDupInfo != nullptr && cctCompTriggerDupInfo->Object != nullptr)
            {
                cctCompTrigger = (aecxglobalelements::aecTriggerDataFloatType*)cctCompTriggerDupInfo->Object;
                if (cctCompTrigger == nullptr)
                {
                    if (cctCompTriggerDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "cctCompTrigger duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            cctCompTriggerDupInfo->File, cctCompTriggerDupInfo->Line, cctCompTriggerDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "cctCompTrigger duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            cctCompTriggerDupInfo->Line, cctCompTriggerDupInfo->RefCount);
                    }
                }
            }

            if (cctCompTrigger == nullptr)
            {
                if (result && cctCompTriggerCount > 0)
                {
                    cctCompTrigger = PARAMETER_NEW aecxglobalelements::aecTriggerDataFloatType[cctCompTriggerCount];
                    (void)pointerEntry->SetDupObject(cctCompTrigger, cctCompTriggerCount, file, line);
                }
                if (!result || cctCompTrigger == nullptr)
                {
                    if (cctCompTriggerCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate cctCompTrigger\n");
                    }
                    cctCompTriggerCount = 0;
                }
                for (UINT32 i = 0; result && i < cctCompTriggerCount; i++)
                {
                    result = cctCompTrigger[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (cctCompTrigger == nullptr)
        {
            cctCompTriggerCount = 0;
        }
    }

    return result;
}

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

    PARAMETER_INITIALIZE(meteirngType);
    PARAMETER_INITIALIZE(exposureType);

    result = aecxsync::ReadEnum_AECMtrConfigType(entry, meteirngType, alignment);
    if (result)
    {
        result = aecxsync::ReadEnum_AECExpConfigType(entry, exposureType, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(master);
    PARAMETER_INITIALIZE(slave);
    PARAMETER_INITIALIZE(aux);

    result = master.Load(entry, alignment);
    if (result)
    {
        result = slave.Load(entry, alignment);
    }
    if (result)
    {
        result = aux.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(masterAndSlaveConfig);
    PARAMETER_INITIALIZE(luxSyncConfig);
    PARAMETER_INITIALIZE(expSyncConfig);
    PARAMETER_INITIALIZE(olbmSyncConfig);
    PARAMETER_INITIALIZE(mtrMixConfig);
    PARAMETER_INITIALIZE(alignMasterDynamicRange);
    PARAMETER_INITIALIZE(startConvMinFrames);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = masterAndSlaveConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = aecxsync::ReadEnum_AECDualCamSlaveLuxType(entry, luxSyncConfig, alignment);
    }
    if (result)
    {
        result = expSyncConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = olbmSyncConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = mtrMixConfig.Load(entry, alignment);
    }
    if (result)
    {
        result = alignMasterDynamicRange.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, startConvMinFrames, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECXSyncType::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;
}

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

    PARAMETER_INITIALIZE(revision);


    // Reading String revision from symbol table
    {
        UINT32 count = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, count, alignment)
        ParameterFileSymbolTableEntry stringPointerEntryCls;
        ParameterFileSymbolTableEntry* const stringPointerEntry = &stringPointerEntryCls;
        if (result)
        {
            result = entry->Table->ReadPointerEntry(stringPointerEntryCls, entry, alignment);
        }
        SYMBOL_TABLE_ENTRY_READ_STRING(stringPointerEntry, result, revision, count, alignment)
    }

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, zoneData, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    SYMBOL_TABLE_ENTRY_READ(entry, result, zoneData, alignment)

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload DynamicMixingConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void DynamicMixingConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(dynamicWeightTrigger))
    {
        PARAMETER_DELETE[] dynamicWeightTrigger;
    }
    dynamicWeightTrigger = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(postExpCompTrigger))
    {
        PARAMETER_DELETE[] postExpCompTrigger;
    }
    postExpCompTrigger = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECMeteringMixConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECMeteringMixConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    dynamicMixingConfig.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload BFWStatsInputDataSourceType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void BFWStatsInputDataSourceType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(lumaChannel))
    {
        PARAMETER_DELETE[] lumaChannel;
    }
    lumaChannel = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(nonSatPctChannel))
    {
        PARAMETER_DELETE[] nonSatPctChannel;
    }
    nonSatPctChannel = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload BEROIAlignConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void BEROIAlignConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(statsChannelToAlign))
    {
        PARAMETER_DELETE[] statsChannelToAlign;
    }
    statsChannelToAlign = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload OverlapBrightnessMatchConfig
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OverlapBrightnessMatchConfig::Unload(ParameterFileSymbolTable* const __table)
{
    BEStatsConfig.Unload(__table);
    BFWStatsConfig.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload OverlapBrightnessMatchConfig_BEStatsConfigStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OverlapBrightnessMatchConfig::BEStatsConfigStruct::Unload(ParameterFileSymbolTable* const __table)
{
    ROIAlignment.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload OverlapBrightnessMatchConfig_BFWStatsConfigStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OverlapBrightnessMatchConfig::BFWStatsConfigStruct::Unload(ParameterFileSymbolTable* const __table)
{
    inputData.Unload(__table);
    if (__table != nullptr && __table->ReleaseDupObject(fixedWeights))
    {
        PARAMETER_DELETE[] fixedWeights;
    }
    fixedWeights = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(satBasedWeights))
    {
        PARAMETER_DELETE[] satBasedWeights;
    }
    satBasedWeights = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECExposureSyncConfigType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECExposureSyncConfigType::Unload(ParameterFileSymbolTable* const __table)
{
    globalExpComp.Unload(__table);
    cctBasedExpComp.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECExposureSyncConfigType_globalExpCompStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECExposureSyncConfigType::globalExpCompStruct::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(trigger1Data))
    {
        PARAMETER_DELETE[] trigger1Data;
    }
    trigger1Data = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECExposureSyncConfigType_cctBasedExpCompStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECExposureSyncConfigType::cctBasedExpCompStruct::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(cctCompTrigger))
    {
        PARAMETER_DELETE[] cctCompTrigger;
    }
    cctCompTrigger = nullptr;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXSyncType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXSyncType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    expSyncConfig.Unload(__table);
    olbmSyncConfig.Unload(__table);
    mtrMixConfig.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXSyncType::parameter_versionStruct::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(revision))
    {
        PARAMETER_DELETE[] revision;
    }
    revision = nullptr;
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Create module, and return a new object
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ParameterModule* AECXSyncTypeClass::Create(
    ModuleData*    moduleData,
    DefaultModule* const defModule) const
{
    AECXSyncTypeClass* 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 = (AECXSyncTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AECXSyncTypeClass(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 AECXSyncTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECXSyncTypeClass, binary name (%s) does not match source name (%s)\n",
            moduleData->Type, Type);
    }

    return (ParameterModule*)cls;
}

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

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

        ParameterFileSymbolTableEntry  entryObj;
        ParameterFileSymbolTableEntry* const entry = &entryObj;
        // With EzTune enabled, the unused upper byte of SymbolTableID value can change, so clear it
        result = table->Find(entryObj, SymbolTableID & 0x00ffffff);

        if (!result)
        {
            PARAMETER_LOG_ERROR(entry->SetManager, "AECXSyncTypeClass::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 AECXSyncTypeClass::UnloadModule()
{
    if (Loaded)
    {
        if (Data != nullptr && Data->SymbolTable != nullptr)
        {
            Unload(Data->SymbolTable);
        }
        else
        {
            PARAMETER_LOG_ERROR(Data != nullptr ? Data->SetManager : nullptr, "UnloadModule %s called with nullptr "
                "Data->SymbolTable object\n", Name);
            Unload(nullptr);
        }
        Loaded = false;
    }
}

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

AECXSYNC_NAMESPACE_END
