RealSenseID icon indicating copy to clipboard operation
RealSenseID copied to clipboard

port field missing from SerialConfig when using Android wrapper

Open victorcassone2 opened this issue 6 months ago • 0 comments

Hello,

I'm trying to generate a Android compatible build using the android wrapper and the provided Dockerfile. I'm able to successfully build the .aar file but when I go to implement it, the SerialConfig class is missing the port field.

Here's my Docker commands.

docker build --platform=linux/amd64 -t rsid-builder:latest .
docker run --rm -it --platform linux/amd64 -v $(pwd):/rsid-builder rsid-builder bash -c "cd wrappers/android && ./gradlew clean bundleStandardReleaseAar"

Here's the generated SerialConfig class.

public class SerialConfig {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected SerialConfig(long cPtr, boolean cMemoryOwn) {
    this.swigCMemOwn = cMemoryOwn;
    this.swigCPtr = cPtr;
  }

  protected static long getCPtr(SerialConfig obj) {
    return obj == null ? 0L : obj.swigCPtr;
  }

  protected static long swigRelease(SerialConfig obj) {
    long ptr = 0L;
    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;
  }

  protected void finalize() {
    this.delete();
  }

  public synchronized void delete() {
    if (this.swigCPtr != 0L) {
      if (this.swigCMemOwn) {
        this.swigCMemOwn = false;
        RealSenseIDJNI.delete_SerialConfig(this.swigCPtr);
      }

      this.swigCPtr = 0L;
    }

  }

  public void setFileDescriptor(int value) {
    RealSenseIDJNI.SerialConfig_fileDescriptor_set(this.swigCPtr, this, value);
  }

  public int getFileDescriptor() {
    return RealSenseIDJNI.SerialConfig_fileDescriptor_get(this.swigCPtr, this);
  }

  public void setReadEndpoint(int value) {
    RealSenseIDJNI.SerialConfig_readEndpoint_set(this.swigCPtr, this, value);
  }

  public int getReadEndpoint() {
    return RealSenseIDJNI.SerialConfig_readEndpoint_get(this.swigCPtr, this);
  }

  public void setWriteEndpoint(int value) {
    RealSenseIDJNI.SerialConfig_writeEndpoint_set(this.swigCPtr, this, value);
  }

  public int getWriteEndpoint() {
    return RealSenseIDJNI.SerialConfig_writeEndpoint_get(this.swigCPtr, this);
  }

  public SerialConfig() {
    this(RealSenseIDJNI.new_SerialConfig(), true);
  }
}

victorcassone2 avatar Jul 25 '25 16:07 victorcassone2