---
name: "SatUtils::TelnetInterface"
section: "3pm"
platform: "linux"
package: "satutils"
version: "0.6"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/SatUtils::TelnetInterface"
---

# SatUtils::TelnetInterface(3pm)

base class for telnet interfaced devices

## NAME

SatUtils::TelnetInterface - base class for telnet interfaced devices

## DESCRIPTON

This is a base class for communication with devices that have a telnet based command-line interface.

## METHODS

- new

  Opens a connection to the device. Pass it the address of the device, the port to connect to, and regex to use to regognise the device's command prompt, and a regex to use to recognise the prompt.

  Returns an object representing this connection.

- getoutput

  Get output of previous command until next prompt, and return it as one string.

- sendcommand

  Ensure we're at a prompt line, and send the passed command.

## AUTHOR

Joey Hess \<joey@kitenet.net\>
