Ejemplo n.º 1
0
    def __init__(self, port="/dev/ttyUSB0", **kvargs):
        """
        :port:
          the serial port, defaults to USB0 since this

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self.port = port
        self._ser = serial.Serial()
        self._rx = self._ser
        self._ser.port = port
        self._ser.timeout = kvargs.get("timeout", self.TIMEOUT)

        self._tty_name = self.port

        Terminal.__init__(self, **kvargs)
Ejemplo n.º 2
0
    def __init__(self, port='/dev/ttyUSB0', **kvargs):
        """
        :port:
          the serial port, defaults to USB0 since this

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self.port = port
        self._ser = serial.Serial()
        self._rx = self._ser
        self._ser.port = port
        self._ser.timeout = kvargs.get('timeout', self.TIMEOUT)

        self._tty_name = self.port

        Terminal.__init__(self, **kvargs)
Ejemplo n.º 3
0
    def __init__(self, host, port, **kvargs):
        """
        :host:
          The hostname or ip-addr of the ternminal server

        :port:
          The TCP port that maps to the TTY device on the
          console server

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self._tn = telnetlib.Telnet()
        self._rx = self._tn
        self.host = host
        self.port = port
        self.timeout = kvargs.get('timeout', self.TIMEOUT)
        self._tty_name = "{0}:{1}".format(host, port)

        Terminal.__init__(self, **kvargs)
Ejemplo n.º 4
0
    def __init__(self, host, port, **kvargs):
        """
        :host:
          The hostname or ip-addr of the ternminal server

        :port:
          The TCP port that maps to the TTY device on the
          console server

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self._tn = telnetlib.Telnet()
        self._rx = self._tn
        self.host = host
        self.port = port
        self.timeout = kvargs.get('timeout', self.TIMEOUT)
        self._tty_name = "{0}:{1}".format(host, port)

        Terminal.__init__(self, **kvargs)
Ejemplo n.º 5
0
    def __init__(self, host, port, **kvargs):
        """
        :host:
          The hostname or ip-addr of the terminal server

        :port:
          The TCP port that maps to the TTY device on the
          console server

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self._ssh_pre = self._ssh_client_pre()
        self.host = host
        self.port = port
        self.ssh_private_key_file = kvargs.get("ssh_private_key_file")
        self.timeout = kvargs.get("timeout", self.TIMEOUT)
        self.baud = kvargs.get("baud", 9600)
        self._tty_name = "{}:{}".format(host, port)

        Terminal.__init__(self, **kvargs)
Ejemplo n.º 6
0
    def __init__(self, host, port, **kvargs):
        """
        :host:
          The hostname or ip-addr of the terminal server

        :port:
          The TCP port that maps to the TTY device on the
          console server

        :kvargs['timeout']:
          this is the tty read polling timeout.
          generally you should not have to tweak this.
        """
        # initialize the underlying TTY device

        self._ssh_pre = self._ssh_client_pre()
        self.host = host
        self.port = port
        self.ssh_private_key_file = kvargs.get('ssh_private_key_file')
        self.timeout = kvargs.get('timeout', self.TIMEOUT)
        self.baud = kvargs.get('baud', 9600)
        self._tty_name = "{}:{}".format(host, port)

        Terminal.__init__(self, **kvargs)