Documentation ¶
Index ¶
- Constants
- type ComputeBladeHal
- type ComputeBladeHalMock
- func (m *ComputeBladeHalMock) Close() error
- func (m *ComputeBladeHalMock) GetFanRPM() (float64, error)
- func (m *ComputeBladeHalMock) GetPowerStatus() (PowerStatus, error)
- func (m *ComputeBladeHalMock) SetFanSpeed(percent uint8) error
- func (m *ComputeBladeHalMock) SetLed(idx uint, color LedColor) error
- func (m *ComputeBladeHalMock) SetStealthMode(enabled bool) error
- func (m *ComputeBladeHalMock) WaitForEdgeButtonPress(ctx context.Context) error
- type ComputeBladeHalOpts
- type ComputeModule
- type FanUnit
- type LedColor
- type PowerStatus
Constants ¶
View Source
const ( FanUnitStandard = iota FanUnitSmart )
View Source
const ( PowerPoeOrUsbC = iota PowerPoe802at )
View Source
const ( LedTop = iota LedEdge )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeBladeHal ¶
type ComputeBladeHal interface { Close() error // SetFanSpeed sets the fan speed in percent SetFanSpeed(speed uint8) error // GetFanSpeed returns the current fan speed in percent (based on moving average) GetFanRPM() (float64, error) // SetStealthMode enables/disables stealth mode of the blade (turning on/off the LEDs) SetStealthMode(enabled bool) error // SetLEDs sets the color of the LEDs SetLed(idx uint, color LedColor) error // GetPowerStatus returns the current power status of the blade GetPowerStatus() (PowerStatus, error) // GetEdgeButtonPressChan returns a channel emitting edge button press events WaitForEdgeButtonPress(ctx context.Context) error }
ComputeBladeHal abstracts hardware details of the Compute Blade and provides a simple interface
func NewCm4Hal ¶
func NewCm4Hal(opts ComputeBladeHalOpts) (ComputeBladeHal, error)
type ComputeBladeHalMock ¶
ComputeBladeMock implements a mock for the ComputeBladeHal interface
func (*ComputeBladeHalMock) Close ¶
func (m *ComputeBladeHalMock) Close() error
func (*ComputeBladeHalMock) GetFanRPM ¶
func (m *ComputeBladeHalMock) GetFanRPM() (float64, error)
func (*ComputeBladeHalMock) GetPowerStatus ¶
func (m *ComputeBladeHalMock) GetPowerStatus() (PowerStatus, error)
func (*ComputeBladeHalMock) SetFanSpeed ¶
func (m *ComputeBladeHalMock) SetFanSpeed(percent uint8) error
func (*ComputeBladeHalMock) SetLed ¶
func (m *ComputeBladeHalMock) SetLed(idx uint, color LedColor) error
func (*ComputeBladeHalMock) SetStealthMode ¶
func (m *ComputeBladeHalMock) SetStealthMode(enabled bool) error
func (*ComputeBladeHalMock) WaitForEdgeButtonPress ¶
func (m *ComputeBladeHalMock) WaitForEdgeButtonPress(ctx context.Context) error
type ComputeBladeHalOpts ¶
type ComputeBladeHalOpts struct {
FanUnit FanUnit
}
type ComputeModule ¶
type ComputeModule uint8
type PowerStatus ¶
type PowerStatus uint8
func (PowerStatus) String ¶
func (p PowerStatus) String() string
Click to show internal directories.
Click to hide internal directories.