Documentation ¶
Index ¶
- type Channel
- func (c *Channel) AlarmTempC() int
- func (c *Channel) AlarmTempF() int
- func (c *Channel) Export() *ChannelExport
- func (c *Channel) IsInitialized() bool
- func (c *Channel) ManualSpeed() int
- func (c *Channel) MarshalJSON() ([]byte, error)
- func (c *Channel) MaxSpeed() int
- func (c *Channel) SetAlarmTempC(temp int) error
- func (c *Channel) SetAlarmTempF(temp int) error
- func (c *Channel) SetSpeed(speed int) error
- func (c *Channel) Speed() int
- func (c *Channel) TempC() int
- func (c *Channel) TempF() int
- type ChannelExport
- type Device
- func (r *Device) DisplayChannel() int
- func (r *Device) Export() *DeviceExport
- func (r *Device) IsAudioEnabled() bool
- func (r *Device) IsInitialized() bool
- func (r *Device) IsManual() bool
- func (r *Device) IsStarted() bool
- func (r *Device) IsTempF() bool
- func (r *Device) MarshalJSON() ([]byte, error)
- func (r *Device) SetAudioEnabled(b bool)
- func (r *Device) SetManual(b bool)
- func (r *Device) SetTempF(b bool)
- func (r *Device) Start() error
- func (r *Device) Stop()
- type DeviceExport
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel has methods to read and set current speed and temperatures
func NewChannel ¶
NewChannel returns the a new channel with defaults set
func (*Channel) AlarmTempC ¶
AlarmTempC returns the current alarm temperature in Celsius
func (*Channel) AlarmTempF ¶
AlarmTempF returns the current alarm termperature in Farenheit
func (*Channel) IsInitialized ¶
IsInitialized checks if we've received initial data from fan controller
for this channel
func (*Channel) ManualSpeed ¶
ManualSpeed returns the value of the controllers target speed (RPM)
func (*Channel) SetAlarmTempC ¶
SetAlarmTempC sets the alarm termperature in Celsius
func (*Channel) SetAlarmTempF ¶
SetAlarmTempF sets the alarm temperature in Farenheit
type ChannelExport ¶
type ChannelExport struct { Speed int `json:"speed"` MaxSpeed int `json:"max_speed"` ManualSpeed int `json:"manual_speed"` TempF int `json:"temp_f"` TempC int `json:"temp_c"` AlarmTempF int `json:"alarm_temp_f"` AlarmTempC int `json:"alarm_temp_c"` }
ChannelExport ...
type Device ¶
type Device struct { Channels []*Channel // contains filtered or unexported fields }
Device represents a Bitfinex Recon device
func NewDevice ¶
func NewDevice(device io.ReadWriter, reportChan chan *Report) *Device
NewDevice initializes a device, optional second argument is a channel for
reporting events.
type DeviceExport ¶
type DeviceExport struct { Audio bool `json:"audio"` Manual bool `json:"manual"` TempMode string `json:"temp_mode"` DisplayChannel int `json:"display_channel"` Channels []*ChannelExport `json:"channels"` }
DeviceExport ...