-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2
--
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.

local npu_list = Input

for i = 1, #npu_list do
    -- NPU不在位时，设置其他属性为默认值
    if npu_list[i].Presence == 0 then
        npu_list[i].npuProcessorArchitecture = ''
        npu_list[i].npuProcessorType = ''
        npu_list[i].npuInstructionSet = ''
        npu_list[i].npuManufacturer = ''
        npu_list[i].npuModel = ''
        npu_list[i].npuVendorId = ''
        npu_list[i].npuStatus = 0
        npu_list[i].npuDeviceLocator = ''
        npu_list[i].npuSerialNumber = ''
        npu_list[i].npuFirmwareVersion = ''
        npu_list[i].npuPowerWatts = 0
        npu_list[i].npuPowerOn = 0
        npu_list[i].npuAiCoreTempCelsius = 0
        npu_list[i].npuHBMTempCelsius = 0
        npu_list[i].npuNimBusTempCelsius = 0
        npu_list[i].npuComputeCapability = ''
        npu_list[i].npuAiCoreMaxSpeedMHz = 0
        npu_list[i].npuTotalMemoryKiB = 0
        npu_list[i].npuMemoryUsageKiB = 0
        npu_list[i].npuMemoryFreeKiB = 0
    end
end

return npu_list