onboard

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Description  string                  `json:"description,omitempty"`
	DeviceStatus DeviceStatus            `json:"device_status,omitempty"`
	DeviceType   ExtendedInformationType `json:"device_type,omitempty"`
}

Device 设备

type DeviceStatus

type DeviceStatus byte

DeviceStatus 设备状态

const (
	DeviceDisabled DeviceStatus = 0
	DeviceEnabled               = 1
)

func (DeviceStatus) String

func (d DeviceStatus) String() string

type ExtendedInformation

type ExtendedInformation struct {
	smbios.Header
	ReferenceDesignation string                  `json:"reference_designation,omitempty"`
	DeviceType           ExtendedInformationType `json:"device_type,omitempty"`
	DeviceStatus         DeviceStatus            `json:"device_status,omitempty"`
	DeviceTypeInstance   byte                    `json:"device_type_instance,omitempty"`
	SegmentGroupNumber   uint16                  `json:"segment_group_number,omitempty"`
	BusNumber            byte                    `json:"bus_number,omitempty"`
	DeviceFunctionNumber byte                    `json:"device_function_number,omitempty"`
}

ExtendedInformation 扩展设备信息 (smbios >= 2.6) 参考文档: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf 7.42 Onboard Devices Extended Information (Type 41)

func ParseType41

func ParseType41(s *smbios.Structure) (info *ExtendedInformation, err error)

ParseType41 解析

func (ExtendedInformation) SlotSegment

func (o ExtendedInformation) SlotSegment() string

SlotSegment 主板设备对应的slot

func (ExtendedInformation) String

func (o ExtendedInformation) String() string

type ExtendedInformationType

type ExtendedInformationType byte

ExtendedInformationType 主板上的设备类型

const (
	ExtendedInformationTypeOther ExtendedInformationType = 1 + iota
	ExtendedInformationTypeUnknown
	ExtendedInformationTypeVideo
	ExtendedInformationTypeSCSIController
	ExtendedInformationTypeEthernet
	ExtendedInformationTypeTokenRing
	ExtendedInformationTypeSound
	ExtendedInformationTypePATAController
	ExtendedInformationTypeSATAController
	ExtendedInformationTypeSASController
)

func (ExtendedInformationType) String

func (o ExtendedInformationType) String() string

type Information

type Information struct {
	smbios.Header
	Devices []Device `json:"devices,omitempty"`
}

Information 设备信息 (smbios < 2.6) 参考: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf

7.11 On Board Devices Information (Type 10, Obsolete)

func ParseType10

func ParseType10(s *smbios.Structure) (info *Information, err error)

ParseType10 解析

func (Information) String

func (i Information) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL