Exemple #1
0
        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);
        }
Exemple #2
0
 public override void UpdateValueFromBuffer(byte[] buffer)
 {
     Value = BufferHelper.GetUshort(buffer[Position], buffer[Position + 1], ElementDirection);
 }