Added "ERR_INCORRECT_SERIAL_PORT" into SerialNativeInterface class and jssc_SerialNativeInterface.h header file. Also added "TYPE_INCORRECT_SERIAL_PORT" for throwing if "ERR_INCORRECT_SERIAL_PORT"
This commit is contained in:
parent
ef28e80bd2
commit
44f6fea8fa
|
@ -45,6 +45,8 @@ extern "C" {
|
||||||
#define jssc_SerialNativeInterface_ERR_PORT_NOT_FOUND -2L
|
#define jssc_SerialNativeInterface_ERR_PORT_NOT_FOUND -2L
|
||||||
#undef jssc_SerialNativeInterface_ERR_PERMISSION_DENIED
|
#undef jssc_SerialNativeInterface_ERR_PERMISSION_DENIED
|
||||||
#define jssc_SerialNativeInterface_ERR_PERMISSION_DENIED -3L
|
#define jssc_SerialNativeInterface_ERR_PERMISSION_DENIED -3L
|
||||||
|
#undef jssc_SerialNativeInterface_ERR_INCORRECT_SERIAL_PORT
|
||||||
|
#define jssc_SerialNativeInterface_ERR_INCORRECT_SERIAL_PORT -4L
|
||||||
/*
|
/*
|
||||||
* Class: jssc_SerialNativeInterface
|
* Class: jssc_SerialNativeInterface
|
||||||
* Method: openPort
|
* Method: openPort
|
||||||
|
|
|
@ -58,6 +58,10 @@ public class SerialNativeInterface {
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
*/
|
*/
|
||||||
public static final int ERR_PERMISSION_DENIED = -3;
|
public static final int ERR_PERMISSION_DENIED = -3;
|
||||||
|
/**
|
||||||
|
* @since 2.3.0
|
||||||
|
*/
|
||||||
|
public static final int ERR_INCORRECT_SERIAL_PORT = -4;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
String libFolderPath;
|
String libFolderPath;
|
||||||
|
|
|
@ -56,6 +56,10 @@ public class SerialPortException extends Exception {
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*/
|
*/
|
||||||
final public static String TYPE_PERMISSION_DENIED = "Permission denied";
|
final public static String TYPE_PERMISSION_DENIED = "Permission denied";
|
||||||
|
/**
|
||||||
|
* @since 2.3.0
|
||||||
|
*/
|
||||||
|
final public static String TYPE_INCORRECT_SERIAL_PORT = "Incorrect serial port";
|
||||||
|
|
||||||
private String portName;
|
private String portName;
|
||||||
private String methodName;
|
private String methodName;
|
||||||
|
|
Loading…
Reference in New Issue