コード例 #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());
        }
コード例 #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);
            }
        }
コード例 #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();
 }