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

#include "aecgyro.h"
#include "parametersetmanager.h"

AECGYRO_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetValue/GetValue Functions
/// Gets or sets the requested value
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool GyroExpCtrlValueMonitorType::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, "name") == 0)
    {
        PARAMETER_STRCPY(__value, __size, name);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "sensitivity") == 0)
    {
        ParameterUtils::DoubleToString((double)sensitivity, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "valueMonitor") == 0)
    {
        __result = valueMonitor.GetValue(&__path[__pos], __value, __size);
    }

    return __result;
}

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

    return __result;
}

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

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

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

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

    return __result;
}

bool GyroExpCtrlAuxZoneDataType::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, "data") == 0)
    {
        ParameterUtils::DoubleToString((double)data, __value, __size);
        __result = true;
    }

    return __result;
}

bool GyroExpCtrlAuxZoneDataType::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, "data") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            data = (float)dblValue; 
        }
    }

    return __result;
}

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

    return __result;
}

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

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

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

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

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.GetValue(&__path[__pos], __value, __size);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        if (__index < zoneDataCount)
        {
            __result = zoneData[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

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

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

    if (PARAMETER_STRCMP(__name, "zoneTrigger") == 0)
    {
        __result = zoneTrigger.SetValue(&__path[__pos], __value);
    }
    else if (PARAMETER_STRCMP(__name, "zoneData") == 0)
    {
        if (__index < zoneDataCount)
        {
            __result = zoneData[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

    return __result;
}

bool AECGyroType::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, "enableFlag") == 0)
    {
        ParameterUtils::DoubleToString((double)enableFlag, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "movingAvgFilterLength") == 0)
    {
        ParameterUtils::DoubleToString((double)movingAvgFilterLength, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "level2ZoneType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)level2ZoneType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "triggerDataType") == 0)
    {
        ParameterUtils::DoubleToString((double)(UINT32)triggerDataType, __value, __size, 0);
        __result = true;
    }
    else if (PARAMETER_STRCMP(__name, "gyroExpCtrlTrigger") == 0)
    {
        if (__index < gyroExpCtrlTriggerCount)
        {
            __result = gyroExpCtrlTrigger[__index].GetValue(&__path[__pos], __value, __size);
        }
    }
    else if (PARAMETER_STRCMP(__name, "gyroExpCtrlValueMonitors") == 0)
    {
        if (__index < gyroExpCtrlValueMonitorsCount)
        {
            __result = gyroExpCtrlValueMonitors[__index].GetValue(&__path[__pos], __value, __size);
        }
    }

    return __result;
}

bool AECGyroType::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, "enableFlag") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            enableFlag = (BOOL)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "movingAvgFilterLength") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            movingAvgFilterLength = (UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "level2ZoneType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            level2ZoneType = (aecglobalelements::AECGyroExpCtrlKeyLevelZoneType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "triggerDataType") == 0)
    {
        const double dblValue = ParameterUtils::StringToDouble(__value, __result);
        if (__result)
        {
            triggerDataType = (aecglobalelements::AECGyroExpCtrlTriggerDataType)(UINT32)dblValue; 
        }
    }
    else if (PARAMETER_STRCMP(__name, "gyroExpCtrlTrigger") == 0)
    {
        if (__index < gyroExpCtrlTriggerCount)
        {
            __result = gyroExpCtrlTrigger[__index].SetValue(&__path[__pos], __value);
        }
    }
    else if (PARAMETER_STRCMP(__name, "gyroExpCtrlValueMonitors") == 0)
    {
        if (__index < gyroExpCtrlValueMonitorsCount)
        {
            __result = gyroExpCtrlValueMonitors[__index].SetValue(&__path[__pos], __value);
        }
    }

    return __result;
}

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

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

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

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

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

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

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

    return __result;
}

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

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

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

    return __result;
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Default Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECGyroTypeClass::AECGyroTypeClass(
    const CHAR* const name)
    : ParameterModule(name, MAJOR, MINOR, PATCH, nullptr)
{
    PARAMETER_INITIALIZE(SymbolTableID);
    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(enableFlag);
    PARAMETER_INITIALIZE(movingAvgFilterLength);
    PARAMETER_INITIALIZE(level2ZoneType);
    PARAMETER_INITIALIZE(triggerDataType);
    PARAMETER_INITIALIZE(gyroExpCtrlTriggerCount);
    PARAMETER_INITIALIZE(gyroExpCtrlTrigger);
    PARAMETER_INITIALIZE(gyroExpCtrlValueMonitorsCount);
    PARAMETER_INITIALIZE(gyroExpCtrlValueMonitors);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Constructor
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AECGyroTypeClass::AECGyroTypeClass(
    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(enableFlag);
    PARAMETER_INITIALIZE(movingAvgFilterLength);
    PARAMETER_INITIALIZE(level2ZoneType);
    PARAMETER_INITIALIZE(triggerDataType);
    PARAMETER_INITIALIZE(gyroExpCtrlTrigger);
    PARAMETER_INITIALIZE(gyroExpCtrlValueMonitors);
}

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

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

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

    PARAMETER_INITIALIZE(name);
    PARAMETER_INITIALIZE(sensitivity);
    PARAMETER_INITIALIZE(valueMonitor);


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

    return result;
}

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

    PARAMETER_INITIALIZE(data);

    SYMBOL_TABLE_ENTRY_READ(entry, result, data, alignment)

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);
    if (result)
    {
        result = zoneData.Load(entry, alignment);
    }

    return result;
}

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

    PARAMETER_INITIALIZE(zoneTrigger);
    PARAMETER_INITIALIZE(zoneData);

    result = zoneTrigger.Load(entry, alignment);

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

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

    return result;
}

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

    PARAMETER_INITIALIZE(module_version);
    PARAMETER_INITIALIZE(parameter_version);
    PARAMETER_INITIALIZE(enableFlag);
    PARAMETER_INITIALIZE(movingAvgFilterLength);
    PARAMETER_INITIALIZE(level2ZoneType);
    PARAMETER_INITIALIZE(triggerDataType);
    PARAMETER_INITIALIZE(gyroExpCtrlTrigger);
    PARAMETER_INITIALIZE(gyroExpCtrlValueMonitors);

    result = module_version.Load(entry, alignment);
    if (result)
    {
        result = parameter_version.Load(entry, alignment);
    }
    SYMBOL_TABLE_ENTRY_READ(entry, result, enableFlag, alignment)
    SYMBOL_TABLE_ENTRY_READ(entry, result, movingAvgFilterLength, alignment)
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECGyroExpCtrlKeyLevelZoneType(entry, level2ZoneType, alignment);
    }
    if (result)
    {
        result = aecglobalelements::ReadEnum_AECGyroExpCtrlTriggerDataType(entry, triggerDataType, alignment);
    }

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

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

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

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

    return result;
}

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

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

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// Unload AECGyroType
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AECGyroType::Unload(ParameterFileSymbolTable* const __table)
{
    parameter_version.Unload(__table);
    for (UINT32 i = 0; i < gyroExpCtrlTriggerCount; i++)
    {
        gyroExpCtrlTrigger[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(gyroExpCtrlTrigger))
    {
        PARAMETER_DELETE[] gyroExpCtrlTrigger;
    }
    gyroExpCtrlTrigger = nullptr;
    for (UINT32 i = 0; i < gyroExpCtrlValueMonitorsCount; i++)
    {
        gyroExpCtrlValueMonitors[i].Unload(__table);
    }
    if (__table != nullptr && __table->ReleaseDupObject(gyroExpCtrlValueMonitors))
    {
        PARAMETER_DELETE[] gyroExpCtrlValueMonitors;
    }
    gyroExpCtrlValueMonitors = nullptr;
}

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

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

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

    return (ParameterModule*)cls;
}

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

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

AECGYRO_NAMESPACE_END
