예제 #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;
 }
예제 #2
0
 protected DeviceState(DeviceState previous)
 {
     OnWrite = previous.OnWrite;
 }
예제 #3
0
 public IState Map(ushort from, ushort to, DeviceState device)
 {
     _memoryMap.Map(from, to, device.Id);
     _deviceStates[device.Id] = device;
     return this;
 }
예제 #4
0
 public IState Map(ushort from, ushort to, DeviceState device)
 {
     return new ImmutableState(this, from, to, device);
 }