Package gnu.io
Class RXTXPort
- java.lang.Object
-
- gnu.io.CommPort
-
- gnu.io.SerialPort
-
- gnu.io.RXTXPort
-
public class RXTXPort extends SerialPort
An extension of gnu.io.SerialPort- See Also:
SerialPort
-
-
Field Summary
Fields Modifier and Type Field Description protected static booleandebugprotected static booleandebug_eventsprotected static booleandebug_readprotected static booleandebug_read_resultsprotected static booleandebug_verboseprotected static booleandebug_writeprotected booleanHARDWARE_FAULT-
Fields inherited from class gnu.io.SerialPort
DATABITS_5, DATABITS_6, DATABITS_7, DATABITS_8, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS_IN, FLOWCONTROL_RTSCTS_OUT, FLOWCONTROL_XONXOFF_IN, FLOWCONTROL_XONXOFF_OUT, PARITY_EVEN, PARITY_MARK, PARITY_NONE, PARITY_ODD, PARITY_SPACE, STOPBITS_1, STOPBITS_1_5, STOPBITS_2
-
-
Constructor Summary
Constructors Constructor Description RXTXPort(java.lang.String name)Open the named port
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEventListener(SerialPortEventListener lsnr)booleancheckMonitorThread()booleanclearCommInput()Extension to CommAPI returns boolean true on success UnsupportedCommOperationExceptionvoidclose()voiddisableReceiveFraming()voiddisableReceiveThreshold()voiddisableReceiveTimeout()intdisableRs485()voidenableReceiveFraming(int f)Receive framing controlvoidenableReceiveThreshold(int thresh)voidenableReceiveTimeout(int time)intenableRs485(boolean busEnableActiveLow, int delayBusEnableBeforeSendMs, int delayBusEnableAfterSendMs)protected voidfinalize()Finalize the portintgetBaudBase()Extension to CommAPIintgetBaudRate()booleangetCallOutHangup()Extension to CommAPI returns boolean true on success UnsupportedCommOperationExceptionintgetDataBits()intgetDivisor()Extension to CommAPIbytegetEndOfInputChar()Extension to CommAPI This is an extension to CommAPI.intgetFlowControlMode()intgetInputBufferSize()java.io.InputStreamgetInputStream()get the InputStreambooleangetLowLatency()Extension to CommAPI returns boolean true on success UnsupportedCommOperationExceptionintgetOutputBufferSize()java.io.OutputStreamgetOutputStream()get the OutputStreamintgetParity()bytegetParityErrorChar()Extension to CommAPI This is an extension to CommAPI.intgetReceiveFramingByte()intgetReceiveThreshold()intgetReceiveTimeout()intgetStopBits()java.lang.StringgetUARTType()Extension to CommAPI This is an extension to CommAPI.booleanisCD()booleanisCTS()booleanisDSR()booleanisDTR()booleanisReceiveFramingEnabled()booleanisReceiveThresholdEnabled()booleanisReceiveTimeoutEnabled()booleanisRI()booleanisRTS()protected intnativeavailable()RXTXPort read methodsprotected booleannativeDrain(boolean i)intNativegetReceiveTimeout()voidnotifyOnBreakInterrupt(boolean enable)voidnotifyOnCarrierDetect(boolean enable)voidnotifyOnCTS(boolean enable)voidnotifyOnDataAvailable(boolean enable)voidnotifyOnDSR(boolean enable)voidnotifyOnFramingError(boolean enable)voidnotifyOnOutputEmpty(boolean enable)voidnotifyOnOverrunError(boolean enable)voidnotifyOnParityError(boolean enable)voidnotifyOnRingIndicator(boolean enable)protected intreadArray(byte[] b, int off, int len)protected intreadByte()protected intreadTerminatedArray(byte[] b, int off, int len, byte[] t)voidremoveEventListener()Remove the serial port event listenervoidsendBreak(int duration)Write to the portbooleansendEvent(int event, boolean state)booleansetBaudBase(int BaudBase)Extension to CommAPI.booleansetCallOutHangup(boolean NoHup)Extension to CommAPI returns boolean true on success UnsupportedCommOperationExceptionbooleansetDivisor(int Divisor)Extension to CommAPI.voidsetDTR(boolean state)booleansetEndOfInputChar(byte b)Extension to CommAPI This is an extension to CommAPI.voidsetFlowControlMode(int flowcontrol)voidsetInputBufferSize(int size)booleansetLowLatency()Extension to CommAPI returns boolean true on success UnsupportedCommOperationExceptionvoidsetOutputBufferSize(int size)booleansetParityErrorChar(byte b)Extension to CommAPI This is an extension to CommAPI.voidsetRcvFifoTrigger(int trigger)Deprecated.deprecated but used in KaffevoidsetRTS(boolean state)voidsetSerialPortParams(int b, int d, int s, int p)booleansetUARTType(java.lang.String type, boolean test)Extension to CommAPI This is an extension to CommAPI.static intstaticGetBaudRate(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static intstaticGetDataBits(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static intstaticGetParity(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static intstaticGetStopBits(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsCD(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsCTS(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsDSR(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsDTR(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsRI(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticIsRTS(java.lang.String port)Extension to CommAPI This is an extension to CommAPI.static booleanstaticSetDSR(java.lang.String port, boolean flag)Extension to CommAPI This is an extension to CommAPI.static booleanstaticSetDTR(java.lang.String port, boolean flag)Extension to CommAPI This is an extension to CommAPI.static booleanstaticSetRTS(java.lang.String port, boolean flag)Extension to CommAPI This is an extension to CommAPI.static voidstaticSetSerialPortParams(java.lang.String f, int b, int d, int s, int p)Extension to CommAPI This is an extension to CommAPI.protected voidwaitForTheNativeCodeSilly()Give the native code a chance to start listening to the hardware or should we say give the native code control of the issue.protected voidwriteArray(byte[] b, int off, int len, boolean i)protected voidwriteByte(int b, boolean i)
-
-
-
Field Detail
-
HARDWARE_FAULT
protected boolean HARDWARE_FAULT
-
debug
protected static final boolean debug
- See Also:
- Constant Field Values
-
debug_read
protected static final boolean debug_read
- See Also:
- Constant Field Values
-
debug_read_results
protected static final boolean debug_read_results
- See Also:
- Constant Field Values
-
debug_write
protected static final boolean debug_write
- See Also:
- Constant Field Values
-
debug_events
protected static final boolean debug_events
- See Also:
- Constant Field Values
-
debug_verbose
protected static final boolean debug_verbose
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RXTXPort
public RXTXPort(java.lang.String name) throws PortInUseExceptionOpen the named port- Parameters:
name- the name of the device to open PortInUseException- Throws:
PortInUseException- See Also:
SerialPort
-
-
Method Detail
-
getOutputStream
public java.io.OutputStream getOutputStream()
get the OutputStream- Specified by:
getOutputStreamin classCommPort- Returns:
- OutputStream
-
getInputStream
public java.io.InputStream getInputStream()
get the InputStream- Specified by:
getInputStreamin classCommPort- Returns:
- InputStream
- See Also:
InputStream
-
setSerialPortParams
public void setSerialPortParams(int b, int d, int s, int p) throws UnsupportedCommOperationException- Specified by:
setSerialPortParamsin classSerialPort- Throws:
UnsupportedCommOperationException
-
getBaudRate
public int getBaudRate()
- Specified by:
getBaudRatein classSerialPort- Returns:
- int representing the baudrate This will not behave as expected with custom speeds
-
getDataBits
public int getDataBits()
- Specified by:
getDataBitsin classSerialPort- Returns:
- int representing the databits
-
getStopBits
public int getStopBits()
- Specified by:
getStopBitsin classSerialPort- Returns:
- int representing the stopbits
-
getParity
public int getParity()
- Specified by:
getParityin classSerialPort- Returns:
- int representing the parity
-
setFlowControlMode
public void setFlowControlMode(int flowcontrol)
- Specified by:
setFlowControlModein classSerialPort- Parameters:
flowcontrol- FLOWCONTROL_NONE is default- See Also:
SerialPort.FLOWCONTROL_NONE
-
getFlowControlMode
public int getFlowControlMode()
- Specified by:
getFlowControlModein classSerialPort- Returns:
- int representing the flowmode
-
enableReceiveFraming
public void enableReceiveFraming(int f) throws UnsupportedCommOperationExceptionReceive framing control- Specified by:
enableReceiveFramingin classCommPort- Parameters:
f- framming UnsupportedCommOperationException- Throws:
UnsupportedCommOperationException
-
disableReceiveFraming
public void disableReceiveFraming()
- Specified by:
disableReceiveFramingin classCommPort
-
isReceiveFramingEnabled
public boolean isReceiveFramingEnabled()
- Specified by:
isReceiveFramingEnabledin classCommPort- Returns:
- true if framing is enabled
-
getReceiveFramingByte
public int getReceiveFramingByte()
- Specified by:
getReceiveFramingBytein classCommPort- Returns:
- int representing the framing byte
-
NativegetReceiveTimeout
public int NativegetReceiveTimeout()
- Returns:
- int the timeout
-
disableReceiveTimeout
public void disableReceiveTimeout()
- Specified by:
disableReceiveTimeoutin classCommPort
-
enableReceiveTimeout
public void enableReceiveTimeout(int time)
- Specified by:
enableReceiveTimeoutin classCommPort- Parameters:
time-
-
isReceiveTimeoutEnabled
public boolean isReceiveTimeoutEnabled()
- Specified by:
isReceiveTimeoutEnabledin classCommPort- Returns:
- boolean true if recieve timeout is enabled
-
getReceiveTimeout
public int getReceiveTimeout()
- Specified by:
getReceiveTimeoutin classCommPort- Returns:
- int the timeout
-
enableReceiveThreshold
public void enableReceiveThreshold(int thresh)
- Specified by:
enableReceiveThresholdin classCommPort- Parameters:
thresh- threshold
-
disableReceiveThreshold
public void disableReceiveThreshold()
- Specified by:
disableReceiveThresholdin classCommPort
-
getReceiveThreshold
public int getReceiveThreshold()
- Specified by:
getReceiveThresholdin classCommPort- Returns:
- int the recieve threshold
-
isReceiveThresholdEnabled
public boolean isReceiveThresholdEnabled()
- Specified by:
isReceiveThresholdEnabledin classCommPort- Returns:
- boolean true if receive threshold is enabled
-
setInputBufferSize
public void setInputBufferSize(int size)
- Specified by:
setInputBufferSizein classCommPort- Parameters:
size-
-
getInputBufferSize
public int getInputBufferSize()
- Specified by:
getInputBufferSizein classCommPort
-
setOutputBufferSize
public void setOutputBufferSize(int size)
- Specified by:
setOutputBufferSizein classCommPort- Parameters:
size-
-
getOutputBufferSize
public int getOutputBufferSize()
- Specified by:
getOutputBufferSizein classCommPort- Returns:
- in the output buffer size
-
isDTR
public boolean isDTR()
- Specified by:
isDTRin classSerialPort- Returns:
- true if DTR is set
-
setDTR
public void setDTR(boolean state)
- Specified by:
setDTRin classSerialPort- Parameters:
state-
-
setRTS
public void setRTS(boolean state)
- Specified by:
setRTSin classSerialPort- Parameters:
state-
-
isCTS
public boolean isCTS()
- Specified by:
isCTSin classSerialPort- Returns:
- boolean true if CTS is set
-
isDSR
public boolean isDSR()
- Specified by:
isDSRin classSerialPort- Returns:
- boolean true if DSR is set
-
isCD
public boolean isCD()
- Specified by:
isCDin classSerialPort- Returns:
- boolean true if CD is set
-
isRI
public boolean isRI()
- Specified by:
isRIin classSerialPort- Returns:
- boolean true if RI is set
-
isRTS
public boolean isRTS()
- Specified by:
isRTSin classSerialPort- Returns:
- boolean true if RTS is set
-
sendBreak
public void sendBreak(int duration)
Write to the port- Specified by:
sendBreakin classSerialPort- Parameters:
duration-
-
writeByte
protected void writeByte(int b, boolean i) throws java.io.IOException- Throws:
java.io.IOException
-
writeArray
protected void writeArray(byte[] b, int off, int len, boolean i) throws java.io.IOException- Throws:
java.io.IOException
-
nativeDrain
protected boolean nativeDrain(boolean i) throws java.io.IOException- Throws:
java.io.IOException
-
nativeavailable
protected int nativeavailable() throws java.io.IOExceptionRXTXPort read methods- Throws:
java.io.IOException
-
readByte
protected int readByte() throws java.io.IOException- Throws:
java.io.IOException
-
readArray
protected int readArray(byte[] b, int off, int len) throws java.io.IOException- Throws:
java.io.IOException
-
readTerminatedArray
protected int readTerminatedArray(byte[] b, int off, int len, byte[] t) throws java.io.IOException- Throws:
java.io.IOException
-
checkMonitorThread
public boolean checkMonitorThread()
-
sendEvent
public boolean sendEvent(int event, boolean state)- Parameters:
event-state-- Returns:
- boolean true if the port is closing
-
addEventListener
public void addEventListener(SerialPortEventListener lsnr) throws java.util.TooManyListenersException
- Specified by:
addEventListenerin classSerialPort- Throws:
java.util.TooManyListenersException
-
removeEventListener
public void removeEventListener()
Remove the serial port event listener- Specified by:
removeEventListenerin classSerialPort
-
waitForTheNativeCodeSilly
protected void waitForTheNativeCodeSilly()
Give the native code a chance to start listening to the hardware or should we say give the native code control of the issue. This is important for applications that flicker the Monitor thread while keeping the port open. In worst case test cases this loops once or twice every time.
-
notifyOnDataAvailable
public void notifyOnDataAvailable(boolean enable)
- Specified by:
notifyOnDataAvailablein classSerialPort
-
notifyOnOutputEmpty
public void notifyOnOutputEmpty(boolean enable)
- Specified by:
notifyOnOutputEmptyin classSerialPort- Parameters:
enable-
-
notifyOnCTS
public void notifyOnCTS(boolean enable)
- Specified by:
notifyOnCTSin classSerialPort- Parameters:
enable-
-
notifyOnDSR
public void notifyOnDSR(boolean enable)
- Specified by:
notifyOnDSRin classSerialPort- Parameters:
enable-
-
notifyOnRingIndicator
public void notifyOnRingIndicator(boolean enable)
- Specified by:
notifyOnRingIndicatorin classSerialPort- Parameters:
enable-
-
notifyOnCarrierDetect
public void notifyOnCarrierDetect(boolean enable)
- Specified by:
notifyOnCarrierDetectin classSerialPort- Parameters:
enable-
-
notifyOnOverrunError
public void notifyOnOverrunError(boolean enable)
- Specified by:
notifyOnOverrunErrorin classSerialPort- Parameters:
enable-
-
notifyOnParityError
public void notifyOnParityError(boolean enable)
- Specified by:
notifyOnParityErrorin classSerialPort- Parameters:
enable-
-
notifyOnFramingError
public void notifyOnFramingError(boolean enable)
- Specified by:
notifyOnFramingErrorin classSerialPort- Parameters:
enable-
-
notifyOnBreakInterrupt
public void notifyOnBreakInterrupt(boolean enable)
- Specified by:
notifyOnBreakInterruptin classSerialPort- Parameters:
enable-
-
finalize
protected void finalize()
Finalize the port- Overrides:
finalizein classjava.lang.Object
-
setRcvFifoTrigger
public void setRcvFifoTrigger(int trigger)
Deprecated.deprecated but used in KaffeA dummy method added so RXTX compiles on Kaffee
-
staticGetBaudRate
public static int staticGetBaudRate(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. This is only accurate up to 38600 baud currently.- Parameters:
port- the name of the port thats been preopened- Returns:
- BaudRate on success UnsupportedCommOperationException; This will not behave as expected with custom speeds
- Throws:
UnsupportedCommOperationException
-
staticGetDataBits
public static int staticGetDataBits(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Parameters:
port- the name of the port thats been preopened- Returns:
- DataBits on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticGetParity
public static int staticGetParity(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Parameters:
port- the name of the port thats been preopened- Returns:
- Parity on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticGetStopBits
public static int staticGetStopBits(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Parameters:
port- the name of the port thats been preopened- Returns:
- StopBits on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticSetSerialPortParams
public static void staticSetSerialPortParams(java.lang.String f, int b, int d, int s, int p) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Set the SerialPort parameters 1.5 stop bits requires 5 databits- Parameters:
f- filenameb- baudrated- databitss- stopbitsp- parity UnsupportedCommOperationException- Throws:
UnsupportedCommOperationException- See Also:
UnsupportedCommOperationException
-
staticSetDSR
public static boolean staticSetDSR(java.lang.String port, boolean flag) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Open the port and set DSR. remove lockfile and do not close This is so some software can appear to set the DSR before 'opening' the port a second time later on.- Returns:
- true on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticSetDTR
public static boolean staticSetDTR(java.lang.String port, boolean flag) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Open the port and set DTR. remove lockfile and do not close This is so some software can appear to set the DTR before 'opening' the port a second time later on.- Returns:
- true on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticSetRTS
public static boolean staticSetRTS(java.lang.String port, boolean flag) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. Open the port and set RTS. remove lockfile and do not close This is so some software can appear to set the RTS before 'opening' the port a second time later on.- Returns:
- none UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsRTS
public static boolean staticIsRTS(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return RTS without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsCD
public static boolean staticIsCD(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return CD without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsCTS
public static boolean staticIsCTS(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return CTS without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsDSR
public static boolean staticIsDSR(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return DSR without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsDTR
public static boolean staticIsDTR(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return DTR without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
staticIsRI
public static boolean staticIsRI(java.lang.String port) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems. find the fd and return RI without using a Java open() call- Parameters:
port-- Returns:
- true if asserted UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
getParityErrorChar
public byte getParityErrorChar() throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
getParityErrorCharin classSerialPort- Returns:
- int the Parity Error Character UnsupportedCommOperationException; Anyone know how to do this in Unix?
- Throws:
UnsupportedCommOperationException
-
setParityErrorChar
public boolean setParityErrorChar(byte b) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
setParityErrorCharin classSerialPort- Parameters:
b- Parity Error Character- Returns:
- boolean true on success UnsupportedCommOperationException; Anyone know how to do this in Unix?
- Throws:
UnsupportedCommOperationException
-
getEndOfInputChar
public byte getEndOfInputChar() throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
getEndOfInputCharin classSerialPort- Returns:
- int the End of Input Character UnsupportedCommOperationException; Anyone know how to do this in Unix?
- Throws:
UnsupportedCommOperationException
-
setEndOfInputChar
public boolean setEndOfInputChar(byte b) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
setEndOfInputCharin classSerialPort- Parameters:
b- End Of Input Character- Returns:
- boolean true on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
setUARTType
public boolean setUARTType(java.lang.String type, boolean test) throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
setUARTTypein classSerialPort- Parameters:
type- String representation of the UART type which mayb be "none", "8250", "16450", "16550", "16550A", "16650", "16550V2" or "16750".test- boolean flag to determin if the UART should be tested.- Returns:
- boolean true on success UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
getUARTType
public java.lang.String getUARTType() throws UnsupportedCommOperationExceptionExtension to CommAPI This is an extension to CommAPI. It may not be supported on all operating systems.- Specified by:
getUARTTypein classSerialPort- Returns:
- type String representation of the UART type which mayb be "none", "8250", "16450", "16550", "16550A", "16650", "16550V2" or "16750". UnsupportedCommOperationException;
- Throws:
UnsupportedCommOperationException
-
setBaudBase
public boolean setBaudBase(int BaudBase) throws UnsupportedCommOperationException, java.io.IOExceptionExtension to CommAPI. Set Baud Base to 38600 on Linux and W32 before using.- Specified by:
setBaudBasein classSerialPort- Parameters:
BaudBase- The clock frequency divided by 16. Default BaudBase is 115200.- Returns:
- true on success UnsupportedCommOperationException, IOException
- Throws:
UnsupportedCommOperationExceptionjava.io.IOException
-
getBaudBase
public int getBaudBase() throws UnsupportedCommOperationException, java.io.IOExceptionExtension to CommAPI- Specified by:
getBaudBasein classSerialPort- Returns:
- BaudBase UnsupportedCommOperationException, IOException
- Throws:
UnsupportedCommOperationExceptionjava.io.IOException
-
setDivisor
public boolean setDivisor(int Divisor) throws UnsupportedCommOperationException, java.io.IOExceptionExtension to CommAPI. Set Baud Base to 38600 on Linux and W32 before using.- Specified by:
setDivisorin classSerialPort- Parameters:
Divisor- UnsupportedCommOperationException, IOException- Throws:
UnsupportedCommOperationExceptionjava.io.IOException
-
getDivisor
public int getDivisor() throws UnsupportedCommOperationException, java.io.IOExceptionExtension to CommAPI- Specified by:
getDivisorin classSerialPort- Returns:
- Divisor; UnsupportedCommOperationException, IOException
- Throws:
UnsupportedCommOperationExceptionjava.io.IOException
-
setLowLatency
public boolean setLowLatency() throws UnsupportedCommOperationExceptionExtension to CommAPI returns boolean true on success UnsupportedCommOperationException- Specified by:
setLowLatencyin classSerialPort- Throws:
UnsupportedCommOperationException
-
getLowLatency
public boolean getLowLatency() throws UnsupportedCommOperationExceptionExtension to CommAPI returns boolean true on success UnsupportedCommOperationException- Specified by:
getLowLatencyin classSerialPort- Throws:
UnsupportedCommOperationException
-
setCallOutHangup
public boolean setCallOutHangup(boolean NoHup) throws UnsupportedCommOperationExceptionExtension to CommAPI returns boolean true on success UnsupportedCommOperationException- Specified by:
setCallOutHangupin classSerialPort- Throws:
UnsupportedCommOperationException
-
getCallOutHangup
public boolean getCallOutHangup() throws UnsupportedCommOperationExceptionExtension to CommAPI returns boolean true on success UnsupportedCommOperationException- Specified by:
getCallOutHangupin classSerialPort- Throws:
UnsupportedCommOperationException
-
clearCommInput
public boolean clearCommInput() throws UnsupportedCommOperationExceptionExtension to CommAPI returns boolean true on success UnsupportedCommOperationException
-
enableRs485
public int enableRs485(boolean busEnableActiveLow, int delayBusEnableBeforeSendMs, int delayBusEnableAfterSendMs)
-
disableRs485
public int disableRs485()
-
-