public class Rs485
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Rs485.Rs485BitRate
Baud rate
|
static class |
Rs485.Rs485CharSize
Data bit
|
static class |
Rs485.Rs485Parity
Parity bit
|
static class |
Rs485.Rs485StopBits
Stop bit
|
Modifier and Type | Method and Description |
---|---|
static Rs485 |
getNewInstance(Rs485.Rs485BitRate bitRate,
Rs485.Rs485CharSize csize,
Rs485.Rs485Parity parity,
Rs485.Rs485StopBits stopBits)
get instance with the specified arguments
|
java.lang.Boolean |
init()
Initialize
|
java.lang.Boolean |
isInitialized()
Is device initialized
|
byte[] |
read()
Try to read data
|
void |
uninit()
Close the device, if you want to use again, you need to generate a new Rs485 instance ,see Rs485.getNewInstance(...)
|
void |
write(byte[] buffer)
Send data
|
public static final Rs485 getNewInstance(Rs485.Rs485BitRate bitRate, Rs485.Rs485CharSize csize, Rs485.Rs485Parity parity, Rs485.Rs485StopBits stopBits)
public java.lang.Boolean init()
public java.lang.Boolean isInitialized()
public void uninit()
public byte[] read() throws java.io.IOException
java.io.IOException
public void write(byte[] buffer) throws java.io.IOException
java.io.IOException