public class UdpSocketPort extends Object implements IStringCommand, IHarcHardware
| Constructor and Description |
|---|
UdpSocketPort(String hostIp,
int portNumber,
int timeout,
boolean verbose) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getVersion()
Returns the hardware version (not the version of the driver software).
|
boolean |
isValid()
Tries to identify instances that are not valid.
|
static void |
main(String[] args) |
void |
open()
Opens the device with previously set parameters.
|
String |
readString()
Reads a line of text.
|
boolean |
ready()
Tells whether this stream is ready to be read.
|
void |
sendString(String str) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbosity(boolean verbose)
Sets a verbosity flag, causing commands to be executed verbosely.
|
public UdpSocketPort(String hostIp, int portNumber, int timeout, boolean verbose) throws UnknownHostException
UnknownHostExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void sendString(String str) throws IOException
sendString in interface IStringCommandIOExceptionpublic String readString() throws IOException
IStringCommandreadString in interface IStringCommandIOExceptionpublic boolean isValid()
IHarcHardwareisValid in interface IHarcHardwarepublic String getVersion()
IHarcHardwaregetVersion in interface IHarcHardwarepublic void setTimeout(int timeout)
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - Timeout in milliseconds.public void setVerbosity(boolean verbose)
IHarcHardwaresetVerbosity in interface IHarcHardwareverbose - on or offpublic void setDebug(int debug)
IHarcHardwaresetDebug in interface IHarcHardwarepublic static void main(String[] args)
public void open()
IHarcHardwareopen in interface IHarcHardwarepublic boolean ready()
IStringCommandready in interface IStringCommandCopyright © 2015. All rights reserved.