public void CreateTerminalTester(string peripheralName) { if(testers.ContainsKey(peripheralName)) { throw new KeywordException("Terminal tester for peripheral {0} already exists"); } IUART uart; if(!monitor.Machine.TryGetByName(peripheralName, out uart)) { throw new KeywordException("Peripheral not found or of wrong type: {0}", peripheralName); } var tester = new TerminalTester(new TimeSpan(0, 0, 30)); tester.Terminal.AttachTo(uart); testers.Add(peripheralName, tester); }
public static void CreateTerminalTester(this Emulation emulation, string name, int timeoutInSeconds = 300, string prompt = @"/ # ") { var tester = new TerminalTester(TimeSpan.FromSeconds(timeoutInSeconds), prompt); emulation.ExternalsManager.AddExternal(tester, name); }