Documentation ¶
Index ¶
- func ExitOnError(err error)
- func IntToBool(v int) bool
- func LerpFloat(a, b, t float64) float64
- func LerpInt(a, b int, t float64) int
- func Limit(val, min, max int) int
- func LimitF(val, min, max float64) float64
- func Map(val, fromMin, fromMax, toMin, toMax int) int
- func MaxInt(vals ...int) (max int)
- func MinInt(vals ...int) (min int)
- type AnalogControllable
- type AnalogValue
- type Client
- type Colour
- type Constructable
- type Dial
- type Direction
- type Event
- type Joystick
- type Light
- type Matrix
- type MatrixBuffer
- func (m *MatrixBuffer) Clear()
- func (m *MatrixBuffer) DrawBarGraph(values []int, min, max int)
- func (m *MatrixBuffer) GetCol(col int) byte
- func (m *MatrixBuffer) GetRow(row int) byte
- func (m *MatrixBuffer) Plot(col, row, v int)
- func (m *MatrixBuffer) Roll(dir Direction)
- func (m *MatrixBuffer) RollDown()
- func (m *MatrixBuffer) RollLeft()
- func (m *MatrixBuffer) RollRight()
- func (m *MatrixBuffer) RollUp()
- func (m *MatrixBuffer) Scroll(dir Direction, fill byte)
- func (m *MatrixBuffer) ScrollDown(fill byte)
- func (m *MatrixBuffer) ScrollLeft(fill byte)
- func (m *MatrixBuffer) ScrollRight(fill byte)
- func (m *MatrixBuffer) ScrollUp(fill byte)
- func (m *MatrixBuffer) SetCol(col int, v byte)
- func (m *MatrixBuffer) SetPattern(values []string)
- func (m *MatrixBuffer) SetRow(row int, v byte)
- type Module
- type ModuleAddress
- type ModuleCommon
- type Motion
- type Motor
- type Number
- type RGB
- type Rainbow
- type Setable
- type Slider
- type TickFunc
- type Touch
- type UpdateFunc
- type Weather
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitOnError ¶
func ExitOnError(err error)
Types ¶
type AnalogControllable ¶
type AnalogControllable interface {
SetValue(value int)
}
type AnalogValue ¶
type AnalogValue interface {
GetValue() int
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func ConnectToDock ¶
func ConnectToDocks ¶
func ConnectToDocksRaw ¶
func ConnectToDocksRaw(ports ...io.ReadWriteCloser) (*Client, error)
func (*Client) AquireModules ¶
func (c *Client) AquireModules(moduleStructPtr interface{})
type Colour ¶
type Colour struct { ModuleCommon // contains filtered or unexported fields }
func (*Colour) Type ¶
func (m *Colour) Type() dock.ModuleType
type Constructable ¶
type Constructable interface {
Construct()
}
type Dial ¶
type Dial struct { ModuleCommon // contains filtered or unexported fields }
func (*Dial) Type ¶
func (m *Dial) Type() dock.ModuleType
type Joystick ¶
type Joystick struct { ModuleCommon // contains filtered or unexported fields }
func (*Joystick) GetDirection ¶
func (*Joystick) Type ¶
func (m *Joystick) Type() dock.ModuleType
type Light ¶
type Light struct {
ModuleCommon
}
func (*Light) Type ¶
func (m *Light) Type() dock.ModuleType
type Matrix ¶
type Matrix struct { ModuleCommon MatrixBuffer // contains filtered or unexported fields }
func (*Matrix) SetBrightness ¶
func (*Matrix) Type ¶
func (m *Matrix) Type() dock.ModuleType
type MatrixBuffer ¶
type MatrixBuffer struct {
// contains filtered or unexported fields
}
func (*MatrixBuffer) Clear ¶
func (m *MatrixBuffer) Clear()
func (*MatrixBuffer) DrawBarGraph ¶
func (m *MatrixBuffer) DrawBarGraph(values []int, min, max int)
func (*MatrixBuffer) GetCol ¶
func (m *MatrixBuffer) GetCol(col int) byte
func (*MatrixBuffer) GetRow ¶
func (m *MatrixBuffer) GetRow(row int) byte
func (*MatrixBuffer) Plot ¶
func (m *MatrixBuffer) Plot(col, row, v int)
func (*MatrixBuffer) Roll ¶
func (m *MatrixBuffer) Roll(dir Direction)
func (*MatrixBuffer) RollDown ¶
func (m *MatrixBuffer) RollDown()
func (*MatrixBuffer) RollLeft ¶
func (m *MatrixBuffer) RollLeft()
func (*MatrixBuffer) RollRight ¶
func (m *MatrixBuffer) RollRight()
func (*MatrixBuffer) RollUp ¶
func (m *MatrixBuffer) RollUp()
func (*MatrixBuffer) Scroll ¶
func (m *MatrixBuffer) Scroll(dir Direction, fill byte)
func (*MatrixBuffer) ScrollDown ¶
func (m *MatrixBuffer) ScrollDown(fill byte)
func (*MatrixBuffer) ScrollLeft ¶
func (m *MatrixBuffer) ScrollLeft(fill byte)
func (*MatrixBuffer) ScrollRight ¶
func (m *MatrixBuffer) ScrollRight(fill byte)
func (*MatrixBuffer) ScrollUp ¶
func (m *MatrixBuffer) ScrollUp(fill byte)
func (*MatrixBuffer) SetCol ¶
func (m *MatrixBuffer) SetCol(col int, v byte)
func (*MatrixBuffer) SetPattern ¶
func (m *MatrixBuffer) SetPattern(values []string)
func (*MatrixBuffer) SetRow ¶
func (m *MatrixBuffer) SetRow(row int, v byte)
type Module ¶
type Module interface { Update(ev Event) Connected() bool Type() dock.ModuleType Init(client *Client, t dock.ModuleType) }
type ModuleAddress ¶
type ModuleAddress struct {
// contains filtered or unexported fields
}
type ModuleCommon ¶
type ModuleCommon struct {
// contains filtered or unexported fields
}
func (*ModuleCommon) Connected ¶
func (m *ModuleCommon) Connected() bool
func (*ModuleCommon) Init ¶
func (m *ModuleCommon) Init(client *Client, t dock.ModuleType)
func (*ModuleCommon) OnUpdate ¶
func (m *ModuleCommon) OnUpdate(f UpdateFunc)
func (*ModuleCommon) Update ¶
func (m *ModuleCommon) Update(ev Event)
type Motion ¶
type Motion struct {
ModuleCommon
}
func (*Motion) Type ¶
func (m *Motion) Type() dock.ModuleType
type Motor ¶
type Motor struct {
ModuleCommon
}
func (*Motor) Type ¶
func (m *Motor) Type() dock.ModuleType
type Number ¶
type Number struct { ModuleCommon // contains filtered or unexported fields }
func (*Number) SetInteger ¶
func (*Number) Type ¶
func (m *Number) Type() dock.ModuleType
type Rainbow ¶
type Rainbow struct { ModuleCommon // contains filtered or unexported fields }
func (*Rainbow) Type ¶
func (m *Rainbow) Type() dock.ModuleType
type Slider ¶
type Slider struct { ModuleCommon // contains filtered or unexported fields }
func (*Slider) Type ¶
func (m *Slider) Type() dock.ModuleType
type Touch ¶
type Touch struct { ModuleCommon // contains filtered or unexported fields }
func (*Touch) Type ¶
func (m *Touch) Type() dock.ModuleType
type UpdateFunc ¶
type UpdateFunc func(params []int)
type Weather ¶
type Weather struct {
ModuleCommon
}
func (*Weather) Type ¶
func (m *Weather) Type() dock.ModuleType
Source Files ¶
Click to show internal directories.
Click to hide internal directories.