-
-
Notifications
You must be signed in to change notification settings - Fork 499
Plugins
Fan Control supports plugins to inject sensors and controls into the software from external sources.
Example: https://github.com/Rem0o/FanControl.DellPlugin
- .NET assembly (dll) named FanControl.[YourPluginName].dll
- Reference FanControl.Plugins.dll from https://github.com/Rem0o/FanControl.Releases/blob/master/FanControl.zip
- Implement the interface IPlugin
- Drop your dll into the Plugins folder of FanControl. At startup, it will find IPlugins implementations by reflection.
You must implement the interface with the following members:
- Name ( string )
- Initialize()
- Load( container )
- Close()
The life-cycle of the plugin is as follow:
Initialize => Load => Close.
These methods should be able to be called in this order any number of times without any side-effect or undisposed resources.
The load method gets passed a "container" object which contains different lists for your sensors to be added.
A sensor has the following members
- Name
- Value
- Update()
The Update method is called internally by the FanControl backend every update cycle, which right now is 1 Hz. Update the value of your sensor in that method from whatever source you are using.
A control sensor controls sets a value to a fan ( or whatever else ) from a fan curve. That value is between 0 and 100.
A sensor has the following methods
- Set( val )
- Reset()
The Set( val ) method should activate your control and apply the value to it. The Reset() method is called when the control is disabled and should return back to its default state.