private static void SetEthernetInformation(StaticPerformanceData data) { data.EthernetAdapters = new List <EthernetAdapter>(); foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces()) { if (ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet) { var ipProperties = ni.GetIPProperties(); var adapter = new EthernetAdapter { AdapterName = ni.Name, Description = ni.Description, ConnectionType = ni.NetworkInterfaceType.ToString(), DnsName = ipProperties.DnsSuffix }; foreach (var ip in ipProperties.UnicastAddresses) { if (ip.Address.AddressFamily == AddressFamily.InterNetwork && adapter.Ipv4Address == null) { adapter.Ipv4Address = ip.Address.ToString(); } else if (ip.Address.AddressFamily == AddressFamily.InterNetworkV6 && adapter.Ipv6Address == null) { adapter.Ipv6Address = ip.Address.ToString(); } } data.EthernetAdapters.Add(adapter); } } }
public Hub(int iPorts) { mAdapters = new EthernetAdapter[iPorts]; for (int i = 0; i < iPorts; i++) { mAdapters[i] = new EthernetAdapter(); mAdapters[i].PromiscuousMode = true; } }
public EthernetAdapterViewModel(EthernetAdapter ethernetAdapter) { Points = new ObservableCollection <GraphPoint>(); _time = DateTime.Now; for (int i = 0; i < 60; i++) { Points.Add(new GraphPoint(_time, 0, 0)); _time = _time.AddSeconds(1); } EthernetAdapter = ethernetAdapter; }
public void AllEthernetAdapter(EthernetAdapter AllEthernetAdapter) { EthernetAdaper = AllEthernetAdapter; }
public void AllEthernetAdapter(EthernetAdapter iModbusEthernetAdapter) { throw new NotImplementedException(); }
public void AllEthernetAdapter(EthernetAdapter iModbusEthernetAdapter) { EthernetAdaper = iModbusEthernetAdapter; }
public ModbusTCPMaster(string ip, short port, int connectTimeout) : this() { EthernetAdaper = new EthernetAdapter(ip, port, connectTimeout); }
public ModbusTCPMaster(string ip, int port) : this() { EthernetAdaper = new EthernetAdapter(ip, port); }
public void AllEthernetAdapter(EthernetAdapter iXGTEthernetAdapter) { EthernetAdaper = iXGTEthernetAdapter; }
public LSFENet(string ip, short port, int connectTimeout) : this() { Requests = new Dictionary <ushort, LSRequestMessage>(1024); EthernetAdaper = new EthernetAdapter(ip, port, connectTimeout); }
public LS_FENET(string ip, short port, int connectTimeout) : this() { EthernetAdaper = new EthernetAdapter(ip, port, connectTimeout); }
// construction public LS_FENET(string ip, int port) : this() { EthernetAdaper = new EthernetAdapter(ip, port); }