Esempio n. 1
0
 protected ImmutableState(ImmutableState prev, ushort from, ushort to, DeviceState device)
 {
     _memory = prev._memory;
     _regs = prev._regs;
     _memoryMap = new MemoryMap(prev._memoryMap);
     _memoryMap.Map(from, to, device.Id);
     _deviceStates = new Dictionary<string,DeviceState>(prev._deviceStates);
     _deviceStates[device.Id] = device;
 }
Esempio n. 2
0
 protected DeviceState(DeviceState previous)
 {
     OnWrite = previous.OnWrite;
 }
Esempio n. 3
0
 public IState Map(ushort from, ushort to, DeviceState device)
 {
     _memoryMap.Map(from, to, device.Id);
     _deviceStates[device.Id] = device;
     return this;
 }
Esempio n. 4
0
 public IState Map(ushort from, ushort to, DeviceState device)
 {
     return new ImmutableState(this, from, to, device);
 }