lazybios 3.0.0
Lightweight SMBIOS/DMI parsing library
Loading...
Searching...
No Matches
Type 39: System Power Supply Guide

System power-supply identity, capacity, state, and component associations.

Result set and ownership

lazybiosGetType39 returns a lazybiosType39Array_t holding every matching structure. Iterate entries using count. A non-NULL result whose count is zero means the table contains no structure of this type; NULL means the arguments were unusable or an allocation failed. Release the set with lazybiosFreeType39, or assign it to ctx->Type39 and let lazybiosCleanup own it.

Every record carries its own SMBIOS handle and the structure length the firmware reported.

Encoded fields are decoded during parsing into decoded, which mirrors the raw member names (input_voltage_range_switching, power_supply_type, status). The raw value stays alongside it, so both the encoding and its meaning are available.

Characteristics

The power_supply_characteristics word contains the DMTF power-supply type, operational status, input-voltage range switching method, and unplugged, present, and hot-replaceable flags. Decode these values with decoded.power_supply_type, decoded.status, decoded.input_voltage_range_switching, and decoded.power_supply_characteristics.

max_power_capacity is the maximum sustained output in watts. The encoded value 0x8000 means that the capacity is unknown; LazyBIOS preserves that value as present data.

Component handles

Structures long enough to include the optional tail can provide handles to an input voltage probe (Type 26), cooling device (Type 27), and input current probe (Type 29). Each handle remains absent when its bytes are not included in the formatted structure or when its encoded value is 0xFFFF.

Ownership

Release the returned array and strings with lazybiosFreeType39, or assign it to lazybiosCTX::Type39 and use lazybiosCleanup.

See also
Type 39: System Power Supply