messages

package
v0.0.0-...-2cbf4fd Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParityNone           = "None"
	ParityEven           = "Even"
	ParityOdd            = "Odd"
	ParityAlways0        = "Always 0"
	ParityAlways1        = "Always 1"
	StopBitsOne          = "1"
	StopBitsOnePointFive = "1.5"
	StopBitsTwo          = "2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExitRequest

type ExitRequest struct {
}

type ExitResponse

type ExitResponse struct {
}

func SyncExit

func SyncExit(channel *chan Message) ExitResponse

type Message

type Message interface {
}

type PortConfig

type PortConfig struct {
	BaudRate int
	DataBits int
	StopBits string
	Parity   string
}

func DefaultPortConfig

func DefaultPortConfig() *PortConfig

type PortsRequest

type PortsRequest struct {
}

type PortsResponse

type PortsResponse struct {
	Ports     []string
	OpenName  string
	OpenIndex int
}

func SyncGetPorts

func SyncGetPorts(channel *chan Message) PortsResponse

type ReadRequest

type ReadRequest struct {
	Buffer []byte
	Size   int
}

type ReadResponse

type ReadResponse struct {
	Buffer []byte
	Size   int
	Error  error
}

func SyncRead

func SyncRead(channel *chan Message, buffer []byte, size int) ReadResponse

type ReconfigurePortRequest

type ReconfigurePortRequest struct {
	Config *PortConfig
}

type ReconfigurePortResponse

type ReconfigurePortResponse struct {
	Config *PortConfig
}

func SyncReconfigurePort

func SyncReconfigurePort(channel *chan Message, config *PortConfig) ReconfigurePortResponse

type ReconnectRequest

type ReconnectRequest struct {
	Config *PortConfig
	Port   string
}

type ReconnectResponse

type ReconnectResponse struct {
	Config *PortConfig
	Port   string
	Error  error
}

func SyncReconnectPort

func SyncReconnectPort(channel *chan Message, port string, config *PortConfig) ReconnectResponse

type Unexpected

type Unexpected struct {
	Original Message
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳