Exemple #1
0
        public static Radio[] Scan()
        {
            int devs = Pal.GetNumDevices();

            if (devs == 0)
            {
                return(null);
            }

            Radio[] radios = new Radio[devs];

            for (uint i = 0; i < devs; i++)
            {
                uint model;
                uint sn;
                if (!Pal.GetDeviceInfo(i, out model, out sn))
                {
                    return(null);
                }

                Model m = Model.FLEX5000;
                if (model == 3)
                {
                    m = Model.FLEX3000;
                }

                string serial = FWCEEPROM.SerialToString(sn);

                radios[i] = new Radio(m, i, serial, true);
            }

            return(radios);
        }
        public static Radio[] Scan()
        {
            int devs = Pal.GetNumDevices();                 // get numer of radios found

            //    System.Diagnostics.Trace.WriteLine("pal=============================");

            if (devs == 0)
            {
                return(null);
            }

            Radio[] radios = new Radio[devs];

            for (uint i = 0; i < devs; i++)
            {
                uint model;
                uint sn;

                if (!Pal.GetDeviceInfo(i, out model, out sn))
                {
                    return(null);
                }

                Model m = Model.FLEX5000;
                if (model == 3)
                {
                    m = Model.FLEX3000;
                }

                string serial = FWCEEPROM.SerialToString(sn);   // radios serial#

                radios[i] = new Radio(m, i, serial, true);
            }

            return(radios);
        } // Scan()