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 Link icon

    • LinuxSSHCommander Link icon

      public LinuxSSHCommander(NINetworkDaq niNetworkDaq)
  • Method Details Link icon

    • closeShell Link icon

      public void closeShell()
      Close the Shell session
    • getShellHost Link icon

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

      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 Link icon

      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 Link icon

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

      public String execCommand(String command)
    • execCommand Link icon

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

      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 -