Esempio n. 1
0
 public ModbusMessage(byte _address, byte _function, byte[] _data)
 {
     address  = _address;
     function = _function;
     data     = _data;
     checksum = Crc16.GetChecksum(new byte[2] {
         address, function
     }.Concat(data).ToArray());
     isFromMaster = false;
 }
Esempio n. 2
0
 public void RecalculateChecksum()
 {
     checksum = Crc16.GetChecksum(new byte[2] {
         address, function
     }.Concat(data).ToArray());
 }