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

#include "aecxdbarbitrationrange.h"
#include "parametersetmanager.h"

AECXDBARBITRATIONRANGE_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool RangeArbitrationType::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, "enableArbitration") == 0)
    {
        ParameterUtils::DoubleToString((double)enableArbitration, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "conflictHandling") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)conflictHandling, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool RangeArbitrationType::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, "enableArbitration") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableArbitration = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "conflictHandling") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            conflictHandling = (RangeConflictHandlingType)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

bool RangeCompensationType::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, "enableCompensation") == 0)
    {
        ParameterUtils::DoubleToString((double)enableCompensation, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "compensationQuantity") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)compensationQuantity, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool RangeCompensationType::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, "enableCompensation") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableCompensation = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "compensationQuantity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            compensationQuantity = (ArbExposureQuantity)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

bool RangePoint::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, "val") == 0)
    {
        ParameterUtils::DoubleToString((double)val, __value, __size);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "adj") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)adj, __value, __size, 0);
        __result = true;
    }

    return __result;
}

bool RangePoint::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, "val") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            val = (float)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "adj") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            adj = (ArbRangeAdjustType)(UINT32)dblValue; 
        }
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

bool RangeType::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, "quantity") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            quantity = (ArbExposureQuantity)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "start") == 0)
    {
        __result = start.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "end") == 0)
    {
        __result = end.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "handling") == 0)
    {
        __result = handling.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

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

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

    return __result;
}

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

    return __result;
}

bool DBArbitrationRangePayload::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, "dataID") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            dataID = (INT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "description") == 0)
    {
        // Cannot modify strings, risk of memory leaks or corruption
    }
    else if (PARAMETER_STRCMP(__name, "value") == 0)
    {
        __result = value.SetValue(&__path[__pos], __value);
    }

    return __result;
}

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

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

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

    return __result;
}

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

    return __result;
}

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    if (result)
    {
        switch (uintValue)
        {
        case static_cast<UINT32>(RangeConflictHandlingType::ModifyTimeRange):
            enumValue = RangeConflictHandlingType::ModifyTimeRange;
            result    = true;
            break;
        case static_cast<UINT32>(RangeConflictHandlingType::ModifyGainRange):
            enumValue = RangeConflictHandlingType::ModifyGainRange;
            result    = true;
            break;
        case static_cast<UINT32>(RangeConflictHandlingType::ForceExposure):
            enumValue = RangeConflictHandlingType::ForceExposure;
            result    = true;
            break;
        case static_cast<UINT32>(RangeConflictHandlingType::Discard):
            enumValue = RangeConflictHandlingType::Discard;
            result    = true;
            break;
        case static_cast<UINT32>(RangeConflictHandlingType::Ignore):
            enumValue = RangeConflictHandlingType::Ignore;
            result    = true;
            break;
        default:
            PARAMETER_LOG_ERROR(entry->SetManager, "Invalid value(% u) converting UINT32 to RangeConflictHandlingType", uintValue);
            break;
        }
    }
    return result;
}

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

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

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

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

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

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


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXDBArbitrationRangeTypeClass::AECXDBArbitrationRangeTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(dataCount);
    PARAMETER_INITIALIZE(data);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECXDBArbitrationRangeTypeClass::AECXDBArbitrationRangeTypeClass(
    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(dataBank);
    PARAMETER_INITIALIZE(data);
}

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

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

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

    PARAMETER_INITIALIZE(enableArbitration);
    PARAMETER_INITIALIZE(conflictHandling);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableArbitration, alignment)
    if (result)
    {
        result = aecxdbarbitrationrange::ReadEnum_RangeConflictHandlingType(entry, conflictHandling, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(enableCompensation);
    PARAMETER_INITIALIZE(compensationQuantity);

    SYMBOL_TABLE_ENTRY_READ(entry, result, enableCompensation, alignment)
    if (result)
    {
        result = aecxdbarbitrationrange::ReadEnum_ArbExposureQuantity(entry, compensationQuantity, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(compensation);
    PARAMETER_INITIALIZE(arbitration);

    result = compensation.Load(entry, alignment);
    if (result)
    {
        result = arbitration.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(val);
    PARAMETER_INITIALIZE(adj);

    SYMBOL_TABLE_ENTRY_READ(entry, result, val, alignment)
    if (result)
    {
        result = aecxdbarbitrationrange::ReadEnum_ArbRangeAdjustType(entry, adj, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(quantity);
    PARAMETER_INITIALIZE(start);
    PARAMETER_INITIALIZE(end);
    PARAMETER_INITIALIZE(handling);

    result = aecxdbarbitrationrange::ReadEnum_ArbExposureQuantity(entry, quantity, alignment);
    if (result)
    {
        result = start.Load(entry, alignment);
    }
    if (result)
    {
        result = end.Load(entry, alignment);
    }
    if (result)
    {
        result = handling.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(dataID);
    PARAMETER_INITIALIZE(description);
    PARAMETER_INITIALIZE(value);

    SYMBOL_TABLE_ENTRY_READ(entry, result, dataID, alignment)

    // Reading String description 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, description, count, alignment)
    }
    if (result)
    {
        result = value.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(dataBank);
    PARAMETER_INITIALIZE(data);

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

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

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

    return result;
}

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECXDBArbitrationRangeType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECXDBArbitrationRangeType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    dataBank.Unload(__table);
    for (UINT32 i = 0; i < dataCount; i++)
    {
        data[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(data))
    {
        PARAMETER_DELETE[] data;
    }
    data = nullptr;
}

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

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

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

    return (ParameterModule*)cls;
}

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

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

AECXDBARBITRATIONRANGE_NAMESPACE_END
