Esempio n. 1
0
		internal void SetActual(DateTime time, Bss bss)
		{
			Bss = bss;
			LastSeen = time;
			Events.Add(new SignalEvent(time, Bss.LinkQuality));
			LimitEvents();
			IsActual = true;
		}
Esempio n. 2
0
		internal BssTracker(SsidTracker owner, Bss bss)
		{
			_owner = owner;
			Bss = bss;
		}
Esempio n. 3
0
		internal void ReloadBssList(WlanInternBssEntry[] lst)
		{
			if (lst == null || lst.Length == 0)
			{
				_bsses.Clear();
				return;
			}
			var itemsToDelete = _bsses.ToList();

			for (int i = 0; i < lst.Length; i++)
			{
				var newBss = lst[i];
				string mac = newBss.GetMacAddress();
				var item = itemsToDelete.FirstOrDefault(x => x.Mac == mac);
				if (item == null)
				{
					item = new Bss(this, newBss);
					_bsses.Add(item);
				}
				else
				{
					item.Reload(newBss);
					itemsToDelete.Remove(item);
				}
				var oldIndex = _bsses.IndexOf(item);
				_bsses.Move(oldIndex, i);
			}

			foreach (var item in itemsToDelete)
			{
				_bsses.Remove(item);
			}
		}