Exemplo n.º 1
0
        private void M_client_TransmitReceiveChanged(object sender, TransmitReceiveArgs e)
        {
            try
            {
                logger.Info("M_client_TransmitReceiveChanged");

                Device device;
                lock (devices)
                {
                    device = devices.FirstOrDefault(r => r.ID == e.Info.TransmitDeviceID);
                }

                if (device != null)
                {
                    StringBuilder build = new StringBuilder();
                    build.Append("M_client_TransmitReceiveChanged");
                    build.Append("device: " + device.Name + " ");

                    logger.Info(build.ToString());

                    PostDeviceLifeSign(device.Name, device.RadioID, true);
                }
            }
            catch (Exception ex)
            {
                logger.Log(LogLevel.Error, ex);
            }
        }
Exemplo n.º 2
0
 private void TransmitReceiveChanged(object sender, TransmitReceiveArgs e)
 {
     try
     {
         int deviceID = e.Info.TransmitDeviceID;
         logger.Info($"TransmitReceiveChanged for deviceID {deviceID}");
         if (GetDeviceInfoByDeviceID(deviceID, out DeviceInfo deviceInfo) && deviceInfo.Device != null)
         {
             ciaBataController.PostDeviceLifeSign(deviceInfo.RadioID, deviceInfo.Device.Name, true);
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex, "An error occured at the TransmitReceiveChanged event");
     }
 }
Exemplo n.º 3
0
 private void M_client_TransmitReceiveChanged(object sender, TransmitReceiveArgs e)
 {
     logger.Debug($"M_client_TransmitReceiveChanged {e.Info.State}");
 }