Class LinuxSSHCommander

java.lang.Object
nidaqdev.networkdaq.LinuxSSHCommander

public class LinuxSSHCommander extends Object
Class for issuing commands directly to the linux shell on the cRio
Author:
Doug Gillespie
  • Constructor Details

    • LinuxSSHCommander

      public LinuxSSHCommander(NINetworkDaq niNetworkDaq)
  • Method Details

    • closeShell

      public void closeShell()
      Close the Shell session
    • getShellHost

      public String getShellHost()
      Get the current host address.
      Returns:
      the current host address.
    • openShell

      public boolean openShell(String host, String user, String password)
      Open a shell session
      Parameters:
      host - host ip address.
      user - user name
      password - password
      Returns:
      true if opened ok.
    • writeCommand

      public void writeCommand(String command)
      Write a linux command to the open shell
      A carriage return will automatically be added if necessary.
      Parameters:
      command - Command string
    • openCommander

      public boolean openCommander(String host, String user, String password)
    • execCommand

      public String execCommand(String command)
    • execCommand

      public boolean execCommand(String command, OutputStream outStream)
    • interpretCrioString

      public void interpretCrioString(String cRioString)
      Take a look at the text content output from the cRio and see if it indicates an error. Errors are picked up here even when the network is failing due to UDP and TCP port problems.
      Parameters:
      completeString -