Example #1
0
 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;
 }
Example #2
0
 public static Variable MakeShortVariable(int address, ByteMemory memory)
 {
     return new Variable(address, ShortTypeValue.Instance, memory);
 }
Example #3
0
 public abstract void ToMemory(ByteMemory memory, int address, object obj);
Example #4
0
 public static Variable MakeIntegerVariable(int address, ByteMemory memory)
 {
     return new Variable(address, IntegerTypeValue.Instance, memory);
 }
Example #5
0
 public abstract object FromMemory(ByteMemory memory, int address);
Example #6
0
 public override void ToMemory(ByteMemory memory, int address, object obj)
 {
     memory.SetBytes(address, this.ToBytes(obj));
 }
Example #7
0
 public override object FromMemory(ByteMemory memory, int address)
 {
     return this.FromBytes(memory.GetBytes(address, this.Size));
 }
Example #8
0
 public override void ToMemory(ByteMemory memory, int address, object obj)
 {
     memory.SetBit(address, (bool)obj);
 }
Example #9
0
 public override object FromMemory(ByteMemory memory, int address)
 {
     return memory.GetBit(address);
 }