public Buffer64BytesHandler() { handler = this; commandHeader = new CommandHeader(); message64 = new Full64BufferMessage(); message64.header = commandHeader.order; remainingSize = 64 - Marshal.SizeOf(message64.header); message64.content = new Byte[remainingSize]; }
public Byte[] BuildAliveMessage() { CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; // datagram.order.task = 'I'; order.command = Commands.KeepConnected; datagram.order = order; buffer.Initialize(); Buffer.BlockCopy(datagram.GetOrderArrayBytes(), 0, buffer, 0, buffer.Length); return(buffer); }
public Byte[] CreateFansStatusRequestMessage() { buffer = new Byte[sizeStruct]; CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; order.task = Commands.ReadFansStatus; datagram.order = order; SingleTaskMessage m; m.header = order; m.description = 0; buffer.Initialize(); Buffer.BlockCopy(GetSingleTaskCommandArrayBytes(m), 0, buffer, 0, sizeStruct); return(buffer); }
public Byte[] CreateEnableScavengeMessage(Byte p) { var size = Marshal.SizeOf(singleTaskMessage); buffer = new Byte[size]; CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; order.task = Commands.EnableScavenge; datagram.order = order; SingleTaskMessage m; m.header = order; m.description = p; buffer.Initialize(); Buffer.BlockCopy(GetSingleTaskCommandArrayBytes(m), 0, buffer, 0, size); return(buffer); }
public Byte[] CreateDataLogRequestMessage(UInt32 address) { var size = Marshal.SizeOf(dataLogAddress); buffer = new Byte[size]; CommandHeader datagram = new CommandHeader(); SingleTaskCommand order = datagram.order; order.task = Commands.ReadDataLog; datagram.order = order; DataLogAddressMessage m; m.header = order; m.address = address; buffer.Initialize(); Buffer.BlockCopy(GetDataLogAddressArrayBytes(m), 0, buffer, 0, size); return(buffer); }