Exemplo n.º 1
0
        private ModelInterface[] GetUnconfigedInterfaces(AceModelRestricted model)
        {
            IConfigDll hwconfig = _container.Resolve <IConfigDll>(AgentName);

            if ((hwconfig == null) || (model == null))
            {
                return(Enumerable.Empty <ModelInterface>().ToArray());
            }
            return(model.GetUnconfigedSampleInterfaces(hwconfig).ToArray());
        }
Exemplo n.º 2
0
        private void DiscoverInterfaces(IConfigDll hwconfig)
        {
            var intfcs           = _model.GetAllElements().Where(e => e is ModelInterfaceSample).Select(i => i as ModelInterfaceSample);
            var unconfigedIntfcs = _model.GetUnconfigedSampleInterfaces(hwconfig);
            var intfcList        = new List <ModelInterfaceSample>();

            intfcList.AddRange(intfcs);
            intfcList.AddRange(unconfigedIntfcs);
            var checkList = intfcList.Where(i => i.AutoDiscoverDevices);

            foreach (var intfc in checkList)
            {
                RequestDiscoveryAction(intfc);
            }
        }
Exemplo n.º 3
0
 private ModelInterface[] GetUnconfigedInterfaces(AceModelRestricted model)
 {
     IConfigDll hwconfig = _container.Resolve<IConfigDll>(AgentName);
     if ((hwconfig == null) || (model == null)) return Enumerable.Empty<ModelInterface>().ToArray();
     return model.GetUnconfigedSampleInterfaces(hwconfig).ToArray();
 }