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