public Byte[] CreateReadParametersRequest() { CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; // datagram.order.task = 'I'; order.task = Commands.ReadParameters; datagram.order = order; buffer.Initialize(); Buffer.BlockCopy(datagram.GetOrderArrayBytes(), 0, buffer, 0, buffer.Length); return(buffer); }
public Byte[] CreateWriteParametersMessage(UserParameters p) { var size = Marshal.SizeOf(parametersMessage); buffer = new Byte[size]; CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; order.task = Commands.WriteParameters; datagram.order = order; ParametersMessage m; m.header = order; m.parameters = p; buffer.Initialize(); Buffer.BlockCopy(GetWriteParametersArrayBytes(m), 0, buffer, 0, size); return(buffer); }