private void GetActiveChanels() { foreach (var component in Board.Components) { if ((component.DesignItemId.Contains("FORMULA-256") || component.DesignItemId.Contains("FORMULA256")) && component.CurrentPartId < 17) { foreach (var pin in component.PinList) { if (ChanelMap.F2KMapping.Exists(x => x.Socket == pin.Designator)) { var tempname = ChanelMap.F2KMapping.Single(x => x.Socket == pin.Designator).Chanel; if (pin.ConnectedNets.Count != 0) { ActiveChanels.Add(new Chanel(tempname, pin.ConnectedNets.ElementAt(0).Text.ToUpper())); } else { if (pin.ConnectedPorts.Count != 0) { ActiveChanels.Add(new Chanel(tempname, pin.ConnectedPorts.ElementAt(0).Name.ToUpper())); } } } } } } }
private void GetActiveChanels() { foreach (var component in Board.Components) { if (component.DesignItemId.Contains("DIN41612R.РОЗ.УГЛ.48") || component.DesignItemId.Contains("DIN41612R.РОЗ.УГЛ.96")) { foreach (var pin in component.PinList) { if (pin.Name.Contains("CH")) { if (pin.ConnectedNets.Count != 0) { ActiveChanels.Add(new Chanel(pin.Name, pin.ConnectedNets.ElementAt(0).Text.ToUpper())); } else { if (pin.ConnectedPorts.Count != 0) { ActiveChanels.Add(new Chanel(pin.Name, pin.ConnectedPorts.ElementAt(0).Name.ToUpper())); } } } } } } }
private void GetActiveChanels() { foreach (var component in Board.Components) { if (component.DesignItemId.Contains("CONN_DIN_48") || component.DesignItemId.Contains("CONN_DIN_96")) { foreach (var pin in component.PinList) { var tempname = ""; if (component.DesignItemId.Contains("CONN_DIN_48")) { tempname = "J2_" + pin.Name; } if (component.DesignItemId.Contains("CONN_DIN_96")) { tempname = "J1_" + pin.Name; } if (ChanelMap.EttMapping.Exists(x => x.Socket == tempname)) { if (pin.ConnectedNets.Count != 0) { ActiveChanels.Add(new Chanel(tempname, pin.ConnectedNets.ElementAt(0).Text.ToUpper())); } else { if (pin.ConnectedPorts.Count != 0) { ActiveChanels.Add(new Chanel(tempname, pin.ConnectedPorts.ElementAt(0).Name.ToUpper())); } } } } } } foreach (var avaliblechanel in ChanelMap.EttMapping) { if (!ActiveChanels.Exists(x => x.ChanelName == avaliblechanel.Socket)) { FreeChanels.Add(new ConnectionUnion(avaliblechanel.Socket)); } } }
public DUT DeterminateDut() { var connectionCounters = new List <ConnectionCounter>(); foreach (var component in Board.Components) { if (!(component.DesignItemId.Contains("FORMULA-256") || component.DesignItemId.Contains("FORMULA256") || component.SourceLibraryName.Contains("KONT_TOCH"))) { connectionCounters.Add(new ConnectionCounter(component)); foreach (var pin in component.PinList) { var connection = ""; if (pin.ConnectedNets.Count != 0) { connection = pin.ConnectedNets.ElementAt(0).Text.ToUpper(); } else { if (pin.ConnectedPorts.Count != 0) { connection = pin.ConnectedPorts.ElementAt(0).Name.ToUpper(); } } if (ActiveChanels.Exists(x => x.ConnectionName == connection)) { connectionCounters.Single(x => x.Component == component).Count++; } } } } var resulresultlist = connectionCounters.OrderByDescending(x => x.Count).ToList(); var combinedComponent = CombineMultyPartComponent(resulresultlist.ElementAt(0).Component.Designator.Text); var result = new DUT(combinedComponent); return(result); }