////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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 V7.4.1 (8cca6579792b9fcef3bc725ff070c5ec453c7c85)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

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

#include "aecxexternalmapprocessor.h"
#include "parametersetmanager.h"

AECXEXTERNALMAPPROCESSOR_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool OutputInfoType::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;

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

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

    return __result;
}

bool OutputInfoType::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;

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

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

    return __result;
}

bool OutputInfoType::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;

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool MapProcessorRangeType::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, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool MapProcessorRangeType::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, "trigger1Data") == 0)
    {
        if (__index < trigger1DataCount)
        {
            __result = trigger1Data[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

    return __result;
}

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

    return __result;
}

bool InputInfoType::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, "mapType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            mapType = (ExternalMapType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "dataIDWeight2D") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataIDWeight2D = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "statsThres") == 0)
    {
        __result = statsThres.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool ExternalMapProcessorType::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, "description") == 0)
    {
        PARAMETER_STRCPY(__value, __size, description);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "input") == 0)
    {
        __result = input.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "output") == 0)
    {
        __result = output.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "validGridRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)validGridRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "validStateConsecutiveFrameCount") == 0)
    {
        ParameterUtils::DoubleToString((double)validStateConsecutiveFrameCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "invalidGridRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)invalidGridRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "invalidStateConsecutiveFrameCount") == 0)
    {
        ParameterUtils::DoubleToString((double)invalidStateConsecutiveFrameCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "timeoutGridRatio") == 0)
    {
        ParameterUtils::DoubleToString((double)timeoutGridRatio, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "timeoutStateConsecutiveFrameCount") == 0)
    {
        ParameterUtils::DoubleToString((double)timeoutStateConsecutiveFrameCount, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "spatialConsistencyStrength") == 0)
    {
        ParameterUtils::DoubleToString((double)spatialConsistencyStrength, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool ExternalMapProcessorType::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, "description") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "input") == 0)
    {
        __result = input.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "output") == 0)
    {
        __result = output.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "validGridRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            validGridRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "validStateConsecutiveFrameCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            validStateConsecutiveFrameCount = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "invalidGridRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            invalidGridRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "invalidStateConsecutiveFrameCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            invalidStateConsecutiveFrameCount = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "timeoutGridRatio") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            timeoutGridRatio = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "timeoutStateConsecutiveFrameCount") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            timeoutStateConsecutiveFrameCount = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "spatialConsistencyStrength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            spatialConsistencyStrength = (UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

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

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

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

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

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

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

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

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

    return __result;
}

bool AECXExternalMapProcessorType::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, "externalMapProcessor") == 0)
    {
        if (__index < externalMapProcessorCount)
        {
            __result = externalMapProcessor[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECXExternalMapProcessorType::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, "externalMapProcessor") == 0)
    {
        if (__index < externalMapProcessorCount)
        {
            __result = externalMapProcessor[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

    return __result;
}

bool AECXExternalMapProcessorType::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;

    (void)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 AECXExternalMapProcessorType::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;

    (void)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 AECXExternalMapProcessorType::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;

    (void)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 AECXExternalMapProcessorType::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;

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

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

    return __result;
}

bool AECXExternalMapProcessorType::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;

    (void)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 AECXExternalMapProcessorType::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;

    (void)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
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXExternalMapProcessorTypeClass::AECXExternalMapProcessorTypeClass(
    const CHAR* name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(externalMapProcessorCount);
    PARAMETER_INITIALIZE(externalMapProcessor);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXExternalMapProcessorTypeClass::AECXExternalMapProcessorTypeClass(
    const CHAR*       name,
    ModuleData* const moduleData)
    : ParameterModule(name, MAJOR, MINOR, PATCH, moduleData)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(externalMapProcessor);
}

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load OutputInfoType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OutputInfoType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(dataIDWeight2D);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xf7b546e7d609f884;
        entry->ReadSimpleTypeFixedArray(&dataIDWeight2D, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void OutputInfoType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        OutputInfoType* arrayPtr = (OutputInfoType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* OutputInfoType::AllocArray(
    UINT32 __count)
{
    OutputInfoType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW OutputInfoType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load RangeStartEndType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void RangeStartEndType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger1Lux);
    PARAMETER_INITIALIZE(triggerDataRange);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x8e4d082e1e53933d;
        trigger1Lux.Load(localParams);
        localParams.NameHash        = 0xa4cebb1dec3e21c7;
        triggerDataRange.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void RangeStartEndType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        RangeStartEndType* arrayPtr = (RangeStartEndType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* RangeStartEndType::AllocArray(
    UINT32 __count)
{
    RangeStartEndType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW RangeStartEndType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load MapProcessorRangeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void MapProcessorRangeType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(trigger1DataCount);
    PARAMETER_INITIALIZE(trigger1Data);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xb64c9b874efc3775;
        entry->ReadStructureArray(trigger1Data, trigger1DataCount, trigger1DataID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void MapProcessorRangeType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        MapProcessorRangeType* arrayPtr = (MapProcessorRangeType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* MapProcessorRangeType::AllocArray(
    UINT32 __count)
{
    MapProcessorRangeType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW MapProcessorRangeType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load InputInfoType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void InputInfoType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(mapType);
    PARAMETER_INITIALIZE(dataIDWeight2D);
    PARAMETER_INITIALIZE(statsThres);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xe9a1065f2e02b1c6;
        entry->ReadEnumFixedArray(&mapType, 1, localParams);
        localParams.NameHash = 0xf7b546e7d609f884;
        entry->ReadSimpleTypeFixedArray(&dataIDWeight2D, 1, localParams);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xb2badb9f5a0f1c88;
        statsThres.Load(localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void InputInfoType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        InputInfoType* arrayPtr = (InputInfoType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* InputInfoType::AllocArray(
    UINT32 __count)
{
    InputInfoType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW InputInfoType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load ExternalMapProcessorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExternalMapProcessorType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(enable);
    PARAMETER_INITIALIZE(description);
    PARAMETER_INITIALIZE(input);
    PARAMETER_INITIALIZE(output);
    PARAMETER_INITIALIZE(validGridRatio);
    PARAMETER_INITIALIZE(validStateConsecutiveFrameCount);
    PARAMETER_INITIALIZE(invalidGridRatio);
    PARAMETER_INITIALIZE(invalidStateConsecutiveFrameCount);
    PARAMETER_INITIALIZE(timeoutGridRatio);
    PARAMETER_INITIALIZE(timeoutStateConsecutiveFrameCount);
    PARAMETER_INITIALIZE(spatialConsistencyStrength);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xb3c00adf8e304e57;
        entry->ReadSimpleTypeFixedArray(&enable, 1, localParams);
        localParams.NameHash = 0x938412c624b5c1a1;
        entry->ReadStringFixedArray(&description, 1, localParams, __COUNTER__);
        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0x8b4e7ca49b162624;
        input.Load(localParams);
        localParams.NameHash        = 0xc686eb2e98958108;
        output.Load(localParams);
        localParams.NameHash = 0xce395b17d187ea50;
        entry->ReadSimpleTypeFixedArray(&validGridRatio, 1, localParams);
        localParams.NameHash = 0xc48cb9e8e29334ca;
        entry->ReadSimpleTypeFixedArray(&validStateConsecutiveFrameCount, 1, localParams);
        localParams.NameHash = 0xf9746d19bd643fec;
        entry->ReadSimpleTypeFixedArray(&invalidGridRatio, 1, localParams);
        localParams.NameHash = 0xad132fba84b6af3d;
        entry->ReadSimpleTypeFixedArray(&invalidStateConsecutiveFrameCount, 1, localParams);
        localParams.NameHash = 0xfc9d59b9fd47f397;
        entry->ReadSimpleTypeFixedArray(&timeoutGridRatio, 1, localParams);
        localParams.NameHash = 0x84cfcfaec4f87506;
        entry->ReadSimpleTypeFixedArray(&timeoutStateConsecutiveFrameCount, 1, localParams);
        localParams.NameHash = 0xa65916c6c9ea4460;
        entry->ReadSimpleTypeFixedArray(&spatialConsistencyStrength, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void ExternalMapProcessorType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        ExternalMapProcessorType* arrayPtr = (ExternalMapProcessorType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* ExternalMapProcessorType::AllocArray(
    UINT32 __count)
{
    ExternalMapProcessorType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW ExternalMapProcessorType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load AECXExternalMapProcessorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorType::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(externalMapProcessorCount);
    PARAMETER_INITIALIZE(externalMapProcessor);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.UseParent       = false;
        localParams.UseParentOffset = true;
        localParams.NameHash        = 0xe11cd9f365a2599f;
        module_version.Load(localParams);
        localParams.NameHash        = 0xca3106e199a12935;
        parameter_version.Load(localParams);
        localParams.NameHash = 0xa620be2e5291126e;
        entry->ReadStructureArray(externalMapProcessor, externalMapProcessorCount, externalMapProcessorID, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECXExternalMapProcessorType::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        AECXExternalMapProcessorType* arrayPtr = (AECXExternalMapProcessorType*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECXExternalMapProcessorType::AllocArray(
    UINT32 __count)
{
    AECXExternalMapProcessorType* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW AECXExternalMapProcessorType[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load module_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorType::module_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(major_revision);
    PARAMETER_INITIALIZE(minor_revision);
    PARAMETER_INITIALIZE(incr_revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xcd66249477636693;
        entry->ReadSimpleTypeFixedArray(&major_revision, 1, localParams);
        localParams.NameHash = 0xc5497493137a9c25;
        entry->ReadSimpleTypeFixedArray(&minor_revision, 1, localParams);
        localParams.NameHash = 0xb27b8a668efb2a56;
        entry->ReadSimpleTypeFixedArray(&incr_revision, 1, localParams);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECXExternalMapProcessorType::module_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        module_versionStruct* arrayPtr = (module_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECXExternalMapProcessorType::module_versionStruct::AllocArray(
    UINT32 __count)
{
    module_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW module_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Load parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorType::parameter_versionStruct::Load(
    ParameterLoadParameters& parentParams)
{
    PARAMETER_INITIALIZE(revision);

    ParameterFileSymbolTableEntry* const entry = parentParams.Entry;
    ParameterLoadParameters localParams(parentParams);
    localParams.Element   = nullptr;
    localParams.UseParent = false;
    localParams.Index     = 0;

    if (parentParams.Element != nullptr)
    {
        bool _posChanged = false;
        localParams.Element = entry->AdjustPositionAndGetElement(parentParams, true, _posChanged);
    }

    // If parentParams.Element != null && localParams.Element == null, then this element is not defined in the binary file.
    // If parentParams.Element == null then this binary file does not contain a definition table or
    // the full backwards compatibility feature is disabled (for memory or performance reasons)
    if (parentParams.Element == nullptr || parentParams.Element->Verified || localParams.Element != nullptr)
    {
        localParams.Position      = entry->Position;
        localParams.LoadDataLimit = entry->ReadLoadDataLimit(parentParams.LoadDataLimit);

        localParams.NameHash = 0xd594eed07a5650c5;
        entry->ReadStringFixedArray(&revision, 1, localParams, __COUNTER__);

        entry->UpdatePosition(localParams.LoadDataLimit);
    }
    else
    {
        PARAMETER_LOG_ERROR(entry->Table->SetManager, "%s: 0x%llx entry not found in the binary file, all values will be 0\n",
            __FUNCTION__, parentParams.NameHash);
    }
}

void AECXExternalMapProcessorType::parameter_versionStruct::LoadArray(
    ParameterLoadParameters& __params,
    void*                    __array,
    UINT32                   __count)
{
    if (__array != nullptr)
    {
        parameter_versionStruct* arrayPtr = (parameter_versionStruct*)__array;
        for (UINT32 i = 0; i < __count; i++)
        {
            __params.Index = i;
            arrayPtr[i].Load(__params);
        }
    }
}

void* AECXExternalMapProcessorType::parameter_versionStruct::AllocArray(
    UINT32 __count)
{
    parameter_versionStruct* result = nullptr;
    if (__count > 0)
    {
        result = PARAMETER_NEW parameter_versionStruct[__count];
    }
    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload MapProcessorRangeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void MapProcessorRangeType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, trigger1Data);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload InputInfoType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void InputInfoType::Unload(ParameterFileSymbolTable* const __table)
{
    statsThres.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload ExternalMapProcessorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void ExternalMapProcessorType::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, description);
    input.Unload(__table);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXExternalMapProcessorType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    for (UINT32 i = 0; externalMapProcessor != nullptr && i < externalMapProcessorCount; i++)
    {
        externalMapProcessor[i].Unload(__table);
    }
    ParameterFileSymbolTable::ReleaseObject(__table, externalMapProcessor);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload parameter_versionStruct
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorType::parameter_versionStruct::Unload(ParameterFileSymbolTable* const __table)
{
    ParameterFileSymbolTable::ReleaseObject(__table, revision);
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::Name variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CHAR* AECXExternalMapProcessorType::GetModuleName()
{
    return ((AECXExternalMapProcessorTypeClass*)this)->Name;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// GetModuleName: Returns ParameterModule::NameHash variable
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
UINT64 AECXExternalMapProcessorType::GetModuleNameHash()
{
    return ((AECXExternalMapProcessorTypeClass*)this)->NameHash;
}

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

    if (IsModuleMatch(moduleData) && 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 = (AECXExternalMapProcessorTypeClass*)module;
        }
        else
        {
            cls = PARAMETER_NEW AECXExternalMapProcessorTypeClass(Name, moduleData);
            cls->SymbolTableID = id;
            defModule->AddModule((ParameterModule*)cls);
        }
    }
    else if (Version.Value != moduleData->Version.Value)
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECXExternalMapProcessorTypeClass, binary version (%lld) does not match source version (%lld)\n",
            moduleData->Version.Value, Version.Value);
    }
    else
    {
        PARAMETER_LOG_ERROR(moduleData->SetManager, "Unable to create AECXExternalMapProcessorTypeClass, binary name hash (0x%016llx) does not match source name hash (0x%016llx)\n",
            moduleData->NameHash, NameHash);
    }

    return (ParameterModule*)cls;
}

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

#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    if (!Loaded)
    {
        AECXExternalMapProcessorTypeClass* 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 & 0x00ffffffU);

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


        ParameterDefinitionElement* _element = nullptr;
        if (table->ModuleDefinitions != nullptr && !table->ModuleDefinitions->empty())
        {
            _element = table->BuildModuleElement(NameHash);
        }

        ParameterLoadParameters parentParams(entry, NameHash, true, true, _element, entry->Position, 0, ParameterFileSymbolTableEntry::LOAD_LIMIT_MAX);
        cls->Load(parentParams);
        PARAMETER_DELETE _element;
        Modified++;
        Loaded = true;
    }

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

    return result;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload module data
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXExternalMapProcessorTypeClass::UnloadModule()
{
#ifdef PARAMETER_USE_MUTEX
    ParameterMutexLocker lock(Mutex); // Unique LOCK
#endif

    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 AECXExternalMapProcessorTypeClass::Release()
{
    ParameterModule::Release();
}

AECXEXTERNALMAPPROCESSOR_NAMESPACE_END
