public Variable(int address, TypeValue typeValue, ByteMemory memory) { this.address = address; this.memory = memory; this.typeValue = typeValue; this.lastvalue = this.Value; this.memory.ChangedMemory += this.CheckNewValue; }
public static Variable MakeShortVariable(int address, ByteMemory memory) { return new Variable(address, ShortTypeValue.Instance, memory); }
public abstract void ToMemory(ByteMemory memory, int address, object obj);
public static Variable MakeIntegerVariable(int address, ByteMemory memory) { return new Variable(address, IntegerTypeValue.Instance, memory); }
public abstract object FromMemory(ByteMemory memory, int address);
public override void ToMemory(ByteMemory memory, int address, object obj) { memory.SetBytes(address, this.ToBytes(obj)); }
public override object FromMemory(ByteMemory memory, int address) { return this.FromBytes(memory.GetBytes(address, this.Size)); }
public override void ToMemory(ByteMemory memory, int address, object obj) { memory.SetBit(address, (bool)obj); }
public override object FromMemory(ByteMemory memory, int address) { return memory.GetBit(address); }