Implements the active() method for Serial and Server (Issue #2364).

This commit is contained in:
Kyle Feuz
2014-06-10 23:22:08 -07:00
parent a7dbe905f8
commit 6274986bd6
2 changed files with 16 additions and 0 deletions

View File

@@ -135,6 +135,15 @@ public class Serial implements SerialPortEventListener {
}
/**
* Return true if this port is still active and hasn't run
* into any trouble.
*/
public boolean active() {
return (port.isOpened());
}
public void pre() {
if (serialAvailableMethod != null && invokeSerialAvailable) {
invokeSerialAvailable = false;