public final class SerialComPortMapperJNIBridge 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.
| Constructor and Description |
|---|
SerialComPortMapperJNIBridge()
Allocates a new SerialComPortMapperJNIBridge object.
|
| Modifier and Type | Method and Description |
|---|---|
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 working directory, load and link it.
|
int |
mapAliasToExistingComPort(String alias,
String comPort) |
int |
startMappingService() |
int |
stopMappingService() |
int |
unmapAliasToExistingComPort(String alias) |
public SerialComPortMapperJNIBridge()
Allocates a new SerialComPortMapperJNIBridge 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 working directory, load and link it. The native library is found in the root of 'sp-tty.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 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 startMappingService()
public int stopMappingService()
public int unmapAliasToExistingComPort(String alias)
Copyright © 2017. All rights reserved.