Example #1
0
        /// <summary>
        /// 初始化设备
        /// </summary>
        private void InitDevices()
        {
            zigBeeDeivce = new ZigBee(new ZigBeeLibrary.ComSettingModel {
                ZigbeeCom = "COM29"
            });
            zigBeeDeivce.InitSerialPort();
            zigBeeDeivce.Open();


            //adamDevices = new ADAM4150(new DigitalLibrary.ComSettingModel { DigitalQuantityCom = "COM19" });
            //adamDevices.InitSerialPort();
            //adamDevices.Open();
            //try
            //{
            //    string[] port = SerialPort.GetPortNames();
            //    if (port.Length <= 0)
            //    {
            //        return;
            //    }
            adamDevices = new Common.DevicesOperate.ADAM4150("COM4");
            adamDevices.Open();
            //}
            //catch (Exception e)
            //{
            //    return;
            //}

            ledPlayer = new LEDPlayer("COM28");

            //ledPlayer.InitSerialPort();
            ledPlayer.Open();
        }
 private void InitDevices()
 {
     adamDevices = new ADAM4150("COM4");
     adamDevices.Open();
 }