public interface SerialEventProtocolHandle extends ProtocolHandle<SerialEventProtocol>
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
SerialEventProtocolHandle.LoggerSerialProtocolHandle |
| 限定符和类型 | 字段和说明 |
|---|---|
static SerialEventProtocolHandle |
LOGGER_HANDLE |
method| 限定符和类型 | 方法和说明 |
|---|---|
default void |
dataSetReadyEvent(SerialEventProtocol protocol)
数据准备好事件
|
default void |
disconnectedEvent(SerialEventProtocol protocol)
失去连接
|
default void |
errorEvent(SerialEventProtocol protocol)
中断事件
|
default Object |
handle(SerialEventProtocol protocol) |
default void |
otherEvent(int eventType,
SerialEventProtocol protocol)
其他事件处理
|
void |
readEvent(byte[] receivedData,
SerialEventProtocol protocol)
数据读事件
|
default void |
timeoutEvent(SerialEventProtocol protocol)
超时事件
|
default void |
writeEvent(SerialEventProtocol protocol) |
protocolClass, toParameterizedTypestatic final SerialEventProtocolHandle LOGGER_HANDLE
default Object handle(SerialEventProtocol protocol)
handle 在接口中 ProtocolHandle<SerialEventProtocol>default void disconnectedEvent(SerialEventProtocol protocol)
protocol - default void otherEvent(int eventType,
SerialEventProtocol protocol)
eventType - SerialPort.LISTENING_EVENT_DATA_RECEIVED
SerialPort.LISTENING_EVENT_DATA_WRITTEN
SerialPort.LISTENING_EVENT_DATA_AVAILABLE
......protocol - void readEvent(byte[] receivedData,
SerialEventProtocol protocol)
receivedData - 读取的数据protocol - default void writeEvent(SerialEventProtocol protocol)
default void timeoutEvent(SerialEventProtocol protocol)
protocol - default void dataSetReadyEvent(SerialEventProtocol protocol)
protocol - default void errorEvent(SerialEventProtocol protocol)
protocol - Copyright © 2023. All rights reserved.