Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ public SerialPortClientTransport(SerialPortTransportConfig config) {
executionQueue = new ExecutionQueue(config.executor());
}

/**
* Return the underlying {@link SerialPort} used by this transport.
*
* @return the configured {@link SerialPort} instance.
*/
public SerialPort getSerialPort() {
return serialPort;
}

@Override
public synchronized CompletableFuture<Void> connect() {
if (serialPort.isOpen()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ public SerialPortServerTransport(SerialPortTransportConfig config) {
executionQueue = new ExecutionQueue(config.executor());
}

/**
* Return the underlying {@link SerialPort} used by this transport.
*
* @return the configured {@link SerialPort} instance.
*/
public SerialPort getSerialPort() {
return serialPort;
}

@Override
public CompletionStage<Void> bind() {
if (serialPort.isOpen()) {
Expand Down