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

#include "aecxstartup.h"
#include "parametersetmanager.h"

AECXSTARTUP_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool CenterWeightedMtrTable::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, "weight") == 0)
    {
        if (__index < 16)
        {
            ParameterUtils::DoubleToString((double)weight[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 16; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool CenterWeightedMtrTable::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, "weight") == 0)
    {
        if (__index < 16)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                weight[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    weight[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool CenterWeightedMtrTable::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);

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

    return __result;
}

bool AONCenterWeightLumaType::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, "mtrWightTable") == 0)
    {
        __result = mtrWightTable.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "frameLumaTarget") == 0)
    {
        if (__index < frameLumaTargetCount)
        {
            __result = frameLumaTarget[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AONCenterWeightLumaType::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, "mtrWightTable") == 0)
    {
        __result = mtrWightTable.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "frameLumaTarget") == 0)
    {
        if (__index < frameLumaTargetCount)
        {
            __result = frameLumaTarget[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AONCenterWeightLumaType::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);

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

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

    return __result;
}

bool AONTimeStampLimitedType::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, "enableTimeStampJudge") == 0)
    {
        ParameterUtils::DoubleToString((double)enableTimeStampJudge, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aonTimeStampThres") == 0)
    {
        if (__index < aonTimeStampThresCount)
        {
            __result = aonTimeStampThres[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AONTimeStampLimitedType::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, "enableTimeStampJudge") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableTimeStampJudge = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aonTimeStampThres") == 0)
    {
        if (__index < aonTimeStampThresCount)
        {
            __result = aonTimeStampThres[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

bool AONTimeStampLimitedType::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);

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

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

    return __result;
}

bool LumaWeightType::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, "weight") == 0)
    {
        if (__index < 3)
        {
            ParameterUtils::DoubleToString((double)weight[__index], __value, __size);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 3; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)weight[i], &__value[__valuePos], (INT32)(__size - __valuePos));
            }
            __result = true;
        }
    }

    return __result;
}

bool LumaWeightType::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, "weight") == 0)
    {
        if (__index < 3)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                weight[__index] = (float)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    weight[__index] = (float)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool LumaWeightType::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);

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

    return __result;
}

bool AONSensorAssitType::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, "enableAonTargetSI") == 0)
    {
        ParameterUtils::DoubleToString((double)enableAonTargetSI, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableCapAonLuxIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)enableCapAonLuxIndex, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aonLuxDiffThres") == 0)
    {
        __result = aonLuxDiffThres.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "lumaWeight") == 0)
    {
        __result = lumaWeight.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "aonSiAdaptRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)aonSiAdaptRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aonLuxIndexAdaptOffset") == 0)
    {
        ParameterUtils::DoubleToString((double)aonLuxIndexAdaptOffset, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aonMaxExpIndex") == 0)
    {
        ParameterUtils::DoubleToString((double)aonMaxExpIndex, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "aonTimeStampAvailableThres") == 0)
    {
        __result = aonTimeStampAvailableThres.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "frameSALuma") == 0)
    {
        __result = frameSALuma.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "faceSALuma") == 0)
    {
        __result = faceSALuma.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AONSensorAssitType::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, "enableAonTargetSI") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableAonTargetSI = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableCapAonLuxIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableCapAonLuxIndex = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aonLuxDiffThres") == 0)
    {
        __result = aonLuxDiffThres.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "lumaWeight") == 0)
    {
        __result = lumaWeight.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "aonSiAdaptRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aonSiAdaptRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aonLuxIndexAdaptOffset") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aonLuxIndexAdaptOffset = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aonMaxExpIndex") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            aonMaxExpIndex = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "aonTimeStampAvailableThres") == 0)
    {
        __result = aonTimeStampAvailableThres.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "frameSALuma") == 0)
    {
        __result = frameSALuma.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "faceSALuma") == 0)
    {
        __result = faceSALuma.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool AONSensorAssitType::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));
    }

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool LightDataTriggerDataType::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, "exposureZone") == 0)
    {
        __result = exposureZone.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "initialExposure") == 0)
    {
        if (__index < 4)
        {
            ParameterUtils::DoubleToString((double)initialExposure[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < 4; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)initialExposure[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }

    return __result;
}

bool LightDataTriggerDataType::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, "exposureZone") == 0)
    {
        __result = exposureZone.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "initialExposure") == 0)
    {
        if (__index < 4)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                initialExposure[__index] = (UINT64)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    initialExposure[__index] = (UINT64)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }

    return __result;
}

bool LightDataTriggerDataType::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);

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

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

    return __result;
}

bool LightDataTriggerLevelType::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, "trigger") == 0)
    {
        __result = trigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        __result = trigger1Data.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool LightDataTriggerLevelType::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, "trigger") == 0)
    {
        __result = trigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "trigger1Data") == 0)
    {
        __result = trigger1Data.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool LightDataTriggerLevelType::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);

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

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

    return __result;
}

bool ExtSensorAssitType::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, "tables") == 0)
    {
        if (__index < tablesCount)
        {
            __result = tables[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "advExtSensorAssistStartEnable") == 0)
    {
        ParameterUtils::DoubleToString((double)advExtSensorAssistStartEnable, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "spectralLuxDiffThres") == 0)
    {
        __result = spectralLuxDiffThres.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "initDrcGain") == 0)
    {
        ParameterUtils::DoubleToString((double)initDrcGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "initDarkboostGain") == 0)
    {
        ParameterUtils::DoubleToString((double)initDarkboostGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool ExtSensorAssitType::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, "tables") == 0)
    {
        if (__index < tablesCount)
        {
            __result = tables[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "advExtSensorAssistStartEnable") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            advExtSensorAssistStartEnable = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "spectralLuxDiffThres") == 0)
    {
        __result = spectralLuxDiffThres.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "initDrcGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            initDrcGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "initDarkboostGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            initDarkboostGain = (float)dblValue; 
        }
    }

    return __result;
}

bool ExtSensorAssitType::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));
    }

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

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

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

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

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

    return __result;
}

bool WarmStartType::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, "enableWarmStart") == 0)
    {
        ParameterUtils::DoubleToString((double)enableWarmStart, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "enableWarmStartCapping") == 0)
    {
        ParameterUtils::DoubleToString((double)enableWarmStartCapping, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "limits") == 0)
    {
        __result = limits.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool WarmStartType::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, "enableWarmStart") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableWarmStart = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "enableWarmStartCapping") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableWarmStartCapping = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "limits") == 0)
    {
        __result = limits.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool WarmStartType::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);

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

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

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

    return __result;
}

bool AECModeStartConfig::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, "type") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)type, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "exposures") == 0)
    {
        if (__index < exposuresCount)
        {
            ParameterUtils::DoubleToString((double)exposures[__index], __value, __size, 0);
            __result = true;
        }
        else
        {
            SIZE_T __valuePos = 0;
            for (UINT32 i = 0; i < exposuresCount; i++)
            {
                if (i > 0)
                {
                    PARAMETER_STRCAT(__value, __size, ",");
                    __valuePos = PARAMETER_STRLEN(__value);
                }
                ParameterUtils::DoubleToString((double)exposures[i], &__value[__valuePos], (INT32)(__size - __valuePos), 0);
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "drcGain") == 0)
    {
        ParameterUtils::DoubleToString((double)drcGain, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "darkboostGain") == 0)
    {
        ParameterUtils::DoubleToString((double)darkboostGain, __value, __size);
        __result = true;
    }

    return __result;
}

bool AECModeStartConfig::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, "type") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            type = (aecxglobalelements::AECXStartUpExpType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exposures") == 0)
    {
        if (__index < exposuresCount)
        {
            const double dblValue = ParameterUtils::StringToDouble(__value, __result);
            if (__result)
            {
                exposures[__index] = (UINT64)dblValue; 
            }
        }
        else
        {
            SIZE_T __valueLen = PARAMETER_STRLEN(__value);
            UINT32 __pos = 0;

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

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

                const double dblValue = ParameterUtils::StringToDouble(__valueStr, __result);
                if (__result)
                {
                    exposures[__index] = (UINT64)dblValue; 
                }
                __index++;
            }
            __result = true;
        }
    }
    else if (PARAMETER_STRCMP(__name, "drcGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            drcGain = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "darkboostGain") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            darkboostGain = (float)dblValue; 
        }
    }

    return __result;
}

bool AECModeStartConfig::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);

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

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

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

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

    return __result;
}

bool AECXStartUpType::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, "defaultStart") == 0)
    {
        __result = defaultStart.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "modeStarts") == 0)
    {
        if (__index < modeStartsCount)
        {
            __result = modeStarts[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "warmStart") == 0)
    {
        __result = warmStart.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "extSensorAssitStart") == 0)
    {
        __result = extSensorAssitStart.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "aonSensorAssitStart") == 0)
    {
        __result = aonSensorAssitStart.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool AECXStartUpType::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, "defaultStart") == 0)
    {
        __result = defaultStart.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "modeStarts") == 0)
    {
        if (__index < modeStartsCount)
        {
            __result = modeStarts[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "warmStart") == 0)
    {
        __result = warmStart.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "extSensorAssitStart") == 0)
    {
        __result = extSensorAssitStart.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "aonSensorAssitStart") == 0)
    {
        __result = aonSensorAssitStart.SetValue(&__path[__pos], __value);
    }

    return __result;
}

bool AECXStartUpType::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);
    }

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

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

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

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

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

    return __result;
}

bool AECXStartUpType::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 AECXStartUpType::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 AECXStartUpType::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 AECXStartUpType::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 AECXStartUpType::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 AECXStartUpType::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;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXStartUpTypeClass::AECXStartUpTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(defaultStart);
    PARAMETER_INITIALIZE(modeStartsCount);
    PARAMETER_INITIALIZE(modeStarts);
    PARAMETER_INITIALIZE(warmStart);
    PARAMETER_INITIALIZE(extSensorAssitStart);
    PARAMETER_INITIALIZE(aonSensorAssitStart);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXStartUpTypeClass::AECXStartUpTypeClass(
    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(defaultStart);
    PARAMETER_INITIALIZE(modeStarts);
    PARAMETER_INITIALIZE(warmStart);
    PARAMETER_INITIALIZE(extSensorAssitStart);
    PARAMETER_INITIALIZE(aonSensorAssitStart);
}

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

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

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

    PARAMETER_INITIALIZE(weight);

    result = entry->ReadArray(weight, 16, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(mtrWightTable);
    PARAMETER_INITIALIZE(frameLumaTarget);

    result = mtrWightTable.Load(entry, alignment);

    // Reading Array frameLumaTarget from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        frameLumaTargetCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, frameLumaTargetCount, 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)
        {
            frameLumaTargetID = pointerEntry->ID;
            DupObjInfo* frameLumaTargetDupInfo = pointerEntry->GetDupObject(frameLumaTargetCount, file, line);
            if (frameLumaTargetDupInfo != nullptr && frameLumaTargetDupInfo->Object != nullptr)
            {
                frameLumaTarget = (aecxglobalelements::aecTriggerDataFloatType*)frameLumaTargetDupInfo->Object;
                if (frameLumaTarget == nullptr)
                {
                    if (frameLumaTargetDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "frameLumaTarget duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            frameLumaTargetDupInfo->File, frameLumaTargetDupInfo->Line, frameLumaTargetDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "frameLumaTarget duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            frameLumaTargetDupInfo->Line, frameLumaTargetDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(enableTimeStampJudge);
    PARAMETER_INITIALIZE(aonTimeStampThres);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableTimeStampJudge, alignment)

    // Reading Array aonTimeStampThres from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        aonTimeStampThresCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, aonTimeStampThresCount, 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)
        {
            aonTimeStampThresID = pointerEntry->ID;
            DupObjInfo* aonTimeStampThresDupInfo = pointerEntry->GetDupObject(aonTimeStampThresCount, file, line);
            if (aonTimeStampThresDupInfo != nullptr && aonTimeStampThresDupInfo->Object != nullptr)
            {
                aonTimeStampThres = (aecxglobalelements::aecTriggerDataFloatType*)aonTimeStampThresDupInfo->Object;
                if (aonTimeStampThres == nullptr)
                {
                    if (aonTimeStampThresDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "aonTimeStampThres duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            aonTimeStampThresDupInfo->File, aonTimeStampThresDupInfo->Line, aonTimeStampThresDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "aonTimeStampThres duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            aonTimeStampThresDupInfo->Line, aonTimeStampThresDupInfo->RefCount);
                    }
                }
            }

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

    return result;
}

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

    PARAMETER_INITIALIZE(weight);

    result = entry->ReadArray(weight, 3, alignment);

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(enableAonTargetSI);
    PARAMETER_INITIALIZE(enableCapAonLuxIndex);
    PARAMETER_INITIALIZE(aonLuxDiffThres);
    PARAMETER_INITIALIZE(lumaWeight);
    PARAMETER_INITIALIZE(aonSiAdaptRatio);
    PARAMETER_INITIALIZE(aonLuxIndexAdaptOffset);
    PARAMETER_INITIALIZE(aonMaxExpIndex);
    PARAMETER_INITIALIZE(aonTimeStampAvailableThres);
    PARAMETER_INITIALIZE(frameSALuma);
    PARAMETER_INITIALIZE(faceSALuma);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableAonTargetSI, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableCapAonLuxIndex, alignment)
    if (result)
    {
        result = aonLuxDiffThres.Load(entry, alignment);
    }
    if (result)
    {
        result = lumaWeight.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, aonSiAdaptRatio, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aonLuxIndexAdaptOffset, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, aonMaxExpIndex, alignment)
    if (result)
    {
        result = aonTimeStampAvailableThres.Load(entry, alignment);
    }
    if (result)
    {
        result = frameSALuma.Load(entry, alignment);
    }
    if (result)
    {
        result = faceSALuma.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(exposureZone);
    PARAMETER_INITIALIZE(initialExposure);

    result = exposureZone.Load(entry, alignment);
    if (result)
    {
        result = entry->ReadArray(initialExposure, 4, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(trigger);
    PARAMETER_INITIALIZE(trigger1Data);

    result = trigger.Load(entry, alignment);
    if (result)
    {
        result = trigger1Data.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(tables);
    PARAMETER_INITIALIZE(advExtSensorAssistStartEnable);
    PARAMETER_INITIALIZE(spectralLuxDiffThres);
    PARAMETER_INITIALIZE(initDrcGain);
    PARAMETER_INITIALIZE(initDarkboostGain);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enable, alignment)

    // Reading Array tables from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        tablesCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, tablesCount, 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)
        {
            tablesID = pointerEntry->ID;
            DupObjInfo* tablesDupInfo = pointerEntry->GetDupObject(tablesCount, file, line);
            if (tablesDupInfo != nullptr && tablesDupInfo->Object != nullptr)
            {
                tables = (LightDataTriggerLevelType*)tablesDupInfo->Object;
                if (tables == nullptr)
                {
                    if (tablesDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "tables duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            tablesDupInfo->File, tablesDupInfo->Line, tablesDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "tables duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            tablesDupInfo->Line, tablesDupInfo->RefCount);
                    }
                }
            }

            if (tables == nullptr)
            {
                if (result && tablesCount > 0)
                {
                    tables = PARAMETER_NEW LightDataTriggerLevelType[tablesCount];
                    (void)pointerEntry->SetDupObject(tables, tablesCount, file, line);
                }
                if (!result || tables == nullptr)
                {
                    if (tablesCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate tables\n");
                    }
                    tablesCount = 0;
                }
                for (UINT32 i = 0; result && i < tablesCount; i++)
                {
                    result = tables[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (tables == nullptr)
        {
            tablesCount = 0;
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, advExtSensorAssistStartEnable, alignment)
    if (result)
    {
        result = spectralLuxDiffThres.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, initDrcGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, initDarkboostGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(enableWarmStart);
    PARAMETER_INITIALIZE(enableWarmStartCapping);
    PARAMETER_INITIALIZE(limits);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableWarmStart, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableWarmStartCapping, alignment)
    if (result)
    {
        result = limits.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(type);
    PARAMETER_INITIALIZE(exposures);
    PARAMETER_INITIALIZE(drcGain);
    PARAMETER_INITIALIZE(darkboostGain);

    result = aecxglobalelements::ReadEnum_AECXStartUpExpType(entry, type, alignment);

    // Reading Array exposures from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        exposuresCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, exposuresCount, 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)
        {
            exposuresID = pointerEntry->ID;
            DupObjInfo* exposuresDupInfo = pointerEntry->GetDupObject(exposuresCount, file, line);
            if (exposuresDupInfo != nullptr && exposuresDupInfo->Object != nullptr)
            {
                exposures = (UINT64*)exposuresDupInfo->Object;
                if (exposures == nullptr)
                {
                    if (exposuresDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "exposures duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            exposuresDupInfo->File, exposuresDupInfo->Line, exposuresDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "exposures duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            exposuresDupInfo->Line, exposuresDupInfo->RefCount);
                    }
                }
            }

            if (exposures == nullptr)
            {
                if (result && exposuresCount > 0)
                {
                    exposures = pointerEntry->ReadArray<UINT64>(exposuresCount, alignment);
                    result = exposures != nullptr;
                }
                if (!result || exposures == nullptr)
                {
                    if (exposuresCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate exposures\n");
                    }
                    exposuresCount = 0;
                }
            }
        }
        if (exposures == nullptr)
        {
            exposuresCount = 0;
        }
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, drcGain, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, darkboostGain, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(defaultStart);
    PARAMETER_INITIALIZE(modeStarts);
    PARAMETER_INITIALIZE(warmStart);
    PARAMETER_INITIALIZE(extSensorAssitStart);
    PARAMETER_INITIALIZE(aonSensorAssitStart);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    if (result)
    {
        result = defaultStart.Load(entry, alignment);
    }

    // Reading Array modeStarts from symbol table
    // Do not check result value here because the count value needs to be initialized in this block
    {
        modeStartsCount = 0;
        SYMBOL_TABLE_ENTRY_READ(entry, result, modeStartsCount, 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)
        {
            modeStartsID = pointerEntry->ID;
            DupObjInfo* modeStartsDupInfo = pointerEntry->GetDupObject(modeStartsCount, file, line);
            if (modeStartsDupInfo != nullptr && modeStartsDupInfo->Object != nullptr)
            {
                modeStarts = (AECModeStartConfig*)modeStartsDupInfo->Object;
                if (modeStarts == nullptr)
                {
                    if (modeStartsDupInfo->File != nullptr)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "modeStarts duplicate found but object is nullptr: %s:%d, RefCount: %d\n",
                            modeStartsDupInfo->File, modeStartsDupInfo->Line, modeStartsDupInfo->RefCount);
                    }
                    else
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "modeStarts duplicate found but Object is nullptr: <nullptr file ptr>:%d, RefCount: %d\n",
                            modeStartsDupInfo->Line, modeStartsDupInfo->RefCount);
                    }
                }
            }

            if (modeStarts == nullptr)
            {
                if (result && modeStartsCount > 0)
                {
                    modeStarts = PARAMETER_NEW AECModeStartConfig[modeStartsCount];
                    (void)pointerEntry->SetDupObject(modeStarts, modeStartsCount, file, line);
                }
                if (!result || modeStarts == nullptr)
                {
                    if (modeStartsCount > 0)
                    {
                        PARAMETER_LOG_ERROR(entry->SetManager, "Failed to allocate modeStarts\n");
                    }
                    modeStartsCount = 0;
                }
                for (UINT32 i = 0; result && i < modeStartsCount; i++)
                {
                    result = modeStarts[i].Load(pointerEntry, alignment);
                }
            }
        }
        if (modeStarts == nullptr)
        {
            modeStartsCount = 0;
        }
    }
    if (result)
    {
        result = warmStart.Load(entry, alignment);
    }
    if (result)
    {
        result = extSensorAssitStart.Load(entry, alignment);
    }
    if (result)
    {
        result = aonSensorAssitStart.Load(entry, alignment);
    }

    return result;
}

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

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AONSensorAssitType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AONSensorAssitType::Unload(ParameterFileSymbolTable* const __table)
{
    aonTimeStampAvailableThres.Unload(__table);
    frameSALuma.Unload(__table);
    faceSALuma.Unload(__table);
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXStartUpType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXStartUpType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    defaultStart.Unload(__table);
    for (UINT32 i = 0; i < modeStartsCount; i++)
    {
        modeStarts[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(modeStarts))
    {
        PARAMETER_DELETE[] modeStarts;
    }
    modeStarts = nullptr;
    extSensorAssitStart.Unload(__table);
    aonSensorAssitStart.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXStartUpType::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 AECXStartUpType::Release()
{
    ((AECXStartUpTypeClass*)this)->Release();
}

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

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

    return (ParameterModule*)cls;
}

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

    if (!Loaded)
    {
        BYTE const alignment = table->Alignment;
        AECXStartUpTypeClass* 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, "AECXStartUpTypeClass::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 AECXStartUpTypeClass::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 AECXStartUpTypeClass::Release()
{
    ParameterModule::Release();
}

AECXSTARTUP_NAMESPACE_END
