- public void set_channel_flags(OpenChannel this_ptr, byte val) {
- bindings.OpenChannel_set_channel_flags(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
- this.ptrs_to.add(this_ptr);
+ /**
+ * Creates a copy of the OpenChannel
+ */
+ public OpenChannel clone() {
+ long ret = bindings.OpenChannel_clone(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ OpenChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new OpenChannel(null, ret); }
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Serialize the OpenChannel object into a byte array which can be read by OpenChannel_read
+ */
+ public byte[] write() {
+ byte[] ret = bindings.OpenChannel_write(this.ptr);
+ return ret;