public static bool ReceiveCommand(SerializeAdapter adapter, out PurlCommand command, out UInt32 payload_length, UInt32 retry = 50) { PurlCommand result_Command = PurlCommand.UNKNOWN; UInt32 result_Length = 0; bool result = Purl_receiveCommand(adapter.GetNativeReference(), ref result_Command, ref result_Length, retry); command = result_Command; payload_length = result_Length; return(result); }
private static extern bool Purl_receiveCommand(IntPtr adapter_reference, ref PurlCommand command, ref UInt32 payload_size, UInt32 retry);
private static extern void Purl_sendCommand(IntPtr adapter_reference, PurlCommand command, UInt32 payload_size, IntPtr command_payload_reference);
public static void SendCommand(SerializeAdapter adapter, PurlCommand command, UInt32 payload_size = 0, PurlCommandClass command_payload = null) { Purl_sendCommand(adapter.GetNativeReference(), command, payload_size, command_payload?.GetNativeReference() ?? IntPtr.Zero); }