// Code generated by cmd/gen. DO NOT EDIT. /* * * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_api.h * @version v1.15-r1.15.31 * */ package gozel import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZesPsuVoltageStatus (zes_psu_voltage_status_t) PSU voltage status type ZesPsuVoltageStatus uintptr const ( ZES_PSU_VOLTAGE_STATUS_UNKNOWN ZesPsuVoltageStatus = 0 // ZES_PSU_VOLTAGE_STATUS_UNKNOWN The status of the power supply voltage controllers cannot be ///< determined ZES_PSU_VOLTAGE_STATUS_NORMAL ZesPsuVoltageStatus = 1 // ZES_PSU_VOLTAGE_STATUS_NORMAL No unusual voltages have been detected ZES_PSU_VOLTAGE_STATUS_OVER ZesPsuVoltageStatus = 2 // ZES_PSU_VOLTAGE_STATUS_OVER Over-voltage has occurred ZES_PSU_VOLTAGE_STATUS_UNDER ZesPsuVoltageStatus = 3 // ZES_PSU_VOLTAGE_STATUS_UNDER Under-voltage has occurred ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 ZesPsuVoltageStatus = 0x7fffffff // ZES_PSU_VOLTAGE_STATUS_FORCE_UINT32 Value marking end of ZES_PSU_VOLTAGE_STATUS_* ENUMs ) // ZesPsuProperties (zes_psu_properties_t) Static properties of the power supply type ZesPsuProperties struct { Stype ZesStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Onsubdevice ZeBool // Onsubdevice [out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle Subdeviceid uint32 // Subdeviceid [out] If onSubdevice is true, this gives the ID of the sub-device Havefan ZeBool // Havefan [out] True if the power supply has a fan Amplimit int32 // Amplimit [out] The maximum electrical current in milliamperes that can be drawn. A value of -1 indicates that this property cannot be determined. } // ZesPsuState (zes_psu_state_t) Dynamic state of the power supply type ZesPsuState struct { Stype ZesStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Voltstatus ZesPsuVoltageStatus // Voltstatus [out] The current PSU voltage status Fanfailed ZeBool // Fanfailed [out] Indicates if the fan has failed Temperature int32 // Temperature [out] Read the current heatsink temperature in degrees Celsius. A value of -1 indicates that this property cannot be determined. Current int32 // Current [out] The amps being drawn in milliamperes. A value of -1 indicates that this property cannot be determined. } // ZesDeviceEnumPsus Get handle of power supplies // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hDevice` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pCount` func ZesDeviceEnumPsus( hDevice ZesDeviceHandle, // hDevice [in] Sysman handle of the device. pCount *uint32, // pCount [in,out] pointer to the number of components of this type. if count is zero, then the driver shall update the value with the total number of components of this type that are available. if count is greater than the number of components of this type that are available, then the driver shall update the value with the correct number of components. phPsu *ZesPsuHandle, // phPsu [in,out][optional][range(0, *pCount)] array of handle of components of this type. if count is less than the number of components of this type that are available, then the driver shall only retrieve that number of component handles. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEnumPsus", uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(phPsu))) } // ZesPsuGetProperties Get power supply properties // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hPsu` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pProperties` func ZesPsuGetProperties( hPsu ZesPsuHandle, // hPsu [in] Handle for the component. pProperties *ZesPsuProperties, // pProperties [in,out] Will contain the properties of the power supply. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPsuGetProperties", uintptr(hPsu), uintptr(unsafe.Pointer(pProperties))) } // ZesPsuGetState Get current power supply state // / // / @details // / - The application may call this function from simultaneous threads. // / - The implementation of this function should be lock-free. // / // / @returns // / - ::ZE_RESULT_SUCCESS // / - ::ZE_RESULT_ERROR_UNINITIALIZED // / - ::ZE_RESULT_ERROR_DEVICE_LOST // / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY // / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY // / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT // / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE // / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE // / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS // / - ::ZE_RESULT_ERROR_NOT_AVAILABLE // / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET // / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE // / - ::ZE_RESULT_ERROR_UNKNOWN // / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE // / + `nullptr == hPsu` // / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER // / + `nullptr == pState` func ZesPsuGetState( hPsu ZesPsuHandle, // hPsu [in] Handle for the component. pState *ZesPsuState, // pState [in,out] Will contain the current state of the power supply. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesPsuGetState", uintptr(hPsu), uintptr(unsafe.Pointer(pState))) }