Esempio n. 1
0
        public FtdiCommunicationTests(ITestOutputHelper output)
        {
            this.output = output;
            var ftdi        = new FTDI();
            var deviceCount = 0u;

            ftdi.GetNumberOfDevices(ref deviceCount);
            var deviceArray = new FTDI.FT_DEVICE_INFO_NODE[deviceCount];

            ftdi.GetDeviceList(deviceArray);
            box = AmpsBoxFactory.CreateAmpsBox(deviceArray[0].SerialNumber);
        }
Esempio n. 2
0
        public DeviceCommandTest(ITestOutputHelper output)
        {
            this.output = output;
            serialPort  = new SerialPort("COM3", 19200 * 2, Parity.Even)
            {
                RtsEnable = true, Handshake = Handshake.XOnXOff
            };
            if (!serialPort.IsOpen)
            {
                serialPort.Open();
            }

            box = AmpsBoxFactory.CreateAmpsBox(serialPort);
        }
Esempio n. 3
0
        public DeviceCommandTest(ITestOutputHelper output)
        {
            this.output = output;
            serialPort  = new SerialPortStream("COM3", 19200 * 2, 8, Parity.Even, StopBits.One)
            {
                RtsEnable = false, Handshake = Handshake.XOn
            };
            if (!serialPort.IsOpen)
            {
                serialPort.Open();
            }

            box = AmpsBoxFactory.CreateAmpsBox(serialPort);
        }