diff options
author | Jakob Odersky <jodersky@gmail.com> | 2013-06-22 01:07:16 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2013-06-22 01:07:25 +0200 |
commit | 3054b6150429617dff77705f34efb341c17dce1c (patch) | |
tree | 47b09a2a0b50654dccf9e90496b317da541a0a36 /src/main/java | |
parent | be1e2330ab84cf449fae664fd0c9788e3ae4af1f (diff) | |
download | akka-serial-3054b6150429617dff77705f34efb341c17dce1c.tar.gz akka-serial-3054b6150429617dff77705f34efb341c17dce1c.tar.bz2 akka-serial-3054b6150429617dff77705f34efb341c17dce1c.zip |
add no such port exception handling
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/github/jodersky/flow/low/NativeSerial.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/github/jodersky/flow/low/NativeSerial.java b/src/main/java/com/github/jodersky/flow/low/NativeSerial.java index 132c0ef..dcbd2f0 100644 --- a/src/main/java/com/github/jodersky/flow/low/NativeSerial.java +++ b/src/main/java/com/github/jodersky/flow/low/NativeSerial.java @@ -12,6 +12,7 @@ class NativeSerial { final static int E_BUSY = -3; final static int E_INVALID_BAUD = -4; final static int E_INTERRUPT = -5; + final static int E_NO_PORT = -6; /**Opens a serial port and allocates memory for storing configuration. Note: if this function fails, * any internally allocated resources will be freed. @@ -19,6 +20,7 @@ class NativeSerial { * @param baud baud rate * @param serial pointer to memory that will be allocated with a serial structure * @return 0 on success + * @return E_NO_PORT if the given port does not exist * @return E_ACCESS_DENIED if permissions are not sufficient to open port * @return E_BUSY if port is already in use * @return E_INVALID_BAUD if specified baudrate is non-standard |