public final class SerialComCP210xRuntimeJNIBridge extends Object
This class is an interface between java and native shared library. The native library is found in 'lib-vendor' folder in 'scm-x.x.x.jar' file.
| Constructor and Description |
|---|
SerialComCP210xRuntimeJNIBridge()
Allocates a new SerialComCP210xRuntimeJNIBridge object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDeviceInterfaceString(long handle) |
String |
getDeviceProductString(long handle) |
String |
getDeviceSerialNumber(long handle) |
String |
getPartNumber(long handle) |
static boolean |
loadNativeLibrary(File libDirectory,
String vlibName,
int cpuArch,
int osType,
SerialComSystemProperty serialComSystemProperty)
Extract native library from jar in a working directory, load and link it.
|
int |
readLatch(long handle) |
int |
writeLatch(long handle,
long mask,
long latchValue) |
public SerialComCP210xRuntimeJNIBridge()
Allocates a new SerialComCP210xRuntimeJNIBridge object.
public static boolean loadNativeLibrary(File libDirectory, String vlibName, int cpuArch, int osType, SerialComSystemProperty serialComSystemProperty) throws UnsatisfiedLinkError, SerialComLoadException, SerialComUnexpectedException, SecurityException, FileNotFoundException
Extract native library from jar in a working directory, load and link it. The 'lib-vendor' folder in 'scm-x.x.x.jar' file is searched for the required native library for vendor specific communication. It also load vendor's native shared library.
libDirectory - directory in which native library will be extracted and vendor library will be foundvlibName - name of vendor library to load and linkcpuArch - architecture of CPU this library is running onosType - operating system this library is running onserialComSystemProperty - instance of SerialComSystemProperty to get required java propertiesSerialComUnexpectedException - if a critical java system property is null in systemSecurityException - if any java system property can not be accessedFileNotFoundException - if the vendor library file is not foundSerialComLoadException - if any file system related issue occursUnsatisfiedLinkError - if loading/linking shared library failspublic int readLatch(long handle)
public int writeLatch(long handle,
long mask,
long latchValue)
public String getPartNumber(long handle)
public String getDeviceProductString(long handle)
public String getDeviceSerialNumber(long handle)
public String getDeviceInterfaceString(long handle)
Copyright © 2016. All rights reserved.