Exemplo n.º 1
0
 public ReaderManager(IRFIDGUI newgui, ITagHandler handleTagNew)
 {
     gui = newgui;
     SetDefaultReaderConfig();
     SetDefaultInventoryConfig();
     reader     = new RFIDReader(this);
     handleTags = handleTagNew;
 }
Exemplo n.º 2
0
 public ReaderManager(IRFIDGUI newgui, ITagHandler handleTagNew)
 {
     gui = newgui;
     SetDefaultReaderConfig();
     SetDefaultInventoryConfig();
     reader = new RFIDReader(this);
     handleTags = handleTagNew; 
 }
Exemplo n.º 3
0
        public ReaderManager(IRFIDGUI newgui, ITagHandler handleTagNew)
        {
            gui = newgui;
            SetDefaultReaderConfig();
            SetDefaultInventoryConfig();
            reader = new RFIDReader(this);
            handleTags = handleTagNew;

            // Initialization
            mobility_probe_round = 0;
            mobility_rssi_diff = 0;
            mobility_fading_diff = 0;

            mobility_pattern = new int[2, 50];
            tagInfo.rssi = new int[50];
            for (int ii = 0; ii < 50; ii++)
            {
                tagInfo.rssi[ii] = 0;
            }
            channel_counter = 0;
            // Load channel/rssi template information
            channelTemplate = new double[7, 50];
            rssiTemplate = new short[7, 50];
            using (StreamReader sr = new StreamReader("loss_fast_probe.dat"))
            {
                String line;
                int lineNum = 0;
                line = sr.ReadLine();
                while (line != null)
                {
                    String[] lineSplit = line.Split();
                    for (int ii = 0; ii < 50; ii++)
                    {
                        channelTemplate[lineNum, ii] = Convert.ToDouble(lineSplit[ii]);
                    }
                    lineNum += 1;
                    line = sr.ReadLine();
                }
            }
            using (StreamReader sr = new StreamReader("rssi_fast_probe.dat"))
            {
                String line;
                int lineNum = 0;
                line = sr.ReadLine();
                while (line != null)
                {
                    String[] lineSplit = line.Split();
                    for (int ii = 0; ii < 50; ii++)
                    {
                        rssiTemplate[lineNum, ii] = Convert.ToInt16(lineSplit[ii]);
                    }
                    lineNum += 1;
                    line = sr.ReadLine();
                }
            }
        }
Exemplo n.º 4
0
        public ReaderManager(IRFIDGUI newgui, ITagHandler handleTagNew)
        {
            gui = newgui;
            SetDefaultReaderConfig();
            SetDefaultInventoryConfig();
            reader     = new RFIDReader(this);
            handleTags = handleTagNew;

            // Initialization
            mobility_probe_round = 0;
            mobility_rssi_diff   = 0;
            mobility_fading_diff = 0;

            mobility_pattern = new int[2, 50];
            tagInfo.rssi     = new int[50];
            for (int ii = 0; ii < 50; ii++)
            {
                tagInfo.rssi[ii] = 0;
            }
            channel_counter = 0;
            // Load channel/rssi template information
            channelTemplate = new double[7, 50];
            rssiTemplate    = new short[7, 50];
            using (StreamReader sr = new StreamReader("loss_fast_probe.dat"))
            {
                String line;
                int    lineNum = 0;
                line = sr.ReadLine();
                while (line != null)
                {
                    String[] lineSplit = line.Split();
                    for (int ii = 0; ii < 50; ii++)
                    {
                        channelTemplate[lineNum, ii] = Convert.ToDouble(lineSplit[ii]);
                    }
                    lineNum += 1;
                    line     = sr.ReadLine();
                }
            }
            using (StreamReader sr = new StreamReader("rssi_fast_probe.dat"))
            {
                String line;
                int    lineNum = 0;
                line = sr.ReadLine();
                while (line != null)
                {
                    String[] lineSplit = line.Split();
                    for (int ii = 0; ii < 50; ii++)
                    {
                        rssiTemplate[lineNum, ii] = Convert.ToInt16(lineSplit[ii]);
                    }
                    lineNum += 1;
                    line     = sr.ReadLine();
                }
            }
        }