public EventReader(PhaseUtils phaseUtils, IReaderService readerService) { _phaseUtils = phaseUtils; _readerService = readerService; Readings = new ObservableCollection<Reading>(); PerAntennaReadings = new Dictionary<string, List<Reading>>(); Readings.CollectionChanged += ReadingsChanged; }
static void Main(string[] args) { string ipAddress = args.Length > 0 ? args[0]: "192.168.0.111"; var phaseUtils = new PhaseUtils(); for (int i = 0; i < 250; i++) { var readerService = new ReaderService(ipAddress, "admin", "readeradmin"); using (var eventReader = new EventReader(phaseUtils, readerService)) { eventReader.Run(); Thread.Sleep(3000); ProcessResults(i, eventReader.PerAntennaReadings); } } Console.WriteLine("Exiting"); Console.ReadLine(); }