hwinfolib

package
v0.0.0-...-e06cd52 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	HWiFlagDebugModeEnable = (1 << 0) // Enable Debug Mode
	HWiFlagSWSMIEnable     = (1 << 1) // Enable SW SMI

	HWiFlagIDESafe = (0 << 2) // Use Safe IDE Mode (recommended)
	HWiFlagIDEAdr1 = (1 << 2) // Enable Low-level IDE scan up-to Device #1
	HWiFlagIDEAdr2 = (2 << 2) // Enable Low-level IDE scan up-to Device #2
	HWiFlagIDEAdr4 = (4 << 2) // Enable Low-level IDE scan up-to Device #4

	HWiFlagProbPCIScan      = (1 << 5)  // Check Problematic PCI devices (0=skip them)
	HWiFlagSMBUSEnable      = (1 << 6)  // Enable SMBus support
	HWiFlagECDisable        = (1 << 7)  // Disable Embedded Controller support
	HWiFlagHPETDisable      = (1 << 8)  // Disable using of High-Precision Event Timers
	HWiFlagGPUI2CDisable    = (1 << 10) // Disable support of GPU I2C
	HWiFlagIOCTLKernel      = (1 << 11) // Enable routing IOCTLs via kernel
	HWiFlagPersistentDriver = (1 << 12) // Enable Persistent Driver
	HWiFlagDriveScanDisable = (1 << 13) // Disable entire Drive Scan
	HWiFlagPCIDirect        = (1 << 14) // Enable Low-level PCI Scan
	HWiFlagCSMISASDisable   = (1 << 15) // Disable CSMI-SAS support
	HWiFlagIMEDisable       = (1 << 16) // Disable Intel Management Engine Support
	HWiFlagGPUWakeExt       = (1 << 17) // Perform Extended GPU wake-up method for disabled secondary GPUs
	HWiFlagPreferADL        = (1 << 18) // 1=report certain AMD GPU parameters (e.g. clocks, utilization) from AMD GPU driver (ADL) instead of direct-access

	// This is the recommended default setting
	HWiFlagDefault = (HWiFlagSMBUSEnable | HWiFlagPCIDirect) // Enable SMBus support + Low-level PCI Scan
)

Flag definitions for Init() call

Variables

This section is empty.

Functions

func DeInit

func DeInit() error

DeInit Call this function to de-initialize HWiNFO SDK, when there will be no further calls issued. This function will unload the HWiNFO SDK driver as well.

func GetNumberOfDetectedSensors

func GetNumberOfDetectedSensors() (int, error)

GetNumberOfDetectedSensors Call this function to get the number of sensors detected Returns Number of sensors detected by the HWiNFO SDK. Use this value as the maximum number of iSensor value passed to subsequent functions.

func GetSensorName

func GetSensorName(iSensor int) (string, error)

GetSensorName Call this function to get the name of sensor specified.

func GetTemperature

func GetTemperature(iSensor int, index int) (string, float64, error)

GetTemperature Call this function to get the sensor temperature value. This function when called doesn’t read the value from hardware directly. Use the ReadDataFromSensor function to read from hardware and then get the particular reading value using this function. iSensor: Sensor number index (0 to Max value returned by the HWi32_GetNumberOfDetectedSensors() function) index: Index of the temperature reading for a particular sensor (0 - 128). The reading description is returned in the supplied buffer. outBuffer: Pointer to a buffer to return the description of the indexed temperature reading. outBufferSize: Size of the buffer supplied. Returns the temperature value in degrees of Celsius. 0 = Not Available (Sensor input not connected, not present or value = 0)

func ReadDataFromSensor

func ReadDataFromSensor(iSensor int) error

ReadDataFromSensor Call this function (periodically) to have the specified sensor read all values from hardware (temperatures, voltages, fans, etc.). Use this function whenever it is required to (re-)read all sensor values from hardware. Subsequent functions return particular readings that have been scanned by calling this function. iSensor is the sensor number index (0 to Max value returned by the GetNumberOfDetectedSensors() function)

func TryLoadLibrary

func TryLoadLibrary() (bool, error)

TryLoadLibrary returns true if the library was successfully found, loaded and initialized

Types

This section is empty.

Jump to

Keyboard shortcuts

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