cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CR = byte('\r')
View Source
var CRLF = []byte("\r\n")
View Source
var CTRL_C = []byte("\x03")
View Source
var ErrCommandNotSend = errors.New("unable to send command")
View Source
var ErrNoFlipperFound = errors.New("no flipper device found, consider using the --port PORT argument")
View Source
var ErrNoTerminalFound = errors.New("no terminal found")
View Source
var LF = byte('\n')
View Source
var TerminalDelimiter = []byte("\n>: ")

Functions

func GetFlipperPort

func GetFlipperPort() (string, error)

Types

type CLI

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

func Open

func Open(port string) (*CLI, error)

func (*CLI) Close

func (cli *CLI) Close() error

func (*CLI) Read

func (cli *CLI) Read(data []byte) (int, error)

func (*CLI) ReadLine

func (cli *CLI) ReadLine() ([]byte, error)

func (*CLI) ReadUntil

func (cli *CLI) ReadUntil(needle []byte) ([]byte, bool, error)

func (*CLI) ReadUntilTerminal

func (cli *CLI) ReadUntilTerminal() ([]byte, error)

func (*CLI) SendCommand

func (cli *CLI) SendCommand(command string) error

func (*CLI) SendCtrlC

func (cli *CLI) SendCtrlC() error

func (*CLI) SetReadTimeout

func (cli *CLI) SetReadTimeout(timeout int)

func (*CLI) SetWriteTimeout

func (cli *CLI) SetWriteTimeout(timeout int)

func (*CLI) Write

func (cli *CLI) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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