public final class SerialComCP210xRuntimeJNIBridge extends Object
This class is an interface between java and native shared library. The native library is found in the root of 'sp-tty.jar' file. Silicon labs provide only windows dll.
| 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,
com.serialpundit.core.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, com.serialpundit.core.SerialComSystemProperty serialComSystemProperty) throws com.serialpundit.core.SerialComException
Extract native library from jar in a working directory, load and link it. The root of sp-tty.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 found.vlibName - name of vendor library to load and link.cpuArch - architecture of CPU this library is running on.osType - operating system this library is running on.serialComSystemProperty - instance of SerialComSystemProperty to get required java properties.com.serialpundit.core.SerialComException - if java system properties can not be accessed or required files can not be
accessed, if shared library is not found, it can not be loaded, linked and initialized etc.public 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 © 2017. All rights reserved.