InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/Status.java¶
Packages¶
| Name |
|---|
| com.inscoper.api |
Classes¶
| Name | |
|---|---|
| class | com.inscoper.api.Status Status class represents a state of the system. |
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 Status {
private transient long swigCPtr;
private transient boolean swigCMemOwn;
protected Status(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Status obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void swigSetCMemOwn(boolean own) {
swigCMemOwn = own;
}
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
InscoperJNI.delete_Status(swigCPtr);
}
swigCPtr = 0;
}
}
public void addParam(SubDeviceId subDeviceId, Object value) throws com.inscoper.api.InscoperException {
if(value instanceof String) {
this.addParam(subDeviceId, String.valueOf(value));
} else if (value instanceof Character) {
this.addParam(subDeviceId, ((Character)value).charValue());
} else if (value instanceof Short) {
this.addParam(subDeviceId, ((Short)value).shortValue());
} else if (value instanceof Integer) {
this.addParam(subDeviceId, ((Integer)value).intValue());
} else if (value instanceof java.math.BigInteger) {
this.addParam(subDeviceId, (java.math.BigInteger)value);
} else if (value instanceof Long) {
this.addParam(subDeviceId, ((Long)value).longValue());
} else if (value instanceof Float) {
this.addParam(subDeviceId, ((Float)value).floatValue());
} else if (value instanceof Double) {
this.addParam(subDeviceId, ((Double)value).doubleValue());
} else if (value instanceof Boolean) {
this.addParam(subDeviceId, ((Boolean)value).booleanValue());
} else {
this.addParam(subDeviceId, value.toString());
}
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, Object value) throws com.inscoper.api.InscoperException {
if(value instanceof String) {
this.addMultiParam(subDeviceId, tag, String.valueOf(value));
} else if (value instanceof Character) {
this.addMultiParam(subDeviceId, tag, ((Character)value).charValue());
} else if (value instanceof Short) {
this.addMultiParam(subDeviceId, tag, ((Short)value).shortValue());
} else if (value instanceof Integer) {
this.addMultiParam(subDeviceId, tag, ((Integer)value).intValue());
} else if (value instanceof java.math.BigInteger) {
this.addMultiParam(subDeviceId, tag, (java.math.BigInteger)value);
} else if (value instanceof Long) {
this.addMultiParam(subDeviceId, tag, ((Long)value).longValue());
} else if (value instanceof Float) {
this.addMultiParam(subDeviceId, tag, ((Float)value).floatValue());
} else if (value instanceof Double) {
this.addMultiParam(subDeviceId, tag, ((Double)value).doubleValue());
} else if (value instanceof Boolean) {
this.addMultiParam(subDeviceId, tag, ((Boolean)value).booleanValue());
} else {
this.addMultiParam(subDeviceId, tag, value.toString());
}
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, Object value) throws com.inscoper.api.InscoperException {
if(value instanceof String) {
this.addMultiParam(index, subDeviceId, tag, String.valueOf(value));
} else if (value instanceof Character) {
this.addMultiParam(index, subDeviceId, tag, ((Character)value).charValue());
} else if (value instanceof Short) {
this.addMultiParam(index, subDeviceId, tag, ((Short)value).shortValue());
} else if (value instanceof Integer) {
this.addMultiParam(index, subDeviceId, tag, ((Integer)value).intValue());
} else if (value instanceof java.math.BigInteger) {
this.addMultiParam(index, subDeviceId, tag, (java.math.BigInteger)value);
} else if (value instanceof Long) {
this.addMultiParam(index, subDeviceId, tag, ((Long)value).longValue());
} else if (value instanceof Float) {
this.addMultiParam(index, subDeviceId, tag, ((Float)value).floatValue());
} else if (value instanceof Double) {
this.addMultiParam(index, subDeviceId, tag, ((Double)value).doubleValue());
} else if (value instanceof Boolean) {
this.addMultiParam(index, subDeviceId, tag, ((Boolean)value).booleanValue());
} else {
this.addMultiParam(index, subDeviceId, tag, value.toString());
}
}
public Object getValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
switch(this.getValueType(subDeviceId)) {
case UINT8 :
return this.getParamShortValue(subDeviceId);
case INT8 :
return this.getParamCharValue(subDeviceId);
case UINT16 :
return this.getParamIntValue(subDeviceId);
case INT16 :
return this.getParamShortValue(subDeviceId);
case UINT32 :
return this.getParamLongValue(subDeviceId);
case INT32 :
return this.getParamIntValue(subDeviceId);
case UINT64 :
return this.getParamUnsignedLongValue(subDeviceId);
case INT64 :
return this.getParamLongValue(subDeviceId);
case FLOAT :
return this.getParamFloatValue(subDeviceId);
case DOUBLE :
return this.getParamDoubleValue(subDeviceId);
case STRING :
return this.getParamStringValue(subDeviceId);
default :
return this.getParamStringValue(subDeviceId);
}
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Status other = (Status) obj;
return equals(other);
}
@Override
public int hashCode() {
return (int)getHash();
}
public Status() {
this(InscoperJNI.new_Status__SWIG_0(), true);
}
public Status(StatusParamVector statusParams, StringVector tags) {
this(InscoperJNI.new_Status__SWIG_1(StatusParamVector.getCPtr(statusParams), statusParams, StringVector.getCPtr(tags), tags), true);
}
public Status(Status status, boolean copy) throws com.inscoper.api.InscoperException {
this(InscoperJNI.new_Status__SWIG_2(Status.getCPtr(status), status, copy), true);
}
public Status(Status status) throws com.inscoper.api.InscoperException {
this(InscoperJNI.new_Status__SWIG_3(Status.getCPtr(status), status), true);
}
public void fromXML(XMLNode xml) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_fromXML(swigCPtr, this, XMLNode.getCPtr(xml), xml);
}
public void toXML(XMLNode xmlParent) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_toXML(swigCPtr, this, XMLNode.getCPtr(xmlParent), xmlParent);
}
public void setStatus(Status status, boolean copy) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_setStatus__SWIG_0(swigCPtr, this, Status.getCPtr(status), status, copy);
}
public void setStatus(Status status) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_setStatus__SWIG_1(swigCPtr, this, Status.getCPtr(status), status);
}
public StatusParamVector getParamList() {
return new StatusParamVector(InscoperJNI.Status_getParamList(swigCPtr, this), true);
}
public StatusParam getParam(SubDeviceId subDeviceId) {
long cPtr = InscoperJNI.Status_getParam(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
return StatusParam.createProxy(cPtr, false);
}
public boolean hasParamValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_hasParamValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public String getParamStringValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamStringValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public char getParamCharValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamCharValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public short getParamShortValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamShortValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public int getParamIntValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamIntValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public java.math.BigInteger getParamUnsignedLongValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamUnsignedLongValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public long getParamLongValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamLongValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public float getParamFloatValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamFloatValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public double getParamDoubleValue(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return InscoperJNI.Status_getParamDoubleValue(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public EParamType getValueType(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
return EParamType.swigToEnum(InscoperJNI.Status_getValueType(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId));
}
public StringVector getTags() {
return new StringVector(InscoperJNI.Status_getTags(swigCPtr, this), false);
}
public void addTag(String tag) {
InscoperJNI.Status_addTag(swigCPtr, this, tag);
}
public void addTags(StringVector tagList) {
InscoperJNI.Status_addTags(swigCPtr, this, StringVector.getCPtr(tagList), tagList);
}
public void addParam(SubDeviceId subDeviceId) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_0(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public void addParam(SubDeviceId subDeviceId, String value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_1(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, char value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_2(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, short value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_3(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, int value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_4(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, java.math.BigInteger value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_5(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, long value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_6(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, float value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_7(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, double value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_8(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(SubDeviceId subDeviceId, boolean value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_9(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, value);
}
public void addParam(StatusParam newParam) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addParam__SWIG_10(swigCPtr, this, StatusParam.getCPtr(newParam), newParam);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, String value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_0(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, char value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_1(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, short value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_2(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, int value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_3(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, java.math.BigInteger value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_4(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, long value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_5(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, float value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_6(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, double value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_7(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(SubDeviceId subDeviceId, int tag, boolean value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_8(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, String value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_9(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, char value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_10(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, short value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_11(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, int value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_12(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, java.math.BigInteger value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_13(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, long value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_14(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, float value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_15(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, double value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_16(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public void addMultiParam(int index, SubDeviceId subDeviceId, int tag, boolean value) throws com.inscoper.api.InscoperException {
InscoperJNI.Status_addMultiParam__SWIG_17(swigCPtr, this, index, SubDeviceId.getCPtr(subDeviceId), subDeviceId, tag, value);
}
public boolean containsParam(SubDeviceId subDeviceId) {
return InscoperJNI.Status_containsParam(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
public void removeParam(SubDeviceId subDeviceId) {
InscoperJNI.Status_removeParam(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
}
private boolean equals(Status other) {
return InscoperJNI.Status_equals(swigCPtr, this, Status.getCPtr(other), other);
}
private long getHash() {
return InscoperJNI.Status_getHash(swigCPtr, this);
}
}
Updated on 2026-09-03 at 12:14:19 +0200