_baseTransport, _lastError, DEBUG, DETAIL, INFO, IO, TAG| Constructor and Description |
|---|
ProtocolRG768(BaseTransport baseTransport,
IProtocolEventListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBuffer() |
ResultCode |
post(byte[] data)
Send data to module
|
int |
read(byte[] data,
int length) |
Response |
send(byte[] data,
int timeout)
Send the data to module and receive the response
|
boolean |
start() |
void |
stop() |
void |
triggerEvent(int cmd,
int sub,
java.lang.Object data) |
int |
write(byte[] data,
int length) |
getTransportpublic ProtocolRG768(BaseTransport baseTransport, IProtocolEventListener listener)
public ResultCode post(byte[] data)
IProtocoldata - The byte array to send to module.public Response send(byte[] data, int timeout)
IProtocoldata - The byte array to send to module.timeout - The timeout value to receive the response and unit is millisecond.public int read(byte[] data,
int length)
public void clearBuffer()
public int write(byte[] data,
int length)
public void triggerEvent(int cmd,
int sub,
java.lang.Object data)