io

package module
v0.0.0-...-986260c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdType

type CmdType byte
const (
	Move    CmdType = 'G'
	Setting CmdType = 'M'
	Query   CmdType = 'P'
)

type Command

type Command struct {
	Index uint32

	Type    CmdType
	SubType byte
	Code    uint32
	Vals    map[byte]string
}

func NewCmdAbsoluteMove

func NewCmdAbsoluteMove(x int32, y int32, z int32, speed int32) *Command

func NewCommand

func NewCommand(cmdType CmdType, code uint32) *Command

func (*Command) GetValString

func (cmd *Command) GetValString(key byte) string

func (*Command) SetValString

func (cmd *Command) SetValString(key byte, val string)

type InputMsg

type InputMsg struct {
	CmdIx uint32

	Type InputType
	Vars map[string]string
}

func NewInputMsg

func NewInputMsg(cmdIx uint32, msgType InputType) *InputMsg

type InputParser

type InputParser struct {
	// contains filtered or unexported fields
}

type InputType

type InputType int
const (
	Response InputType = iota
	Periodic
)

type SerialPort

type SerialPort struct {
	// contains filtered or unexported fields
}

func NewSerialSerialPort

func NewSerialSerialPort() *SerialPort

func (*SerialPort) Close

func (sp *SerialPort) Close() (err error)

Closer

func (*SerialPort) Read

func (sp *SerialPort) Read(p []byte) (n int, err error)

Reader interface

func (*SerialPort) Write

func (sp *SerialPort) Write(p []byte) (n int, err error)

Writer

type Slinger

type Slinger struct {
	// contains filtered or unexported fields
}

func NewSlinger

func NewSlinger() *Slinger

func (*Slinger) NextIndex

func (sl *Slinger) NextIndex() uint32

Jump to

Keyboard shortcuts

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