Commit 249d9973 authored by thomas's avatar thomas
Browse files

[23008] add closed callback to core serial ComPortListener

parent 8bb320dd
Pipeline #22109 passed with stages
in 4 minutes and 22 seconds
......@@ -37,7 +37,12 @@ public class Connection implements SerialPortDataListener {
* @param conn
* @param data
*/
public default void gotData(Connection conn, byte[] data){};
public default void gotData(Connection conn, byte[] data){}
/**
* Called after {@link Connection#close()} or {@link Connection#close(int)} is executed.
*/
public void closed();
}
private ComPortListener listener;
......@@ -331,6 +336,7 @@ public class Connection implements SerialPortDataListener {
}
}
}).start();
listener.closed();
}
/**
......
......@@ -21,4 +21,9 @@ public class TestComPortListener implements ComPortListener {
public List<String> getChunks(){
return chunks;
}
@Override
public void closed(){
// ignore
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment