Documentation
¶
Index ¶
Constants ¶
View Source
const ( MassStorageController = 0x01 NetworkController = 0x02 DisplayController = 0x03 // for GPU CommunicationController = 0x07 // for FPGA ProcessingAccelerator = 0x12 // for FPGA )
Class code
Variables ¶
This section is empty.
Functions ¶
func ParseLocater ¶
ParseLocater parses the pci identifier string
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a PCI configuration register
func NewConfig ¶
NewConfig creates and initializes a new Config by decoding config register from given path
func (Config) ReadByteFrom ¶
ReadByteFrom reads one-byte as byte value from the given offset
func (Config) ReadDWordFrom ¶
ReadDWordFrom reads four-byte as uint32 value from the given offset
func (Config) ReadWordFrom ¶
ReadWordFrom reads two-byte as uint16 value from the given offset
type Device ¶
type Device struct { Path string DeviceID uint16 DeviceName string Revision byte VendorID uint16 VendorName string SubSystemVendorID uint16 SubSystemDeviceID uint16 SubSystemName string ClassID byte ClassName string SubClassID byte SubClassName string InterfaceID byte InterfaceName string Driver string Domain uint32 Bus uint32 Device uint32 Function uint32 Numa uint16 MaxGen byte MaxSpeed float32 MaxWidth byte LinkGen byte LinkSpeed float32 LinkWidth byte SlotPowetLimit float32 SerialNumber string UncorrectableErrs []string CorrectableErrs []string Express bool // indicates PCIe BasicCaps []*BasicCap ExtCaps []*ExtCap }
Device represents status of a PCI or PCIe device status
type Devices ¶
type Devices struct {
// contains filtered or unexported fields
}
Devices represents the database of devices
func NewDecoder ¶
func NewDecoder() *Devices
NewDecoder creates and initializes a new slice of Device as Decoder
func (Devices) AllDevices ¶
AllDevices returns a slice of all devices
func (Devices) FilterByClass ¶
FilterByClass returns a slice of device filtered by given class id
Click to show internal directories.
Click to hide internal directories.