public override void ServerEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushDiscretes( command, body); }
public override void ServerEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader( command, body); }
public override void ClientDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopDiscretes( command, body); }
public override void ClientDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( command, body); }
public override void ClientEncode(ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader(command, body); int count = command.Count; body.WriteByte((byte)(count * 2)); for (int index = 0; index < count; ++index) { body.WriteUInt16BE(command.Data[index]); } }
public override void ServerDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( command, body); command.Data = new ushort[command.Count]; command.QueryTotalLength += 2; }
public override void ServerDecode(ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader(command, body); int length = (int)body.ReadByte() / 2; command.Data = new ushort[length]; command.QueryTotalLength += length + 3; for (int index = 0; index < length; ++index) { command.Data[index] = body.ReadUInt16BE(); } }
public override void ServerDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( command, body); ModbusCodecBase.PopDiscretes( command, body); }
public override void ClientEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader( command, body); ModbusCodecBase.PushDiscretes( command, body); }
public override void ServerDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( command, body); var count = body.ReadByte() / 2; command.Data = new ushort[count]; command.QueryTotalLength += (count * 2 + 3); for (int i = 0; i < count; i++) { command.Data[i] = body.ReadUInt16BE(); } }