public ArduinoDetails(IRadio radio, ILoggerFactoryAdapter loggerFactory, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer) { _radio = radio; _logger = loggerFactory.GetLogger(GetType()); _configuration = configuration; _commandProcessor = commandProcessor; _registerContainer = registerContainer; }
public TransmitPipe(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer, GpioPin cePin) { _configuration = configuration; _commandProcessor = commandProcessor; _registerContainer = registerContainer; _logger = loggerFactoryAdapter.GetLogger(GetType()); _cePin = cePin; }
public ReceivePipeCollection(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer) { _registerContainer = registerContainer; _commandProcessor = commandProcessor; Add(0, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 0)); Add(1, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 1)); Add(2, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 2)); Add(3, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 3)); Add(4, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 4)); Add(5, new ReceivePipe(loggerFactoryAdapter, configuration, commandProcessor, registerContainer, this, 5)); }
public ReceivePipe(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer, IReceivePipeCollection parent, int pipeId) { if (PipeId > 5) throw new ArgumentOutOfRangeException(nameof(pipeId), "Invalid PipeId number for this Pipe"); _logger = loggerFactoryAdapter.GetLogger(string.Format("{0}{1}", GetType().Name, pipeId)); _configuration = configuration; _commandProcessor = commandProcessor; _registerContainer = registerContainer; _parent = parent; PipeId = pipeId; }
public ReceivePipe(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer, IReceivePipeCollection parent, int pipeId) { if (PipeId > 5) { throw new ArgumentOutOfRangeException(nameof(pipeId), "Invalid PipeId number for this Pipe"); } _logger = loggerFactoryAdapter.GetLogger(string.Format("{0}{1}", GetType().Name, pipeId)); _configuration = configuration; _commandProcessor = commandProcessor; _registerContainer = registerContainer; _parent = parent; PipeId = pipeId; }
public Configuration(ILoggerFactoryAdapter loggerFactoryAdapter, ICommandProcessor commandProcessor, IRegisterContainer registerContainer) { _logger = loggerFactoryAdapter.GetLogger(GetType()); _commandProcessor = commandProcessor; _registerContainer = registerContainer; _payloadWidth = Constants.MaxPayloadWidth; // Attempt to set DataRate to 250Kbps to determine if this is a plus model DataRates oldDataRate = DataRate; DataRate = DataRates.DataRate250Kbps; _isPlusModel = DataRate == DataRates.DataRate250Kbps; DataRate = oldDataRate; }
/// <summary> /// Sets all of the registers on an emulated processor. /// </summary> /// <param name="vm">VirtualMachine instance which owns the processor.</param> /// <param name="cpuState">New state of the processor.</param> public static void SetState(this VirtualMachine vm, IRegisterContainer cpuState) { var p = vm.Processor; p.EAX = (int)cpuState.EAX; p.EBX = (int)cpuState.EBX; p.ECX = (int)cpuState.ECX; p.EDX = (int)cpuState.EDX; p.ESI = cpuState.ESI; p.EDI = cpuState.EDI; p.ESP = cpuState.ESP; p.EBP = cpuState.EBP; vm.WriteSegmentRegister(SegmentIndex.DS, cpuState.DS); vm.WriteSegmentRegister(SegmentIndex.ES, cpuState.ES); vm.WriteSegmentRegister(SegmentIndex.FS, cpuState.FS); vm.WriteSegmentRegister(SegmentIndex.GS, cpuState.GS); vm.WriteSegmentRegister(SegmentIndex.SS, cpuState.SS); p.CR0 = cpuState.CR0; p.Flags.Value = cpuState.Flags; }
/// <summary> /// Initializes a new instance of the RegisterStringProvider class. /// </summary> /// <param name="source">Register value source.</param> public RegisterStringProvider(IRegisterContainer source) { this.source = source; }