Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶ added in v0.1.3
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 ¶ added in v0.1.3
func ParseType41(s *smbios.Structure) (*ExtendedInformation, 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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
func ParseType10(s *smbios.Structure) (*Information, error)
ParseType10 解析
func (Information) String ¶ added in v0.1.3
func (i Information) String() string
Click to show internal directories.
Click to hide internal directories.