TransportData

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

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

Go to latest
Published: Dec 2, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectPort

func SelectPort() (scalePort *Port, rulerPort *Port)

Types

type Port

type Port struct {
	Name       string
	Config     *serial.Config
	Connection *serial.Port
}

func FindRuler

func FindRuler(portName string) (port *Port)

func FindScale

func FindScale(portName string) (port *Port)

func (*Port) Connect

func (p *Port) Connect() (connect *serial.Port)

func (*Port) SendBytes

func (p *Port) SendBytes(command []byte, countRead int) (data []byte)

type RulerResponse

type RulerResponse struct {
	Width  []byte
	Height []byte
	Length []byte
}

func SendRulerCommand

func SendRulerCommand(port *Port) *RulerResponse

type ScaleResponse

type ScaleResponse struct {
	ReadyAndDiscreteness []byte
	Weight               []byte
}

func SendScaleCommand

func SendScaleCommand(port *Port) *ScaleResponse

Jump to

Keyboard shortcuts

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