New method to return full system path of the serial port

This commit is contained in:
Will Hedgecock 2021-10-29 16:30:37 -05:00
parent 0fc80bbf20
commit c7cf3cbbfb
1 changed files with 7 additions and 0 deletions

View File

@ -1260,6 +1260,13 @@ public final class SerialPort
*/
public final String getSystemPortName() { return (isWindows ? comPort.substring(comPort.lastIndexOf('\\')+1) : comPort.substring(comPort.lastIndexOf('/')+1)); }
/**
* Gets the operating system-defined device path corresponding to this serial port.
*
* @return The system-defined device path of this serial port.
*/
public final String getSystemPortPath() { return comPort; }
/**
* Gets a description of the port as reported by the device itself.
* <p>