Documentation ¶
Index ¶
- Constants
- Variables
- type Coordinates
- type Emulator
- func (e *Emulator) AsciiScreenGrab(filePath string, append bool) error
- func (e *Emulator) Connect() error
- func (e *Emulator) CursorPosition() (string, error)
- func (e *Emulator) Disconnect() error
- func (e *Emulator) FillString(x, y int, value string) error
- func (e *Emulator) GetColumns() (int, error)
- func (e *Emulator) GetRows() (int, error)
- func (e *Emulator) GetValue(x, y, length int) (string, error)
- func (e *Emulator) InitializeHTMLFile(filePath string) error
- func (e *Emulator) IsConnected() bool
- func (e *Emulator) Press(key string) error
- func (e *Emulator) SetString(value string) error
Constants ¶
const ( Enter = "Enter" Tab = "Tab" F1 = "PF(1)" F2 = "PF(2)" F3 = "PF(3)" F4 = "PF(4)" F5 = "PF(5)" F6 = "PF(6)" F7 = "PF(7)" F8 = "PF(8)" F9 = "PF(9)" F10 = "PF(10)" F11 = "PF(11)" F12 = "PF(12)" )
These constants represent the keyboard keys
Variables ¶
var ( // Headless controls whether go3270 runs in headless mode. // Set this variable to true to enable headless mode. Headless bool Verbose bool )
Functions ¶
This section is empty.
Types ¶
type Coordinates ¶
Coordinates represents the screen coordinates (row and column)
type Emulator ¶
Emulator base struct to x3270 terminal emulator
func NewEmulator ¶
NewEmulator creates a new Emulator instance. It initializes an Emulator with the given host, port, and scriptPort.
func (*Emulator) AsciiScreenGrab ¶
AsciiScreenGrab captures an ASCII screen and saves it to an HTML file with run details
func (*Emulator) Connect ¶
Connect opens a connection with x3270 or s3270 and the specified host and port.
func (*Emulator) CursorPosition ¶
CursorPosition return actual position by cursor
func (*Emulator) Disconnect ¶
Disconnect close connection with x3270
func (*Emulator) FillString ¶
FillString fills the field at the specified row (x) and column (y) with the given value
func (*Emulator) GetColumns ¶
GetColumns returns the number of columns in the saved screen image.
func (*Emulator) GetValue ¶
GetValue returns content of a specified length at the specified row (x) and column (y)
func (*Emulator) InitializeHTMLFile ¶
Initialize HTML file with run details
func (*Emulator) IsConnected ¶
IsConnected check if a connection with host exist