Esempio n. 1
0
 public override void ServerEncode(
     ModbusCommand command,
     ByteArrayWriter body)
 {
     ModbusCodecBase.PushRequestHeader(
         command,
         body);
 }
Esempio n. 2
0
        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]);
            }
        }
Esempio n. 3
0
        public override void ClientEncode(
            ModbusCommand command,
            ByteArrayWriter body)
        {
            ModbusCodecBase.PushRequestHeader(
                command,
                body);

            ModbusCodecBase.PushDiscretes(
                command,
                body);
        }