Package nidaqdev.networkdaq
Class LinuxSSHCommander
java.lang.Object
nidaqdev.networkdaq.LinuxSSHCommander
Class for issuing commands directly to the linux shell on the cRio
- Author:
- Doug Gillespie
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the Shell sessionexecCommand
(String command) boolean
execCommand
(String command, OutputStream outStream) Get the current host address.void
interpretCrioString
(String cRioString) Take a look at the text content output from the cRio and see if it indicates an error.boolean
openCommander
(String host, String user, String password) boolean
Open a shell sessionvoid
writeCommand
(String command) Write a linux command to the open shell
A carriage return will automatically be added if necessary.
-
Constructor Details
-
LinuxSSHCommander
-
-
Method Details
-
closeShell
public void closeShell()Close the Shell session -
getShellHost
Get the current host address.- Returns:
- the current host address.
-
openShell
Open a shell session- Parameters:
host
- host ip address.user
- user namepassword
- password- Returns:
- true if opened ok.
-
writeCommand
Write a linux command to the open shell
A carriage return will automatically be added if necessary.- Parameters:
command
- Command string
-
openCommander
-
execCommand
-
execCommand
-
interpretCrioString
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
-
-