Exemplo n.º 1
0
 /// <summary>
 /// Rssi changed: update history, record last time
 /// </summary>
 /// <returns>T</returns>
 /// <param name="iot">The IoT.</param>
 public void TrackRssi(IIoTIdentifiable iot)
 {
     Debug.Assert(MACAddress == iot.MACAddress());
     if (MACAddress == iot.MACAddress())
     {
         IoT = iot;
         rssis.Enqueue(iot.RSSI());
         LastSeen = DateTimeOffset.Now;
     }
 }
Exemplo n.º 2
0
        public void TrackIoT(IIoTIdentifiable iot)
        {
            var         mac         = iot.MACAddress();
            RssiHistory rssiHistory = (rssis.ContainsKey(mac))
                ? rssis[mac]
                : new RssiHistory(iot.MACAddress());

            rssiHistory.TrackRssi(iot);
            rssis[mac] = rssiHistory;
            iots[mac]  = iot;
        }
Exemplo n.º 3
0
 public IoTAverageRssi(IIoTIdentifiable ioTIdentifiable, double averageRssi)
 {
     IoTIdentifiable = ioTIdentifiable;
     AverageRssi     = averageRssi;
 }