Example #1
0
        public static bool AddConfiguration(CarrierInformation carrier, long downCoverterDeviceId, long cicDecoderDeviceId)
        {
            if (_activeConfigurations.Any(x => x.CarrierInformation.CarrierId == carrier.CarrierId))
            {
                return(false);
            }

            var downConverter = _downConverters.FirstOrDefault(x => x.DeviceId == downCoverterDeviceId);

            if (downConverter == null)
            {
                return(false);
            }

            var cicDecoder = _cicDecoders.FirstOrDefault(x => x.DeviceId == cicDecoderDeviceId);

            if (cicDecoder == null)
            {
                return(false);
            }

            var manager = new CicManager {
                CarrierInformation = carrier, DownConverter = downConverter, Decoder = cicDecoder
            };

            manager.StartConfiguration();
            _activeConfigurations.Add(manager);
            return(true);
        }
 internal void ConfigureCarrier(CarrierInformation configuration)
 {
     throw new NotImplementedException();
 }