public final class SerialComPortMapperJNIBridge extends Object
This class is an interface between java and native shared library. The native library is found in 'lib-mapper' folder in 'scm-x.x.x.jar' file.
| Constructor and Description |
|---|
SerialComPortMapperJNIBridge()
Allocates a new SerialComPortMapperJNIBridge object.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
loadNativeLibrary(String directoryPath,
String loadedLibName,
SerialComSystemProperty serialComSystemProperty,
int osType,
int cpuArch,
int javaABIType)
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, SerialComSystemProperty serialComSystemProperty, int osType, int cpuArch, int javaABIType) throws SecurityException, SerialComUnexpectedException, SerialComLoadException, UnsatisfiedLinkError
Extract native library from jar in a working directory, load and link it. The 'lib-mapper' folder in 'scm-x.x.x.jar'.
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.javaABIType - binary application interface type to correctly link.SecurityException - if java system properties can not be accessed.SerialComUnexpectedException - if java system property is null.SerialComLoadException - if any file system related issue occurs.UnsatisfiedLinkError - if loading/linking shared library fails.public int startMappingService()
public int stopMappingService()
public int unmapAliasToExistingComPort(String alias)
Copyright © 2016. All rights reserved.