public override void UpdateValueFromBuffer(byte[] buffer) { if (TargetElement == null) { return; } //targetElement MUST be updated first!.. _referenceCRC.Hash = CRC.GetCRC16(buffer, TargetElement.Position, TargetElement.Size).Hash; //simply read and store existing CRC from buffer.. Value.Hash = BufferHelper.GetUshort(buffer[Position], buffer[Position + 1], ElementDirection); }
public override void UpdateValueFromBuffer(byte[] buffer) { Value = BufferHelper.GetUshort(buffer[Position], buffer[Position + 1], ElementDirection); }