Documentation
¶
Index ¶
- Constants
- type Config
- type Control
- func (c *Control) AddOrModifyProfile(modifyProfile *ModifyProfileStruct)
- func (c *Control) Apply() error
- func (c *Control) Close() error
- func (c *Control) CurrentProfile() Profile
- func (c *Control) GetTemperatures() Temperatures
- func (c *Control) GetWSInfo() gin.H
- func (c *Control) HandleWSMessage(ws *websocket.Conn, action int, value string)
- func (c *Control) Initialize() error
- func (c *Control) Load(v []byte) error
- func (c *Control) MoveProfile(moveInput *MoveProfileStruct)
- func (c *Control) Name() string
- func (c *Control) NextProfile(howMany int) (string, error)
- func (c *Control) Notify(t plugin.Notification)
- func (c *Control) RemoveProfile(profileId int)
- func (c *Control) ResetProfiles()
- func (c *Control) Run(haltCtx context.Context, cb chan<- plugin.Callback) <-chan error
- func (c *Control) SwitchToProfile(name string) (string, error)
- func (c *Control) Value() []byte
- type FanTable
- type ModifyProfileStruct
- type MoveProfileStruct
- type PersistConfig
- type Profile
- type Temperatures
- type TextMarshaler
Constants ¶
View Source
const ( ThrottlePlanPerformance uint32 = 0x00 ThrottlePlanTurbo uint32 = 0x01 ThrottlePlanSilent uint32 = 0x02 )
TODO: validate these constants are actually what they say they are
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WMI atkacpi.WMI PowerCfg *power.Cfg Profiles []Profile AutoThermal bool AutoThermalConfig struct { PluggedIn string Unplugged string } }
Config defines the entry point for Windows Power Option and a list of thermal profiles
type Control ¶
type Control struct { Config PersistConfig // contains filtered or unexported fields }
Control defines contains the Windows Power Option and list of thermal profiles
func NewControl ¶
NewControl allows you to cycle to the next thermal profile
func (*Control) AddOrModifyProfile ¶
func (c *Control) AddOrModifyProfile(modifyProfile *ModifyProfileStruct)
func (*Control) CurrentProfile ¶
CurrentProfile will return the currently active Profile
func (*Control) GetTemperatures ¶ added in v1.0.6
func (c *Control) GetTemperatures() Temperatures
func (*Control) HandleWSMessage ¶
func (*Control) Initialize ¶
Initialize satisfies system/plugin.Plugin
func (*Control) MoveProfile ¶
func (c *Control) MoveProfile(moveInput *MoveProfileStruct)
func (*Control) NextProfile ¶
NextProfile will cycle to the next profile
func (*Control) Notify ¶
func (c *Control) Notify(t plugin.Notification)
Notify satisfies system/plugin.Plugin
func (*Control) RemoveProfile ¶
func (*Control) ResetProfiles ¶
func (c *Control) ResetProfiles()
func (*Control) SwitchToProfile ¶
SwitchToProfile will switch the profile with the given name
type FanTable ¶
type FanTable struct {
ByteTable []byte
}
func NewFanTable ¶
func (*FanTable) MarshalJSON ¶
type ModifyProfileStruct ¶
type ModifyProfileStruct struct { ProfileId int `json:"profileId"` Name string `json:"name"` WindowsPowerPlan string `json:"windowsPowerPlan"` ThrottlePlan uint32 `json:"throttlePlan"` CPUFanCurve string `json:"cpuFanCurve"` GPUFanCurve string `json:"gpuFanCurve"` FastSwitch bool `json:"fastSwitch"` }
type MoveProfileStruct ¶
type PersistConfig ¶
type Profile ¶
type Profile struct { Name string `json:"name"` WindowsPowerPlan string `json:"windowsPowerPlan"` ThrottlePlan uint32 `json:"throttlePlan"` CPUFanCurve *FanTable `json:"cpuFanCurve"` GPUFanCurve *FanTable `json:"gpuFanCurve"` FastSwitch bool `json:"fastSwitch"` }
func GetDefaultThermalProfiles ¶
func GetDefaultThermalProfiles() []Profile
GetDefaultThermalProfiles will return the default list of Profiles
type Temperatures ¶ added in v1.0.6
type TextMarshaler ¶
Click to show internal directories.
Click to hide internal directories.