type2

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package type2 implements SMBIOS Type 2 - Baseboard (Module) Information Per DSP0134 SMBIOS Reference Specification 3.9.0

Index

Constants

View Source
const StructureType uint8 = 2

StructureType is the SMBIOS structure type for Baseboard Information

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseboardInfo

type BaseboardInfo struct {
	Header                   gosmbios.Header
	Manufacturer             string
	Product                  string
	Version                  string
	SerialNumber             string
	AssetTag                 string
	FeatureFlags             FeatureFlags
	LocationInChassis        string
	ChassisHandle            uint16
	BoardType                BoardType
	NumberOfContainedHandles uint8
	ContainedObjectHandles   []uint16
}

BaseboardInfo represents Type 2 - Baseboard (Module) Information

func Get

func Get(sm *gosmbios.SMBIOS) (*BaseboardInfo, error)

Get retrieves the first Baseboard Information from SMBIOS data

func GetAll

func GetAll(sm *gosmbios.SMBIOS) ([]*BaseboardInfo, error)

GetAll retrieves all Baseboard Information structures from SMBIOS data

func Parse

func Parse(s *gosmbios.Structure) (*BaseboardInfo, error)

Parse parses a Baseboard Information structure from raw SMBIOS data

func (*BaseboardInfo) DisplayName

func (b *BaseboardInfo) DisplayName() string

DisplayName returns a display-friendly baseboard name

type BoardType

type BoardType uint8

BoardType identifies the type of baseboard

const (
	BoardTypeUnknown            BoardType = 0x01
	BoardTypeOther              BoardType = 0x02
	BoardTypeServerBlade        BoardType = 0x03
	BoardTypeConnectivitySwitch BoardType = 0x04
	BoardTypeSystemManagement   BoardType = 0x05
	BoardTypeProcessorModule    BoardType = 0x06
	BoardTypeIOModule           BoardType = 0x07
	BoardTypeMemoryModule       BoardType = 0x08
	BoardTypeDaughterBoard      BoardType = 0x09
	BoardTypeMotherboard        BoardType = 0x0A
	BoardTypeProcessorMemModule BoardType = 0x0B
	BoardTypeProcessorIOModule  BoardType = 0x0C
	BoardTypeInterconnectBoard  BoardType = 0x0D
)

Board type values

func (BoardType) String

func (bt BoardType) String() string

String returns a human-readable board type description

type FeatureFlags

type FeatureFlags uint8

FeatureFlags represents baseboard feature flags

const (
	FeatureHostingBoard     FeatureFlags = 1 << 0 // Board is a hosting board
	FeatureRequiresDaughter FeatureFlags = 1 << 1 // Board requires at least one daughter board
	FeatureRemovable        FeatureFlags = 1 << 2 // Board is removable
	FeatureReplaceable      FeatureFlags = 1 << 3 // Board is replaceable
	FeatureHotSwappable     FeatureFlags = 1 << 4 // Board is hot swappable
)

Feature flag bit definitions

func (FeatureFlags) Has

func (f FeatureFlags) Has(flag FeatureFlags) bool

Has checks if a feature flag is set

func (FeatureFlags) IsHostingBoard

func (f FeatureFlags) IsHostingBoard() bool

IsHostingBoard returns true if this is the main hosting board (motherboard)

Jump to

Keyboard shortcuts

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