-- 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.


---@class c_battery_info
---@field last_update_timestamp integer
---@field bbu_warnig_info_reported integer
---@field present integer
---@field temperature integer
---@field type string
---@field pack_missing integer
---@field voltage_low integer
---@field temperature_high integer
---@field replacepack integer
---@field learn_cycle_failed integer
---@field learn_cycle_timeout integer
---@field predictive_failure integer
---@field remaining_capacity_low integer
---@field no_space integer
---@field failed integer
---@field present_updated integer

local c_battery_info = {}
c_battery_info.__index = c_battery_info

function c_battery_info.new(info)
    return setmetatable(info, c_battery_info)
end

return c_battery_info