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