public override void ClientDecode( ModbusCommand command, ByteArrayReader body) { ModbusCodecBase.PopRequestHeader( 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); 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 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(); } }