dmi_power_supply_type

Synopsis

#include <opendmi/entity/power-supply.h>

typedef enum dmi_power_supply_type {
    DMI_POWER_SUPPLY_TYPE_UNSPEC    = 0x00,
    DMI_POWER_SUPPLY_TYPE_OTHER     = 0x01,
    DMI_POWER_SUPPLY_TYPE_UNKNOWN   = 0x02,
    DMI_POWER_SUPPLY_TYPE_LINEAR    = 0x03,
    DMI_POWER_SUPPLY_TYPE_SWITCHING = 0x04,
    DMI_POWER_SUPPLY_TYPE_BATTERY   = 0x05,
    DMI_POWER_SUPPLY_TYPE_UPS       = 0x06,
    DMI_POWER_SUPPLY_TYPE_CONVERTER = 0x07,
    DMI_POWER_SUPPLY_TYPE_REGULATOR = 0x08,
} dmi_power_supply_type_t;

const char *dmi_power_supply_type_name(dmi_power_supply_type_t value);

Description

The dmi_power_supply_type_t enumeration tells what kind of power supply a system power supply structure describes, and is the type of the type field of dmi_power_supply_t. The field is four bits wide; the values from 0x09 to 0x0F are reserved by the specification.

The dmi_power_supply_type_name function returns the name of a value, as the command line tool shows it. The name is translated to the locale set with dmi_set_locale if the library is built with ICU4C support and the locale has a translation of it, and is in English otherwise.

Values

DMI_POWER_SUPPLY_TYPE_UNSPEC

Unspecified. The specification defines no type of zero.

DMI_POWER_SUPPLY_TYPE_OTHER

Other type, which none of the values below names.

DMI_POWER_SUPPLY_TYPE_UNKNOWN

Unknown.

DMI_POWER_SUPPLY_TYPE_LINEAR

Linear power supply.

DMI_POWER_SUPPLY_TYPE_SWITCHING

Switching power supply.

DMI_POWER_SUPPLY_TYPE_BATTERY

Battery.

DMI_POWER_SUPPLY_TYPE_UPS

Uninterruptible power supply (UPS).

DMI_POWER_SUPPLY_TYPE_CONVERTER

Converter.

DMI_POWER_SUPPLY_TYPE_REGULATOR

Regulator.

Return value

dmi_power_supply_type_name returns the name of the value, or nullptr if the value has no name, e.g. a value the specification reserves. The string belongs to the library and must not be modified or freed; a translated name may become invalid once the locale is changed.

Errors

None.

See also

Standards

DMTF SMBIOS Specification (DSP0134), version 2.3.1 or newer.