dmi_mgmt_device

Synopsis

#include <opendmi/entity/mgmt-device.h>

typedef struct dmi_mgmt_device {
    const char *description;
    dmi_mgmt_device_type_t type;
    uint32_t address;
    dmi_mgmt_device_addr_type_t address_type;
} dmi_mgmt_device_t;

Description

The dmi_mgmt_device_t structure holds the decoded management device structure (type 34) of SMBIOS: a hardware device, typically a sensor chip, which reads probes or controls cooling devices, and how it is addressed. Management device component structures (dmi_mgmt_device_component_t) tie the probes and cooling devices to the management device.

The structure is returned by dmi_entity_info for the structures of type DMI_TYPE(mgmt_device), and lives as long as the context it has been decoded in.

Fields

description

Additional description of the device or of its location, or nullptr if there is none.

type

Type of the device.

address

Address of the device, to be read according to address_type.

address_type

Type of the address the device is accessed at.

Examples

dmi_registry_t    *registry = dmi_get_registry(context);
dmi_entity_t      *entity   =
        dmi_registry_lookup_first(registry, DMI_TYPE(mgmt_device), true);
dmi_mgmt_device_t *device   =
        dmi_entity_info(entity, DMI_TYPE(mgmt_device));

if (device != nullptr)
    printf("%s at %s 0x%08" PRIx32 "\n",
           dmi_mgmt_device_type_name(device->type),
           dmi_mgmt_device_addr_type_name(device->address_type),
           device->address);

Standards

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