public void NajdiIpAdresuRobota() { string hostname = "AGV_Luky"; DnsInfo info = GetHostNameAndIPAdress.DnsInfoFromHostname(hostname); Assert.IsTrue(info.IP.ToString() == "10.226.178.252"); }
public override async Task <AbstractRobot[]> PripojeniRoboti() { if (EnterpriseManagerClient == null) { Connect(); } var identifikatoryRobotuPripojenychNaServer = EnterpriseManagerClient.RefreshConnectedRobots(); await Task.Delay(10); LynxModel[] vysledek = new LynxModel[identifikatoryRobotuPripojenychNaServer.Where(x => x != null).Count()]; int indexPole = 0; foreach (string identifikator in identifikatoryRobotuPripojenychNaServer) { DnsInfo robotDnsInfo = GetHostNameAndIPAdress.DnsInfoFromHostname($"AGV_{identifikator}"); LynxModel pripojenyRobot = new LynxModel { Hostname = identifikator, IpAdress = robotDnsInfo.IP.ToString() }; vysledek[indexPole] = pripojenyRobot; indexPole++; } return(vysledek); }