public override void ClientDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( command, body); }
public override void ServerEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader( command, body); }
public override void ServerEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushDiscretes( command, body); }
public override void ClientDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopDiscretes( command, body); }
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); ModbusCodecBase.PopDiscretes( command, body); }
public override void ClientEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader( command, body); ModbusCodecBase.PushDiscretes( command, body); }
public override void ClientEncode( ModbusCommand command, ByteArrayWriter body) { ModbusCodecBase.PushRequestHeader( command, body); var count = command.Count; body.WriteByte((byte)(count * 2)); for (int i = 0; i < count; i++) { body.WriteUInt16BE(command.Data[i]); } }
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 + 3); for (int i = 0; i < count; i++) { command.Data[i] = body.ReadUInt16BE(); } }