driver

package
v0.0.0-...-a02e82a Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Connection connections.Connection
	Return     string `defaults:"\n"`
}

func (*Driver) Connect

func (d *Driver) Connect() error

func (*Driver) Disconnect

func (d *Driver) Disconnect()

func (*Driver) FindDevicePrompt

func (d *Driver) FindDevicePrompt(regex string, pattern string) (string, error)

func (*Driver) ReadUntil

func (d *Driver) ReadUntil(pattern string) (string, error)

func (*Driver) SendCommand

func (d *Driver) SendCommand(cmd string, expectPattern string) (string, error)

func (*Driver) SendCommandsSet

func (d *Driver) SendCommandsSet(cmds []string, expectPattern string) (string, error)

func (Driver) SetReturn

func (d Driver) SetReturn(Return string)

func (Driver) SetTimeout

func (d Driver) SetTimeout(timeout uint8)

type IDriver

type IDriver interface {
	Connect() error
	Disconnect()
	SendCommand(cmd string, expectPattern string) (string, error)
	SendCommandsSet(cmds []string, expectPattern string) (string, error)
	FindDevicePrompt(regex string, pattern string) (string, error)
	ReadUntil(pattern string) (string, error)
	SetTimeout(timeout uint8)
}

func NewDriver

func NewDriver(Connection connections.Connection, Return string) IDriver

Jump to

Keyboard shortcuts

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