Exemple #1
0
        private void OnDeviceLost(object sender, AtemDeviceInfo info)
        {
            var id = info.Id();

            lock (_devices)
            {
                if (_devices.TryGetValue(id, out AtemDevice device))
                {
                    Log.InfoFormat("Lost device: {0}", info.ToString());

                    if (!device.Remember)
                    {
                        _devices.Remove(id);

                        _dbDevices.Delete(id); // Ensure its not in the db (it shouldnt be)
                    }

                    // Ensure device is in expected state
                    SetupConnection(device);

                    SendDevicesDebounce();
                }
            }
        }
Exemple #2
0
 public static string Id(this AtemDeviceInfo info)
 {
     return(AtemDeviceExt.Id(info.Address, info.Port));
 }
Exemple #3
0
 public AtemDevice(AtemDeviceInfo info)
 {
     Info          = info;
     Subscriptions = new HashSet <string>();
 }