Documentation ¶
Index ¶
- type Driver
- func (d *Driver) Connect() error
- func (d *Driver) Disconnect()
- func (d *Driver) FindDevicePrompt(regex string, pattern string) (string, error)
- func (d *Driver) ReadUntil(pattern string) (string, error)
- func (d *Driver) SendCommand(cmd string, expectPattern string) (string, error)
- func (d *Driver) SendCommandsSet(cmds []string, expectPattern string) (string, error)
- func (d Driver) SetReturn(Return string)
- func (d Driver) SetTimeout(timeout uint8)
- type IDriver
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) Disconnect ¶
func (d *Driver) Disconnect()
func (*Driver) FindDevicePrompt ¶
func (*Driver) SendCommand ¶
func (*Driver) SendCommandsSet ¶
func (Driver) SetTimeout ¶
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
Click to show internal directories.
Click to hide internal directories.