serial

package module
v0.0.0-...-7d4f8a7 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: MIT Imports: 4 Imported by: 0

README

gold

Build Status

Library Golang Line Display

Description

Library line displays based on Firich,Datecs (serial port)

Supported

[+] Firich Command (partially)
[ ] Datecs Command

Quick start

	config := map[string]interface{}{
		"Name": "/dev/ttyUSB0",
		"Baud": 9600,
	}
	linedsp, err := display.Open("serial", config)
	if err != nil {
		log.Fatal(err)
	}
	dsp, err := linedsp.GetDisplay(&firich.FirichProtocol{})
	if err != nil {
		log.Fatal(err)
	}
	defer dsp.Close()
	dsp.SetEncoding(charmap.CodePage866)
	if err := dsp.Init(); err != nil {
		fmt.Println(err)
	}
	dsp.PrintRow(1, "Price:10$ Quant:2")
	dsp.PrintRow(2, "Total:20$")

License

MIT

Author

Arteev Aleksey

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SerialDriver

type SerialDriver struct {
}

func (*SerialDriver) GetDisplay

func (d *SerialDriver) GetDisplay(protocol driver.Protocol, config map[string]interface{}) (driver.Display, error)

Directories

Path Synopsis
serial
com

Jump to

Keyboard shortcuts

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