utils

package module
v0.0.0-...-2c82f6b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

lidar-utils

Utils library for lidar-arduino

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Serial

type Serial struct {
	Name     string
	Baud     int
	Size     byte
	StopBits serial.StopBits
	Timeout  time.Duration

	Config     *serial.Config // Serial config pointer
	Port       *serial.Port   // Serial port pointer
	ConfigMade bool           // Valid config status
	PortOpen   bool           // Port connection status
}

func NewSerial

func NewSerial(name string, baud int, size byte, stopbits serial.StopBits, timeout time.Duration) *Serial

func (*Serial) Listen

func (s *Serial) Listen(duration time.Duration)

func (*Serial) MakeConfig

func (s *Serial) MakeConfig()

func (*Serial) OpenPortConnection

func (s *Serial) OpenPortConnection() error

func (*Serial) ReadSerial

func (s *Serial) ReadSerial(c chan []byte)

func (*Serial) WriteToFile

func (s *Serial) WriteToFile(c chan []byte)

type SerialWorker

type SerialWorker interface {
	OpenPortConnection()
	MakeConfig()
	Listen()
	Read()
}

Jump to

Keyboard shortcuts

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