Skip to content

InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/StatusParam.java

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.StatusParam
StatusParam class pairs a sub-device with a value.

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 StatusParam {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected StatusParam(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(StatusParam 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_StatusParam(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static StatusParam createProxy(long cPtr, boolean cMemoryOwn) {
    if (cPtr == 0) return null;
    StatusParam tmp = new StatusParam(cPtr, false);
    int type = tmp.getRealType();
    switch(type) {
         case 1: return new ChildStatusParam(cPtr, cMemoryOwn);   case 2: return new ModifiableStatusParam(cPtr, cMemoryOwn);   case 3: return new ParentStatusParam(cPtr, cMemoryOwn); 
        default: return new StatusParam(cPtr, cMemoryOwn);
    }
  }

  /*@SWIG:Resources\Java\SWIG\inscoper_api.i,714,STATUS_PARAM_METHODS@*/
    public StatusParam(SubDeviceId subDeviceId, Object value) {
        this(subDeviceId);
        setValue(value);
    }

    public void setValue(Object value) {

        if(value instanceof String) {
            this.setValue(String.valueOf(value));
        } else if (value instanceof Character) {
            this.setValue(((Character)value).charValue());
        } else if (value instanceof Short) {
            this.setValue(((Short)value).shortValue());
        } else if (value instanceof Integer) {
            this.setValue(((Integer)value).intValue());
        } else if (value instanceof java.math.BigInteger) {
            this.setValue((java.math.BigInteger)value);
        } else if (value instanceof Long) {
            this.setValue(((Long)value).longValue());
        } else if (value instanceof Float) {
            this.setValue(((Float)value).floatValue());
        } else if (value instanceof Double) {
            this.setValue(((Double)value).doubleValue());
        } else if (value instanceof Boolean) {
            this.setValue(((Boolean)value).booleanValue());
        } else {
            this.setValue(value.toString());
        }
    }

    public void addValue(int tag, Object value) {

        if(value instanceof String) {
            this.addValue(tag, String.valueOf(value));
        } else if (value instanceof Character) {
            this.addValue(tag, ((Character)value).charValue());
        } else if (value instanceof Short) {
            this.addValue(tag, ((Short)value).shortValue());
        } else if (value instanceof Integer) {
            this.addValue(tag, ((Integer)value).intValue());
        } else if (value instanceof java.math.BigInteger) {
            this.addValue(tag, (java.math.BigInteger)value);
        } else if (value instanceof Long) {
            this.addValue(tag, ((Long)value).longValue());
        } else if (value instanceof Float) {
            this.addValue(tag, ((Float)value).floatValue());
        } else if (value instanceof Double) {
            this.addValue(tag, ((Double)value).doubleValue());
        } else if (value instanceof Boolean) {
            this.addValue(tag, ((Boolean)value).booleanValue());
        } else {
            this.addValue(tag, value.toString());
        }
    }

    public void addValue(int index, int tag, Object value) {

        if(value instanceof String) {
            this.addValue(index, tag, String.valueOf(value));
        } else if (value instanceof Character) {
            this.addValue(index, tag, ((Character)value).charValue());
        } else if (value instanceof Short) {
            this.addValue(index, tag, ((Short)value).shortValue());
        } else if (value instanceof Integer) {
            this.addValue(index, tag, ((Integer)value).intValue());
        } else if (value instanceof java.math.BigInteger) {
            this.addValue(index, tag, ((java.math.BigInteger)value));
        } else if (value instanceof Long) {
            this.addValue(index, tag, ((Long)value).longValue());
        } else if (value instanceof Float) {
            this.addValue(index, tag, ((Float)value).floatValue());
        } else if (value instanceof Double) {
            this.addValue(index, tag, ((Double)value).doubleValue());
        } else if (value instanceof Boolean) {
            this.addValue(index, tag, ((Boolean)value).booleanValue());
        } else {
            this.addValue(index, tag, value.toString());
        }
    }

    public Object getValue() throws com.inscoper.api.InscoperException {
        switch(this.getValueType()) {
        case UINT8 :
            return this.getShortValue();
        case INT8 :
            return this.getCharValue();
        case UINT16 :
            return this.getIntValue();
        case INT16 :
            return this.getShortValue();
        case UINT32 :
            return this.getLongValue();
        case INT32 :
            return this.getIntValue();
        case UINT64 :
            return this.getUnsignedLongValue();
        case INT64 :
            return this.getLongValue();
        case FLOAT :
            return this.getFloatValue();
        case DOUBLE :
            return this.getDoubleValue();
        case STRING :
            return this.getStringValue();
        default :
            return this.getStringValue();
        }
    }

    private SubDeviceId subDeviceId = null;

    public SubDeviceId getSubDeviceId() {
        if(this.subDeviceId == null) {
            this.subDeviceId = getSubDeviceIdInternal();
        }
        return this.subDeviceId;
    }

    public void setSubDeviceId(SubDeviceId subDeviceId) {
        this.subDeviceId = subDeviceId;
        setSubDeviceIdInternal(this.subDeviceId);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        StatusParam other = (StatusParam) obj;
        return equals(other);
    }
/*@SWIG@*/

  public StatusParam(StatusParam other) {
    this(InscoperJNI.new_StatusParam__SWIG_0(StatusParam.getCPtr(other), other), true);
  }

  public StatusParam(SubDeviceId subDeviceId) {
    this(InscoperJNI.new_StatusParam__SWIG_1(SubDeviceId.getCPtr(subDeviceId), subDeviceId), true);
  }

  public StatusParam(SubDeviceId subDeviceId, String value) {
    this(InscoperJNI.new_StatusParam__SWIG_2(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, char value) {
    this(InscoperJNI.new_StatusParam__SWIG_3(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, short value) {
    this(InscoperJNI.new_StatusParam__SWIG_4(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, int value) {
    this(InscoperJNI.new_StatusParam__SWIG_5(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, java.math.BigInteger value) {
    this(InscoperJNI.new_StatusParam__SWIG_6(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, long value) {
    this(InscoperJNI.new_StatusParam__SWIG_7(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, float value) {
    this(InscoperJNI.new_StatusParam__SWIG_8(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, double value) {
    this(InscoperJNI.new_StatusParam__SWIG_9(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  public StatusParam(SubDeviceId subDeviceId, boolean value) {
    this(InscoperJNI.new_StatusParam__SWIG_10(SubDeviceId.getCPtr(subDeviceId), subDeviceId, value), true);
  }

  private SubDeviceId getSubDeviceIdInternal() {
    return new SubDeviceId(InscoperJNI.StatusParam_getSubDeviceIdInternal(swigCPtr, this), true);
  }

  private void setSubDeviceIdInternal(SubDeviceId subDeviceId) {
    InscoperJNI.StatusParam_setSubDeviceIdInternal(swigCPtr, this, SubDeviceId.getCPtr(subDeviceId), subDeviceId);
  }

  public boolean hasValue() {
    return InscoperJNI.StatusParam_hasValue(swigCPtr, this);
  }

  public String getStringValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getStringValue(swigCPtr, this);
  }

  public char getCharValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getCharValue(swigCPtr, this);
  }

  public short getShortValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getShortValue(swigCPtr, this);
  }

  public int getIntValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getIntValue(swigCPtr, this);
  }

  public java.math.BigInteger getUnsignedLongValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getUnsignedLongValue(swigCPtr, this);
  }

  public long getLongValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getLongValue(swigCPtr, this);
  }

  public float getFloatValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getFloatValue(swigCPtr, this);
  }

  public double getDoubleValue() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getDoubleValue(swigCPtr, this);
  }

  public void setValue(String value) {
    InscoperJNI.StatusParam_setValue__SWIG_0(swigCPtr, this, value);
  }

  public void setValue(char value) {
    InscoperJNI.StatusParam_setValue__SWIG_1(swigCPtr, this, value);
  }

  public void setValue(short value) {
    InscoperJNI.StatusParam_setValue__SWIG_2(swigCPtr, this, value);
  }

  public void setValue(int value) {
    InscoperJNI.StatusParam_setValue__SWIG_3(swigCPtr, this, value);
  }

  public void setValue(java.math.BigInteger value) {
    InscoperJNI.StatusParam_setValue__SWIG_4(swigCPtr, this, value);
  }

  public void setValue(long value) {
    InscoperJNI.StatusParam_setValue__SWIG_5(swigCPtr, this, value);
  }

  public void setValue(float value) {
    InscoperJNI.StatusParam_setValue__SWIG_6(swigCPtr, this, value);
  }

  public void setValue(double value) {
    InscoperJNI.StatusParam_setValue__SWIG_7(swigCPtr, this, value);
  }

  public void setValue(boolean value) {
    InscoperJNI.StatusParam_setValue__SWIG_8(swigCPtr, this, value);
  }

  public void addValue(int tag, String value) {
    InscoperJNI.StatusParam_addValue__SWIG_0(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, char value) {
    InscoperJNI.StatusParam_addValue__SWIG_1(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, short value) {
    InscoperJNI.StatusParam_addValue__SWIG_2(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, int value) {
    InscoperJNI.StatusParam_addValue__SWIG_3(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, java.math.BigInteger value) {
    InscoperJNI.StatusParam_addValue__SWIG_4(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, long value) {
    InscoperJNI.StatusParam_addValue__SWIG_5(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, float value) {
    InscoperJNI.StatusParam_addValue__SWIG_6(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, double value) {
    InscoperJNI.StatusParam_addValue__SWIG_7(swigCPtr, this, tag, value);
  }

  public void addValue(int tag, boolean value) {
    InscoperJNI.StatusParam_addValue__SWIG_8(swigCPtr, this, tag, value);
  }

  public void addValue(int index, int tag, String value) {
    InscoperJNI.StatusParam_addValue__SWIG_9(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, char value) {
    InscoperJNI.StatusParam_addValue__SWIG_10(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, short value) {
    InscoperJNI.StatusParam_addValue__SWIG_11(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, int value) {
    InscoperJNI.StatusParam_addValue__SWIG_12(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, java.math.BigInteger value) {
    InscoperJNI.StatusParam_addValue__SWIG_13(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, long value) {
    InscoperJNI.StatusParam_addValue__SWIG_14(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, float value) {
    InscoperJNI.StatusParam_addValue__SWIG_15(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, double value) {
    InscoperJNI.StatusParam_addValue__SWIG_16(swigCPtr, this, index, tag, value);
  }

  public void addValue(int index, int tag, boolean value) {
    InscoperJNI.StatusParam_addValue__SWIG_17(swigCPtr, this, index, tag, value);
  }

  public String getType() throws com.inscoper.api.InscoperException {
    return InscoperJNI.StatusParam_getType(swigCPtr, this);
  }

  public String print() {
    return InscoperJNI.StatusParam_print(swigCPtr, this);
  }

  public EParamType getValueType() throws com.inscoper.api.InscoperException {
    return EParamType.swigToEnum(InscoperJNI.StatusParam_getValueType(swigCPtr, this));
  }

  public StatusParam clone() {
    long cPtr = InscoperJNI.StatusParam_clone(swigCPtr, this);
    return (cPtr == 0) ? null : new StatusParam(cPtr, true);
  }

  private boolean equals(StatusParam other) {
    return InscoperJNI.StatusParam_equals(swigCPtr, this, StatusParam.getCPtr(other), other);
  }

  public int getRealType() {
    return InscoperJNI.StatusParam_getRealType(swigCPtr, this);
  }

}

Updated on 2026-09-03 at 12:14:19 +0200