public interface IProtocol
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
|
void |
triggerEvent(int cmd,
int sub,
java.lang.Object data) |
int |
write(byte[] data,
int length) |
ResultCode post(byte[] data)
data
- The byte array to send to module.Response send(byte[] data, int timeout)
data
- The byte array to send to module.timeout
- The timeout value to receive the response and unit is millisecond.int read(byte[] data, int length)
int write(byte[] data, int length)
void clearBuffer()
void triggerEvent(int cmd, int sub, java.lang.Object data)