public void OfflineMoxaTest() { MoxaModel moxa = new MoxaModel { Hostname = "laser", IpAdress = "10.226.174.111" }; moxa.Connect(); Assert.IsFalse(moxa.Status == Stav.Online); }
public void OnlineMoxaTest() { MoxaModel moxa = new MoxaModel { Hostname = "smtsklad", IpAdress = "10.226.174.110", Port = 502 }; moxa.Connect(); Assert.IsTrue(moxa.Status == Stav.Online); }
public void DisconnectMoxaTest() { MoxaModel moxa = new MoxaModel { Hostname = "smtsklad", IpAdress = "10.226.174.110", Port = 8888 }; moxa.NastavModbusKlienta(); moxa.Disconnect(); Assert.IsFalse(moxa.Status == Stav.Online); }
private AbstractExternalDevice ExterniZarizeniModelPodleDodavatele(long SupplierId) { AbstractExternalDevice vysledek = null; switch (SupplierId) { case 5: vysledek = new MoxaModel(); break; default: throw new ArgumentException(nameof(SupplierId)); } return(vysledek); }