InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/Utils.java¶
Packages¶
| Name |
|---|
| com.inscoper.api |
Classes¶
| Name | |
|---|---|
| class | com.inscoper.api.Utils Utils class provides utility functions. |
Source code¶
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.3.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.inscoper.api;
import com.inscoper.api.logging.*;
public class Utils {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Utils(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Utils obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long swigRelease(Utils obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
InscoperJNI.delete_Utils(swigCPtr);
}
swigCPtr = 0;
}
}
public static String deviceTypeToString(EDeviceType deviceType) {
return InscoperJNI.Utils_deviceTypeToString(deviceType.swigValue());
}
public static com.inscoper.nbo.ENBOType deviceTypeToNBOType(EDeviceType deviceType) {
return com.inscoper.nbo.ENBOType.swigToEnum(InscoperJNI.Utils_deviceTypeToNBOType(deviceType.swigValue()));
}
public static EDeviceType stringToDeviceType(String deviceTypeStr) {
return EDeviceType.swigToEnum(InscoperJNI.Utils_stringToDeviceType(deviceTypeStr));
}
public static String driverTypeToString(EDriverType driverType) {
return InscoperJNI.Utils_driverTypeToString(driverType.swigValue());
}
public static EDriverType stringToDriverType(String driverTypeStr) {
return EDriverType.swigToEnum(InscoperJNI.Utils_stringToDriverType(driverTypeStr));
}
public static String functionTypeToString(EFunctionType functionType) {
return InscoperJNI.Utils_functionTypeToString(functionType.swigValue());
}
public static EFunctionType stringToFunctionType(String functionTypeStr) {
return EFunctionType.swigToEnum(InscoperJNI.Utils_stringToFunctionType(functionTypeStr));
}
public static String paramTypeToString(EParamType paramType) {
return InscoperJNI.Utils_paramTypeToString(paramType.swigValue());
}
public static EParamType stringToParamType(String paramTypeStr) {
return EParamType.swigToEnum(InscoperJNI.Utils_stringToParamType(paramTypeStr));
}
public static String subDeviceLabelToString(ESubDeviceLabel label) {
return InscoperJNI.Utils_subDeviceLabelToString(label.swigValue());
}
public static ESubDeviceLabel stringToSubDeviceLabel(String labelStr) {
return ESubDeviceLabel.swigToEnum(InscoperJNI.Utils_stringToSubDeviceLabel(labelStr));
}
public static String subDeviceStatusToString(ESubDeviceStatus status) {
return InscoperJNI.Utils_subDeviceStatusToString(status.swigValue());
}
public static ESubDeviceStatus stringToSubDeviceStatus(String statusStr) {
return ESubDeviceStatus.swigToEnum(InscoperJNI.Utils_stringToSubDeviceStatus(statusStr));
}
public static String functionStatusToString(EFunctionStatus status) {
return InscoperJNI.Utils_functionStatusToString(status.swigValue());
}
public static EFunctionStatus stringToFunctionStatus(String statusStr) {
return EFunctionStatus.swigToEnum(InscoperJNI.Utils_stringToFunctionStatus(statusStr));
}
public static String connectionTypeDescToString(EConnectionTypeDesc connectionTypeDesc) {
return InscoperJNI.Utils_connectionTypeDescToString(connectionTypeDesc.swigValue());
}
public static EConnectionTypeDesc stringToConnectionTypeDesc(String connectionTypeDescStr) {
return EConnectionTypeDesc.swigToEnum(InscoperJNI.Utils_stringToConnectionTypeDesc(connectionTypeDescStr));
}
public static String logLevelToString(ELogLevel logLevel) {
return InscoperJNI.Utils_logLevelToString(logLevel.swigValue());
}
public static ELogLevel stringToLogLevel(String logLevelStr) {
return ELogLevel.swigToEnum(InscoperJNI.Utils_stringToLogLevel(logLevelStr));
}
public static String dataToString(UCharVector data) {
return InscoperJNI.Utils_dataToString(UCharVector.getCPtr(data), data);
}
public static int dataToInt(UCharVector data) {
return InscoperJNI.Utils_dataToInt(UCharVector.getCPtr(data), data);
}
public static double dataToDouble(UCharVector data) {
return InscoperJNI.Utils_dataToDouble(UCharVector.getCPtr(data), data);
}
public static String boxTypeToString(EBoxType type) {
return InscoperJNI.Utils_boxTypeToString(type.swigValue());
}
public static EBoxType stringToBoxType(String boxTypeStr) {
return EBoxType.swigToEnum(InscoperJNI.Utils_stringToBoxType(boxTypeStr));
}
public static String stripAsTag(String str) {
return InscoperJNI.Utils_stripAsTag(str);
}
public Utils() {
this(InscoperJNI.new_Utils(), true);
}
}
Updated on 2026-09-03 at 12:14:19 +0200