コード例 #1
0
        public void OfflineMoxaTest()
        {
            MoxaModel moxa = new MoxaModel
            {
                Hostname = "laser",
                IpAdress = "10.226.174.111"
            };

            moxa.Connect();

            Assert.IsFalse(moxa.Status == Stav.Online);
        }
コード例 #2
0
        public void OnlineMoxaTest()
        {
            MoxaModel moxa = new MoxaModel
            {
                Hostname = "smtsklad",
                IpAdress = "10.226.174.110",
                Port     = 502
            };

            moxa.Connect();

            Assert.IsTrue(moxa.Status == Stav.Online);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        private AbstractExternalDevice ExterniZarizeniModelPodleDodavatele(long SupplierId)
        {
            AbstractExternalDevice vysledek = null;

            switch (SupplierId)
            {
            case 5:
                vysledek = new MoxaModel();
                break;

            default: throw new ArgumentException(nameof(SupplierId));
            }
            return(vysledek);
        }