public final class SerialComIOCTLJNIBridge extends Object
This class is an interface between java and native shared library. The native library is found in the root of 'sp-ioctl.jar' file. Library will be spioctllnxx64.so etc.
| Constructor and Description |
|---|
SerialComIOCTLJNIBridge()
Allocates a new SerialComIOCTLJNIBridge object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
ioctlExecuteOperation(long handle,
long operationCode) |
long |
ioctlGetValue(long handle,
long operationCode) |
long |
ioctlSetValue(long handle,
long operationCode,
long value) |
long |
ioctlSetValueCharArray(long handle,
long operationCode,
byte[] values) |
long |
ioctlSetValueIntArray(long handle,
long operationCode,
int[] values) |
static boolean |
loadNativeLibrary(String directoryPath,
String loadedLibName,
com.serialpundit.core.SerialComSystemProperty serialComSystemProperty,
int osType,
int cpuArch,
int abitype)
Extract native library from jar in a 'directoryPath' directory, load and link it.
|
public SerialComIOCTLJNIBridge()
Allocates a new SerialComIOCTLJNIBridge object.
public static boolean loadNativeLibrary(String directoryPath, String loadedLibName, com.serialpundit.core.SerialComSystemProperty serialComSystemProperty, int osType, int cpuArch, int abitype) throws com.serialpundit.core.SerialComException
Extract native library from jar in a 'directoryPath' directory, load and link it. Native library is found in the root of 'sp-ioctl.jar' file.
directoryPath - null for default directory or user supplied directory path.loadedLibName - null for default name or user supplied name of loaded library.serialComSystemProperty - instance of SerialComSystemProperty to get required java properties.cpuArch - architecture of CPU this library is running on.osType - operating system this library is running on.abitype - binary application interface type to correctly link.com.serialpundit.core.SerialComException - if java system properties can not be is null, if any file system related issue occurs.SecurityException - if java system properties can not be accessed or required files can not be accessed.UnsatisfiedLinkError - if loading/linking shared library fails.public long ioctlExecuteOperation(long handle,
long operationCode)
public long ioctlSetValue(long handle,
long operationCode,
long value)
public long ioctlGetValue(long handle,
long operationCode)
public long ioctlSetValueIntArray(long handle,
long operationCode,
int[] values)
public long ioctlSetValueCharArray(long handle,
long operationCode,
byte[] values)
Copyright © 2017. All rights reserved.