Exemple #1
0
        public void Add(HexBitField bitField)
        {
            Debug.Assert(bitField.Owner == null);
            bitField.Owner = this;
            bitFields.Add(bitField.Bit, bitField);
            Debug.Assert(!DataFieldVM.HasError);                // Should only be called at init and it's then always valid
            ulong val = ToUInt64(DataFieldVM.ObjectValue);

            SetValue(bitField, val);
        }
Exemple #2
0
        internal void Updated(HexBitField bitField)
        {
            ulong val     = ToUInt64(ReadData());
            ulong origVal = val;

            val &= ~(bitField.Mask << bitField.Bit);
            val |= bitField.GetValue() << bitField.Bit;
            if (origVal != val)
            {
                WriteNewValue(val);
            }
        }
Exemple #3
0
        void SetValue(HexBitField bitField, ulong val)
        {
            ulong bitVal = (val >> bitField.Bit) & bitField.Mask;

            bitField.SetValue(bitVal);
        }
Exemple #4
0
		internal void Updated(HexBitField bitField) {
			ulong val = ToUInt64(ReadData());
			ulong origVal = val;
			val &= ~(bitField.Mask << bitField.Bit);
			val |= bitField.GetValue() << bitField.Bit;
			if (origVal != val)
				WriteNewValue(val);
		}
Exemple #5
0
		void SetValue(HexBitField bitField, ulong val) {
			ulong bitVal = (val >> bitField.Bit) & bitField.Mask;
			bitField.SetValue(bitVal);
		}
Exemple #6
0
		public void Add(HexBitField bitField) {
			Debug.Assert(bitField.Owner == null);
			bitField.Owner = this;
			bitFields.Add(bitField.Bit, bitField);
			Debug.Assert(!DataFieldVM.HasError);	// Should only be called at init and it's then always valid
			ulong val = ToUInt64(DataFieldVM.ObjectValue);
			SetValue(bitField, val);
		}