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

#include "aecxflashsnapshot.h"
#include "parametersetmanager.h"

AECXFLASHSNAPSHOT_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool FlashSnapshotLux::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, "lumaHighDataID") == 0)
    {
        ParameterUtils::DoubleToString((double)lumaHighDataID, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "defaultTarget") == 0)
    {
        ParameterUtils::DoubleToString((double)defaultTarget, __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 FlashSnapshotLux::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, "lumaHighDataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            lumaHighDataID = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "defaultTarget") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            defaultTarget = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "exposureType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            exposureType = (aecxglobalelements::AECXExposureSelection)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

    // defaultTarget
    if (__name[0] == '\0')
    {
        __result = true;
        __info.Add(ParameterParserInfo("defaultTarget", ParameterParserDataType::Int32, (double)defaultTarget, 0));
    }
    else if (PARAMETER_STRCMP(__name, "defaultTarget") == 0)
    {
        __result = true;
        __info.Add(ParameterParserInfo(nullptr, ParameterParserDataType::Int32, (double)defaultTarget, 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 FlashStatsDebugInfoType::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, "flashOffChannelName") == 0)
    {
        PARAMETER_STRCPY(__value, __size, flashOffChannelName);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "flashLowChannelName") == 0)
    {
        PARAMETER_STRCPY(__value, __size, flashLowChannelName);
        __result = true;
    }

    return __result;
}

bool FlashStatsDebugInfoType::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, "flashOffChannelName") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "flashLowChannelName") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }

    return __result;
}

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

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

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

    return __result;
}

bool FlashBackupControl::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, "channelInName") == 0)
    {
        PARAMETER_STRCPY(__value, __size, channelInName);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "channelOutName") == 0)
    {
        PARAMETER_STRCPY(__value, __size, channelOutName);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "maxElementCount") == 0)
    {
        ParameterUtils::DoubleToString((double)maxElementCount, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool FlashBackupControl::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, "channelInName") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "channelOutName") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "maxElementCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            maxElementCount = (UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool FlashStatsControlType::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, "backupOff") == 0)
    {
        if (__index < backupOffCount)
        {
            __result = backupOff[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "backupLow") == 0)
    {
        if (__index < backupLowCount)
        {
            __result = backupLow[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "backupHigh") == 0)
    {
        if (__index < backupHighCount)
        {
            __result = backupHigh[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "debugInfo") == 0)
    {
        __result = debugInfo.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

bool FlashStatsControlType::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, "backupOff") == 0)
    {
        if (__index < backupOffCount)
        {
            __result = backupOff[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "backupLow") == 0)
    {
        if (__index < backupLowCount)
        {
            __result = backupLow[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "backupHigh") == 0)
    {
        if (__index < backupHighCount)
        {
            __result = backupHigh[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "debugInfo") == 0)
    {
        __result = debugInfo.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool AECXFlashSnapshotType::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 AECXFlashSnapshotType::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 AECXFlashSnapshotType::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 AECXFlashSnapshotType::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 AECXFlashSnapshotType::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 AECXFlashSnapshotType::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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXFlashSnapshotTypeClass::AECXFlashSnapshotTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(statsControl);
    PARAMETER_INITIALIZE(flashSnapshotLux);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXFlashSnapshotTypeClass::AECXFlashSnapshotTypeClass(
    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(statsControl);
    PARAMETER_INITIALIZE(flashSnapshotLux);
}

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

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

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

    PARAMETER_INITIALIZE(lumaHighDataID);
    PARAMETER_INITIALIZE(defaultTarget);
    PARAMETER_INITIALIZE(exposureType);

    SYMBOL_TABLE_ENTRY_READ(entry, result, lumaHighDataID, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, defaultTarget, alignment)
    if (result)
    {
        result = aecxglobalelements::ReadEnum_AECXExposureSelection(entry, exposureType, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(flashOffChannelName);
    PARAMETER_INITIALIZE(flashLowChannelName);


    // Reading String flashOffChannelName 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, flashOffChannelName, count, alignment)
    }

    // Reading String flashLowChannelName 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, flashLowChannelName, count, alignment)
    }

    return result;
}

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

    PARAMETER_INITIALIZE(channelInName);
    PARAMETER_INITIALIZE(channelOutName);
    PARAMETER_INITIALIZE(maxElementCount);


    // Reading String channelInName 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, channelInName, count, alignment)
    }

    // Reading String channelOutName 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, channelOutName, count, alignment)
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, maxElementCount, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(backupOff);
    PARAMETER_INITIALIZE(backupLow);
    PARAMETER_INITIALIZE(backupHigh);
    PARAMETER_INITIALIZE(debugInfo);


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

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

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

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

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(statsControl);
    PARAMETER_INITIALIZE(flashSnapshotLux);

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool AECXFlashSnapshotType::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 AECXFlashSnapshotType::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 FlashStatsDebugInfoType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FlashStatsDebugInfoType::Unload(ParameterFileSymbolTable* const __table)
{
    if (__table != nullptr && __table->ReleaseDupObject(flashOffChannelName))
    {
        PARAMETER_DELETE[] flashOffChannelName;
    }
    flashOffChannelName = nullptr;
    if (__table != nullptr && __table->ReleaseDupObject(flashLowChannelName))
    {
        PARAMETER_DELETE[] flashLowChannelName;
    }
    flashLowChannelName = nullptr;
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload FlashStatsControlType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void FlashStatsControlType::Unload(ParameterFileSymbolTable* const __table)
{
    for (UINT32 i = 0; i < backupOffCount; i++)
    {
        backupOff[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(backupOff))
    {
        PARAMETER_DELETE[] backupOff;
    }
    backupOff = nullptr;
    for (UINT32 i = 0; i < backupLowCount; i++)
    {
        backupLow[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(backupLow))
    {
        PARAMETER_DELETE[] backupLow;
    }
    backupLow = nullptr;
    for (UINT32 i = 0; i < backupHighCount; i++)
    {
        backupHigh[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(backupHigh))
    {
        PARAMETER_DELETE[] backupHigh;
    }
    backupHigh = nullptr;
    debugInfo.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXFlashSnapshotType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXFlashSnapshotType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    statsControl.Unload(__table);
}

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

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

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

    return (ParameterModule*)cls;
}

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

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

AECXFLASHSNAPSHOT_NAMESPACE_END
