Beispiel #1
0
        private IMessage OpenReaderByUsb()
        {
            for (var usb = MinUsbNum; usb < MaxUsbNum; usb++)
            {
                var result = HxReaderInternal.OpenReader(usb);
                if (result.IsSuccess)
                {
                    _port = usb;
                    return(result);
                }
            }

            return(HxReaderInternal.OpenReader(MaxUsbNum));
        }
Beispiel #2
0
        private IMessage OpenReaderByCom()
        {
            for (var port = MinComNum; port < MaxComNum; port++)
            {
                var result = HxReaderInternal.OpenReader(port);
                if (result.IsSuccess)
                {
                    _port = port;
                    return(result);
                }
            }

            return(HxReaderInternal.OpenReader(MaxComNum));
        }