handle = (WLINK_HANDLE) Structure.newInstance(WLINK_HANDLE.class, myPointer);handle.instruction = (byte)0x07;
handle.write();Pointer native@0xdf0150 already mapped to com.alcineo.protocols.ProtocolWlink$2@13ead767public static class WLINK_HANDLE extends Structure {
public static interface SendFunc extends Callback {
int invoke(WLINK_HANDLE handle, Pointer data, int nbytes);
}
public static interface ReceiveFunc extends Callback {
int invoke(WLINK_HANDLE handle, Pointer outData, IntByReference nbytes, NativeLong timeoutms);
}
public static interface FlushFunc extends Callback {
int invoke(WLINK_HANDLE handle);
}
public WLINK_HANDLE(Pointer p) {
super(p);
read();
}
public byte seq_nb; /**< Sequence number */
public byte sender_id_const;
public byte sender_id; /**< Sender index */
public byte receiver_id_const;
public byte receiver_id; /**< Receiver index */
public byte instruction; /**< Instruction identifier */
public short len; /**< Len */
public NativeLong timeoutms;
public int channel;
public Pointer handle;
public SendFunc send;
public ReceiveFunc receive;
public FlushFunc flush;
public Pointer listener_list;
@Override
protected List getFieldOrder() {
return Arrays.asList("seq_nb", "sender_id_const", "sender_id", "receiver_id_const",
"receiver_id", "instruction", "len", "timeoutms", "channel", "handle",
"send", "receive", "flush", "listener_list");
}
}
handle = new WLINK_HANDLE(handleRef.getValue());
handle = new WLINK_HANDLE(handleRef.getValue());
My handle is an empty structure.Pointer native@0xdf0150 already mapped to com.alcineo.protocols.ProtocolWlink$2@13ead767
This one.
You received this message because you are subscribed to a topic in the Google Groups "Java Native Access" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jna-users/Uft6T4zsLu8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jna-users+...@googlegroups.com.