generator

package
v0.0.0-...-5a3b7a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sin = Function(iota)
	Sawtooth
	SinSaw
	Random
)
View Source
const (
	Small = Scale(iota)
	Medium
	Large
)
View Source
const (
	DataFrequency  = 30 * time.Millisecond
	UpdateDebounce = 500 * time.Millisecond
)
View Source
const (
	Ping  = Control("Ping")
	Tune  = Control("Tune")
	Trace = Control("Trace")
)

Variables

View Source
var DefaultConfig = Config{
	Function: Sin,
	Scale:    Small,
}

Functions

This section is empty.

Types

type Client

type Client struct {
	Status chan Status
	Data   chan Data
	// contains filtered or unexported fields
}

func NewClient

func NewClient(initial Config) *Client

func (*Client) Control

func (client *Client) Control(control Control)

func (*Client) InitialConfig

func (client *Client) InitialConfig() Config

func (*Client) Reconf

func (client *Client) Reconf(config Config)

func (*Client) Run

func (client *Client) Run(ctx context.Context)

type Config

type Config struct {
	Function Function
	Scale    Scale
}

type Control

type Control string

type Data

type Data struct {
	Status   string
	Values   []Point
	Min, Max Point
}

type Function

type Function byte

func (Function) Options

func (Function) Options() []Function

func (Function) String

func (s Function) String() string

type Point

type Point struct {
	X, Y float32
}

func (Point) Max

func (a Point) Max(b Point) Point

func (Point) Min

func (a Point) Min(b Point) Point

type Scale

type Scale byte

func (Scale) Options

func (Scale) Options() []Scale

func (Scale) String

func (s Scale) String() string

type Status

type Status string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL