public interface Itty2comHotPlugListener
The interface Itty2comHotPlugListener should be implemented by class who wish to get notified whenever a virtual device is added to the system or removed from the system by null modem driver.
Application should call registerTTY2COMHotPlugEventListener method in SerialComNullModem class to register listener. Whenever an event occurs callback method onTTY2COMHotPlugEvent() gets called containing event that occurred.
| Modifier and Type | Method and Description |
|---|---|
void |
onTTY2COMHotPlugEvent(int event,
String comPort)
Whenever a virtual serial device is plugged into system or unplugged from system,onTTY2COMHotPlugEvent()
method will be called by native layer.
|
void onTTY2COMHotPlugEvent(int event,
String comPort)
Whenever a virtual serial device is plugged into system or unplugged from system,onTTY2COMHotPlugEvent() method will be called by native layer.
The event value SerialComNullModem.DEV_ADDED indicates virtual serial device has been added to the system. The event value SerialComNullModem.DEV_REMOVED indicates virtual serial device has been removed from system.
event - integer value indicating whether a virtual serial device was plugged or un-plugged from system.comPort - device node of virtual serial device for which this method is invoked.Copyright © 2017. All rights reserved.