├── .gitattributes ├── .gitignore ├── DataAnalysis ├── MATLAB │ ├── COTS │ │ ├── AntennaInfo.m │ │ ├── Point.m │ │ ├── TagInfo.m │ │ ├── batchProcessing.m │ │ ├── calculateDistance.m │ │ ├── getCircleEquation.m │ │ ├── getHyperbolaEquation.m │ │ ├── getSingleTagInfo.m │ │ ├── plotCircle.m │ │ ├── plotHyperbola.m │ │ ├── plotMultipleCircles.asv │ │ ├── plotMultipleCircles.m │ │ ├── plotMultipleHyperbolas.m │ │ ├── readBatchFile.asv │ │ ├── readBatchFile.m │ │ ├── removeOutliers.m │ │ └── sketch.png │ └── USRP │ │ ├── count_OneZero_bits.m │ │ ├── dtw.m │ │ ├── generateChirpSignal.m │ │ ├── generateGaussSignal.m │ │ ├── generateSineSignal.m │ │ ├── generateSuqareWave.m │ │ ├── hex2bin.m │ │ ├── kmeans.m │ │ ├── pseudocode.docx │ │ ├── read_complex_binary.m │ │ ├── read_epc.m │ │ └── save_signal.m └── Python │ ├── FilterDataFromExcel.py │ ├── TH_1.csv │ ├── csvconvert.py │ ├── drawRSSI.py │ ├── out_NEW.xls │ ├── timeConvert.py │ └── unicodeConvert.py ├── README.md ├── TagDetection ├── App.config ├── CsvStreamWriter.cs ├── LogHelper.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── Reader.cs ├── TagDetection.csproj ├── TagDetection.sln ├── TagInfo.cs ├── addROSpec.xml ├── lib │ ├── LLRP.Impinj.dll │ ├── LLRP.Impinj.pdb │ ├── LLRP.dll │ └── LLRP.pdb ├── log4net │ ├── log4net.dll │ ├── log4net.pdb │ └── log4net.xml ├── obj │ └── Debug │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── DocSample4.csproj.FileListAbsolute.txt │ │ ├── DocSample4.csprojResolveAssemblyReference.cache │ │ ├── DocSample4.exe │ │ ├── DocSample4.pdb │ │ ├── TagDetection.csproj.FileListAbsolute.txt │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── setReaderConfig.xml └── TagReader ├── MainWindow.png ├── SettingsWindow.png ├── TagReader.sln └── TagReader ├── AboutBox.Designer.cs ├── AboutBox.cs ├── AboutBox.resx ├── ClassDiagram1.cd ├── GlobalSuppressions.cs ├── MainWindow.Designer.cs ├── MainWindow.cs ├── MainWindow.resx ├── Program.cs ├── ProgressWindow.Designer.cs ├── ProgressWindow.cs ├── ProgressWindow.resx ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── RFIDReader ├── CsvStreamWriter.cs ├── LogHelper.cs ├── ReaderSettings.cs ├── ReaderWrapper.cs ├── TagInfos.cs ├── TagStatus.cs ├── addROSpec.xml └── setReaderConfig.xml ├── Resources ├── TagReader.ico ├── about.png ├── alarm.png ├── delete.png ├── ic_link.png ├── play.png ├── refresh.png ├── rfid.png ├── save.png ├── settings.png ├── settings_32px.ico ├── settings_32px.png └── stop.png ├── SettingsWindow.Designer.cs ├── SettingsWindow.cs ├── SettingsWindow.resx ├── TagReader.csproj ├── TagReader.csproj.DotSettings └── lib ├── LLRP.Impinj.dll ├── LLRP.dll └── log4net.dll /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/AntennaInfo.m: -------------------------------------------------------------------------------- 1 | classdef AntennaInfo 2 | properties 3 | AntennaNo = 1; 4 | Location = Point(0, 0); 5 | Distance2Tag = 0; 6 | Timestamp = []; 7 | PhaseList = []; % received phase list (in radian) 8 | RssiList = []; 9 | DopplerList = []; 10 | end % end of properties 11 | 12 | methods 13 | function info = AntennaInfo(antennaNo) 14 | info.AntennaNo = antennaNo; 15 | end 16 | 17 | function self = assignPhases(self, phases) 18 | self.PhaseList = phases; 19 | end 20 | end % end of methods 21 | end % end of classdef 22 | 23 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/Point.m: -------------------------------------------------------------------------------- 1 | classdef Point 2 | properties 3 | x = 0; 4 | y = 0; 5 | end 6 | 7 | methods 8 | function p = Point(xx, yy) 9 | p.x = xx; 10 | p.y = yy; 11 | end 12 | 13 | function p = PointObj(dot) 14 | p.x = dot.x; 15 | p.y = dot.y; 16 | end 17 | end 18 | end 19 | 20 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/TagInfo.m: -------------------------------------------------------------------------------- 1 | classdef TagInfo 2 | properties 3 | EPC = ''; % string 4 | Frequency = 924.375; % default, range [920.625 : 0.25 : 924.375] MHz 5 | Location = Point(0, 0); 6 | Power = 32.5; % [10 : 0.25 : 32.5] dbm 7 | 8 | Antenna = [AntennaInfo(1), AntennaInfo(2), AntennaInfo(3), AntennaInfo(4)]; 9 | end 10 | 11 | methods 12 | function tag = rawData(epc, location) 13 | tag.EPC = epc; 14 | tag.Location = PointObj(location); 15 | end 16 | 17 | function tag = TagInfo(epc, frequency, power, antennaNo, phase_list) 18 | tag.EPC = epc; 19 | tag.Frequency = frequency; 20 | tag.Power = power; 21 | 22 | tag.Antenna(antennaNo).PhaseList = phase_list; 23 | end % end of function @TagInfo 24 | end % end of methods 25 | end % end of classdef -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/batchProcessing.m: -------------------------------------------------------------------------------- 1 | clc; 2 | clear all; 3 | close all; 4 | 5 | %% batch process all files in @fpath, get the mean phase value. 6 | filePath = 'C:\Users\MarinYoung\OneDrive\Documents\DATA\20160229\'; 7 | filePath = [filePath, '*.csv']; 8 | files = dir(filePath); 9 | 10 | sheet = 1; 11 | xlRange = 'A2:J10000'; 12 | EPC = 'CCCC 0005'; % 'BBBB 0002' 'CCCC 0005' 'DDDD 0003' 13 | 14 | for i = 1 : 1 : length(files) 15 | fileName = files(i).name; 16 | fileName = [filePath(1:end-5), fileName]; 17 | [ndata, alldata] = xlsread(fileName, sheet, xlRange); 18 | phase_list = []; 19 | for j = 1 : 1 : length(ndata) 20 | epc = char(alldata(j, 1)); 21 | antenna = ndata(j, 2); 22 | power = ndata(j, 3); 23 | freq = ndata(j, 4); 24 | phase = ndata(j, 6); 25 | 26 | if antenna == 1 && strcmp(epc, EPC) == 1 && freq == 924.375 %&& power == 32.5 27 | phase_list(end+1) = phase; 28 | end 29 | end 30 | phase_list = removeOutliers(phase_list); 31 | phase = mean(phase_list); 32 | stdev = std(phase_list); 33 | disp(fileName); 34 | fprintf('EPC: %s\tMEAN: %8.5f\t%8.5f\n', EPC, phase, stdev); 35 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/calculateDistance.m: -------------------------------------------------------------------------------- 1 | function dist = calculateDistance( A, B ) 2 | dist = sqrt((A.x - B.x)^2 + (A.y - B.y)^2); 3 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/getCircleEquation.m: -------------------------------------------------------------------------------- 1 | %% get circle equation 2 | function eqn = getCircleEquation(delta_f, phase_diff, x0, y0) 3 | delta_d = 100 * (299792458*phase_diff/(4*pi*delta_f*1e6)); % UNIT: cm 4 | syms x y; 5 | eqn = (x-x0)^2 + (y-y0)^2 - delta_d^2; 6 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/getHyperbolaEquation.m: -------------------------------------------------------------------------------- 1 | %% get hyperbola equation accroding to measured phases. 2 | function eqn = getHyperbolaEquation(phaseA, phaseB, freq, PointA, PointB, closer2left) 3 | wave_length = 299792458 / (freq*1e6); % UNIT: meter 4 | dist = calculateDistance(PointA, PointB);% UNIT: cm 5 | phase_diff = phaseA - phaseB; % left - right 6 | if dist < (wave_length/4)*100 % 0 < dist < lambda/4 7 | % tags apart from lambda/4. (|delta_d| pi) % pi < phase_diff < 2*pi 9 | k = -1; % antenna is closer to left antenna (@phaseA) 10 | elseif (phase_diff > -pi) % -pi < phase_diff < pi 11 | k = 0; 12 | else % -2*pi < phase_diff < -pi 13 | k = 1; % antenna is closer to right antenna (@phaseB) 14 | end 15 | elseif dist < (wave_length/2)*100 % lambda/4 < dist < lambda/2 16 | if phase_diff > 0 % 0 < phase_diff < 2*pi 17 | if closer2leftAntenna > 0 18 | k = -1; % closer to left antenna, meaning that delta_d < 0 19 | else 20 | k = 0; % closer to right antenna, delta_d > 0 21 | end 22 | else % -2*pi < phase_diff < 0 23 | if closer2leftAntenna > 0 24 | k = 0; 25 | else 26 | k = 1; 27 | end 28 | end 29 | end 30 | 31 | delta_d = 100 * (phase_diff+2*k*pi) * wave_length/(4*pi); % UNIT: cm 32 | if delta_d >= dist 33 | fprintf('a should be less than c\n'); 34 | exit(-1); 35 | end 36 | a = delta_d/2; 37 | c = dist/2; % cm 38 | squared_b = c^2 - a^2; 39 | x0 = (PointA.x + PointB.x)/2; 40 | y0 = (PointA.y + PointB.y)/2; 41 | 42 | syms x y; 43 | eqn = (x-x0)^2/(a^2) - (y-y0)^2/squared_b - 1; 44 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/getSingleTagInfo.m: -------------------------------------------------------------------------------- 1 | %% get tag position, where antenna position is known in advance 2 | 3 | filePath = 'C:\Users\MarinYoung\OneDrive\Documents\DATA\20160129\moving antenna\16thChannal\G_924375_M8'; 4 | filePath = [filePath, '.csv']; 5 | 6 | sheet = 1; 7 | xlRange = 'A2:J10000'; 8 | EPC = 'CC05'; 9 | 10 | [ndata, alldata] = xlsread(filePath, sheet, xlRange); 11 | len = length(ndata); 12 | phase_list = []; 13 | 14 | for i = 1 : 1 : len 15 | epc = char(alldata(i, 1)); 16 | antenna = ndata(i, 2); 17 | power = ndata(i, 3); 18 | freq = ndata(i, 4); 19 | phase = ndata(i, 6); % phase in radian 20 | 21 | if antenna == 1 && strcmp(epc, EPC) == 1 && freq == 924.375 %&& power == 32.5 22 | phase_list(end+1) = phase; 23 | end 24 | end 25 | 26 | phase_list = removeOutliers(phase_list); 27 | phase = mean(phase_list); 28 | stdev = std(phase_list); 29 | 30 | tag = TagInfo(epc, freq, power, antenna, phase_list); 31 | tag.Antenna(antenna).Location = Point(38, 0); 32 | tag.Location = Point(0, 300); 33 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/plotCircle.m: -------------------------------------------------------------------------------- 1 | %% plot Circle according to TagInfo. 2 | function handler = plotCircle(tag_f1, tag_f2) 3 | delta_f = tag_f1.Frequency - tag_f2.Frequency; % Hz 4 | antennaNo = 1; 5 | phase1 = mean(removeOutliers(tag_f1.Antenna(1).PhaseList)); 6 | phase2 = mean(removeOutliers(tag_f2.Antenna(1).PhaseList)); 7 | 8 | x0 = tag_f1.Antenna(antennaNo).Location.x; % cm 9 | y0 = tag_f1.Antenna(antennaNo).Location.y; 10 | 11 | eqn = getCircleEquation(delta_f, phase1-phase2, x0, y0); 12 | 13 | range = ([-200, 200, 0, 400]); 14 | handler = ezplot(eqn, range); 15 | hold on; 16 | end 17 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/plotHyperbola.m: -------------------------------------------------------------------------------- 1 | %% plot hyperbola. 2 | function handler = plotHyperbola(tag1, tag2) 3 | antennaNo = 1; 4 | if (tag1.Frequency == tag2.Frequency && tag1.Power == tag2.Power) 5 | freq = tag1.Frequency; % MHz 6 | end 7 | % radian 8 | phase1 = mean(removeOutliers(tag1.Antenna(antennaNo).PhaseList)); 9 | phase2 = mean(removeOutliers(tag2.Antenna(antennaNo).PhaseList)); 10 | % cm 11 | x0 = (tag1.Antenna(antennaNo).Location.x + tag2.Antenna(antennaNo).Location.x)/2; 12 | y0 = (tag1.Antenna(antennaNo).Location.y + tag2.Antenna(antennaNo).Location.y)/2; 13 | distance = calculateDistance(tag1.Antenna(antennaNo).Location, tag2.Antenna(antennaNo).Location); 14 | 15 | eqn = getHyperbolaEquation(phase1, phase2, freq, tag1.Location, tag2.Location); 16 | range = ([-200, 200, 0, 400]); 17 | plot(tag1.Location.x, tag1.Location.y, 'x'); 18 | plot(tag1.Antenna(antennaNo).Location.x, tag1.Antenna(antennaNo).Location.y, 'o'); 19 | plot(tag2.Antenna(antennaNo).Location.x, tag2.Antenna(antennaNo).Location.y, 'o'); 20 | handler = ezplot(eqn, range); 21 | hold on; 22 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/plotMultipleCircles.asv: -------------------------------------------------------------------------------- 1 | %% plot multiple circles 2 | 3 | phase_difference = [-0.471575609 -0.471732768 -0.472078333 -0.472611891 -0.473332806 -0.474240224 -0.475333077]; 4 | 5 | range = ([-200, 200, 0, 400]); 6 | delta_f = 3.75; % MHz 7 | dist = 6; % cm 8 | y = 300; 9 | figure; 10 | for i = 1 : 1 : length(phase_difference) 11 | x = -2 - (i-1)*dist; 12 | eqn = getCircleEquation(delta_f, phase_difference(i), x, y); 13 | handler = ezplot(eqn, range); hold on; 14 | plot(x, y, 'o'); hold on; % center of circle 15 | end 16 | plot(0, 0, 'x'); hold on; % ground truth -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/plotMultipleCircles.m: -------------------------------------------------------------------------------- 1 | %% plot multiple circles 2 | 3 | % moving antenna, theoretical data 4 | % phase_difference = [-0.471575609 -0.471732768 -0.472078333 -0.472611891 -0.473332806 -0.474240224 -0.475333077]; 5 | % measured data 6 | phase_difference = [-0.816287346 -0.735797346 -0.691207346 -0.662217346 -0.794017346 -0.874307346 -0.903857346]; 7 | 8 | range = ([-500, 500, -650, 350]); 9 | delta_f = 3.75; % MHz 10 | dist = 6; % cm 11 | y = 300; 12 | figure; 13 | for i = 1 : 1 : length(phase_difference) 14 | x = -2 - (i-1)*dist; 15 | eqn = getCircleEquation(delta_f, phase_difference(i), x, y); 16 | handler = ezplot(eqn, range); hold on; 17 | set(handler, 'color', 'r'); 18 | plot(x, y, 'o'); hold on; % center of circle 19 | end 20 | plot(0, 0, 'x'); hold on; % ground truth -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/plotMultipleHyperbolas.m: -------------------------------------------------------------------------------- 1 | %% plot multiple hyperbolas 2 | 3 | % moving tag, 16th channal, measured data 4 | %phases = [5.48827 6.01606 5.97145 5.73585 5.27782 4.93313 1.26927 0.88578 0.5309 0.41865]; 5 | % moving tag, 16th channal, theoretical data 6 | %phases = [3.18479172 3.269973484 3.401495521 3.579201123 3.80287967 4.072267875 4.387051306 4.746866185 5.15130144 5.599900969]; 7 | 8 | %% moving antenna, 16th channal, measured data 9 | phases = [1.15896 0.256436667 5.792373333 5.286075 5.799726667]; 10 | 11 | y = 0; % cm 12 | dist = 8; % cm 13 | freq = 924.375; % MHz 14 | figure; 15 | 16 | xs = []; ys = []; 17 | len = length(phases); 18 | for i = 2 : 1 : len 19 | xc = 0 + (i-1)*dist; % current 20 | xp = xc - dist; % previous 21 | x0 = (xc + xp)/2; 22 | eqn = getHyperbolaEquation(phases(i-1), phases(i), freq, x0, y, dist); 23 | % plot 24 | range = ([-200, 200, 0, 400]); 25 | handler = ezplot(eqn, range); hold on; 26 | set(handler, 'color', 'r'); 27 | plot(xc, y, 'o'); hold on; % focus point 28 | 29 | % solve nonlinear equations 30 | if i == 2; 31 | prev = eqn; 32 | continue; 33 | end 34 | % syms xx yy; 35 | % [xx, yy] = solve(prev, eqn); 36 | % prev = eqn; 37 | % 38 | % % get proper intersection (x,y) 39 | % if length(xx) ~= length(yy) 40 | % disp('calculation error!\n'); 41 | % end 42 | % for j = 1 : 1 : length(xx) 43 | % % given a known position: (-, +) 44 | % if double(yy(i)) > 0 && double(xx(i)) < x0 45 | % xs(end+1) = double(xx(1)); 46 | % ys(end+1) = double(yy(1)); 47 | % end 48 | % end 49 | 50 | end 51 | ground_truth = Point(-59, 300); 52 | plot(ground_truth.x, ground_truth.y, 'x'); hold on; % ground truth 53 | 54 | % 55 | % x = mean(xs); y = mean(ys); 56 | % fprintf('Centralized intersection:\t(%8.2f, %8.2f)\n', x, y); 57 | % fprintf('Error:\t%8.5f\n', calculateDistance(ground_truth, Point(x, y))); -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/readBatchFile.asv: -------------------------------------------------------------------------------- 1 | % close all; 2 | clear all; 3 | clc; 4 | 5 | filePath = 'C:\Users\Marin\OneDrive\Documents\DATA\20160129\moving antenna\1stChannal\'; 6 | filePath = [filePath, '*.csv']; 7 | files = dir(filePath); 8 | 9 | sheet = 1; 10 | xlRange = 'A2:J10000'; 11 | EPC = 'CC05'; 12 | tag_lists = []; 13 | 14 | for i = 1 : 1 : length(files) 15 | fileName = files(i).name; 16 | %dist = str2double(fileName(end-6:end-4)) / 100; 17 | %power = str2double(fileName(end-6:end-4)) / 10; 18 | fileName = [filePath(1:end-5), fileName]; 19 | 20 | dist = sqrt(300^2+(-38-(-30+(i-1)*6))); 21 | power = 32.5; % dbm 22 | 23 | % read single file 24 | [ndata, alldata] = xlsread(fileName, sheet, xlRange); 25 | len = length(ndata); 26 | phase_list = []; 27 | % traverse each data row 28 | for j = 1 : 1 : len 29 | epc = char(alldata(j, 1)); 30 | antennaNo = ndata(j, 2); 31 | %power = ndata(j, 3); 32 | freq = ndata(j, 4); 33 | phase_in_radian = ndata(j, 6); 34 | 35 | if antennaNo == 1 && strcmp(epc, EPC) == 1 && freq == 920.625 && power == 32.5 36 | phase_list(end+1) = phase_in_radian; 37 | end 38 | end 39 | 40 | phase_list = removeOutliers(phase_list); 41 | phase = mean(phase_list); 42 | stdev = std(phase_list); 43 | % tag = TagInfo(epc, freq, power, antennaNo, phase_list); 44 | % tag.Antenna(antennaNo).Distance2Tag = dist; 45 | % tag_lists = [tag_lists, tag]; 46 | end 47 | 48 | 49 | %e_list = []; % epc 50 | f_list = []; % frequency 51 | p_list = []; % power 52 | d_list = []; % dustabce 53 | mean_p = []; % mean value of phase list 54 | std_p = []; % standard deviation 55 | % L = []; 56 | % U = []; 57 | % ground_truth = []; 58 | % e_list = []; 59 | 60 | for i = 1 : 1 : length(tag_lists) 61 | epc = tag_lists(i).EPC; 62 | freq = tag_lists(i).Frequency; 63 | power = tag_lists(i).Power; 64 | dist = tag_lists(i).Antenna(1).Distance2Tag; 65 | 66 | m_phases = removeOutliers(tag_lists(i).Antenna(1).PhaseList); 67 | gt_phase = mod(4*pi*dist*freq*1e6/(299792458), 2*pi); 68 | error = mean(m_phases) - gt_phase; 69 | 70 | %%%%%%%%%%%%%%%%%%%%%% 71 | %e_list(end+1) = epc; 72 | f_list(end+1) = freq; 73 | p_list(end+1) = power; 74 | d_list(end+1) = dist; 75 | 76 | mean_p(end+1) = mean(m_phases); 77 | std_p(end+1) = std(m_phases); 78 | % L(end+1) = min(m_phases); 79 | % U(end+1) = max(m_phases); 80 | % ground_truth(end+1) = gt_phase; 81 | % e_list(end+1) = error; 82 | end 83 | 84 | 85 | figure; 86 | %he = plot(f_list, error_list, 'k-*'); hold on; 87 | hm = plot(d_list, mean_p, '--*'); hold on; 88 | hg = plot(d_list, ground_truth); hold on; 89 | errorbar(d_list, mean_p, mean_p - L, U - mean_p, 'Marker','none','LineStyle','none'); 90 | 91 | % title('Tag Diversity', 'FontSize', 20); 92 | xlabel('Distance', 'FontSize', 20); 93 | ylabel('Phase', 'FontSize', 20); 94 | legend([hm, hg], 'Measured Data', 'Ground Truth', 'FontSize', 20); 95 | disp('done') -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/readBatchFile.m: -------------------------------------------------------------------------------- 1 | close all; 2 | clear all; 3 | clc; 4 | 5 | % get file path 6 | filePath = 'C:\Users\MarinYoung\OneDrive\Documents\DATA\20160126\Power\'; 7 | filePath = [filePath, '*.csv']; 8 | files = dir(filePath); 9 | % data range in excel 10 | sheet = 1; 11 | xlRange = 'A2:J10000'; 12 | EPC = 'CC05'; 13 | 14 | tag_lists = []; 15 | 16 | for i = 1 : 1 : length(files) 17 | fileName = files(i).name; 18 | 19 | dist = 2.375; % m 20 | %dist = str2double(fileName(end-6:end-4)) / 100; 21 | %dist = sqrt(300^2+(-38-(-30+(i-1)*6))) / 100; 22 | 23 | power = str2double(fileName(end-6:end-4)) / 10; 24 | %power = 32.5; % dbm 25 | 26 | fileName = [filePath(1:end-5), fileName]; 27 | 28 | % read single file 29 | [ndata, alldata] = xlsread(fileName, sheet, xlRange); 30 | len = length(ndata); 31 | phase_list = []; 32 | % traverse each data row 33 | for j = 1 : 1 : len 34 | epc = char(alldata(j, 1)); 35 | antennaNo = ndata(j, 2); 36 | %power = ndata(j, 3); % dbm 37 | freq = ndata(j, 4); % MHz 38 | phase_in_radian = ndata(j, 6); % radian 39 | 40 | if strcmp(epc, EPC) == 1 && antennaNo == 1 && freq == 924.375% && power == 32.5 41 | phase_list(end+1) = phase_in_radian; 42 | end 43 | end 44 | 45 | tag = TagInfo(epc, freq, power, antennaNo, phase_list); 46 | tag.Antenna(antennaNo).Distance2Tag = dist; 47 | tag_lists = [tag_lists, tag]; 48 | end 49 | 50 | 51 | %epc_list = []; % epc 52 | f_list = []; % frequency 53 | p_list = []; % power 54 | d_list = []; % dustance 55 | mean_p = []; % mean value 56 | std_p = []; % standard deviation 57 | L = []; U = []; 58 | ground_truth = []; 59 | e_list = []; 60 | 61 | for i = 1 : 1 : length(tag_lists) 62 | epc = tag_lists(i).EPC; 63 | freq = tag_lists(i).Frequency; 64 | power = tag_lists(i).Power; 65 | dist = tag_lists(i).Antenna(1).Distance2Tag; 66 | m_phases = removeOutliers(tag_lists(i).Antenna(1).PhaseList); 67 | 68 | %%%%%%%%%%%%%%%%%%%%%% 69 | %epc_list(end+1) = epc; 70 | f_list(end+1) = freq; 71 | p_list(end+1) = power; 72 | d_list(end+1) = dist; 73 | 74 | % revised value. See BackPos. Section 7 75 | mean_p(end+1) = mod(2*pi - mean(m_phases) + pi, 2*pi); 76 | std_p(end+1) = std(m_phases); 77 | gt_phase = mod(4*pi*dist*freq*1e6/(299792458), 2*pi); 78 | error = mean(m_phases) - gt_phase; 79 | % L(end+1) = 2*pi - max(m_phases); 80 | % U(end+1) = 2*pi - min(m_phases); 81 | ground_truth(end+1) = gt_phase; 82 | e_list(end+1) = error; 83 | end 84 | 85 | 86 | figure; 87 | %he = plot(f_list, error_list, 'k-*'); hold on; 88 | hm = plot(p_list, mean_p, '--*'); hold on; 89 | hg = plot(p_list, ground_truth); hold on; 90 | %errorbar(d_list, mean_p, mean_p - L, U - mean_p, 'Marker','none','LineStyle','none'); 91 | 92 | % title('Tag Diversity', 'FontSize', 20); 93 | xlabel('Power', 'FontSize', 20); 94 | ylabel('Phase', 'FontSize', 20); 95 | legend([hm, hg], 'Measured Data', 'Ground Truth', 'FontSize', 20); 96 | disp('done') -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/removeOutliers.m: -------------------------------------------------------------------------------- 1 | %% remove outliers in data list 2 | function data_list = removeOutliers(data_list) 3 | % determine whether there's phase hop 4 | if abs(max(data_list) - min(data_list)) < 1 5 | mean_val = mean(data_list); 6 | sigma = std(data_list); 7 | outliers = abs(data_list - mean_val) > 3*sigma; 8 | data_list(outliers) = []; 9 | else 10 | [Index, C] = kmeans(data_list, 2); 11 | first_cluster = []; 12 | second_cluster = []; 13 | for i = 1 : 1 : length(Index) 14 | if Index(i) == 1 15 | first_cluster(end+1) = data_list(i); 16 | else 17 | second_cluster(end+1) = data_list(i); 18 | end 19 | end 20 | % find majority cluster 21 | if length(first_cluster) > length(second_cluster) 22 | if C(1) > C(2) % centroid 23 | second_cluster = second_cluster + pi; 24 | else 25 | second_cluster = second_cluster - pi; 26 | end 27 | else 28 | if C(1) > C(2) 29 | first_cluster = first_cluster - pi; 30 | else 31 | first_cluster = first_cluster + pi; 32 | end 33 | end 34 | data_list = [first_cluster, second_cluster]; 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/COTS/sketch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/DataAnalysis/MATLAB/COTS/sketch.png -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/count_OneZero_bits.m: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % Count the number of zero bits and one bits 3 | % in the Miller-4 coding sequence. 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | 6 | function [data_zero, data_one] = count(str) 7 | 8 | %%%%% hexdecimal to binary 9 | bits = hex2bin(str); 10 | 11 | %%%%% get the length of binary bitss 12 | const_len = length(bits); 13 | 14 | %%%%% result or output 15 | data_zero = 0; 16 | data_one = 0; 17 | 18 | 19 | for i = 1 : 1 : const_len 20 | %%%%% get previous bits 21 | if i == 1 22 | prev = 0; 23 | tmp = 0; 24 | else 25 | prev = bits(i - 1); 26 | end 27 | 28 | %%%%% get current bits 29 | curr = bits(i); 30 | 31 | if curr == '0' 32 | data_zero = data_zero + 4; 33 | if tmp == 0.5 && prev == 1 34 | tmp = 0.5 35 | else 36 | tmp = 0; 37 | end 38 | end 39 | if curr == '1' 40 | data_one = data_one + 1; 41 | data_zero = data_zero + 2; 42 | if tmp == 0.5 43 | data_zero = data_zero + 1; 44 | end 45 | tmp = 0.5 - tmp; 46 | end 47 | end 48 | 49 | end 50 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/dtw.m: -------------------------------------------------------------------------------- 1 | function [Dist,D,k,w]=dtw(t,r) 2 | %Dynamic Time Warping Algorithm 3 | %Dist is unnormalized distance between t and r 4 | %D is the accumulated distance matrix 5 | %k is the normalizing factor 6 | %w is the optimal path 7 | %t is the vector you are testing against 8 | %r is the vector you are testing 9 | [rows,N]=size(t); 10 | [rows,M]=size(r); 11 | %for n=1:N 12 | % for m=1:M 13 | % d(n,m)=(t(n)-r(m))^2; 14 | % end 15 | %end 16 | d=(repmat(t(:),1,M)-repmat(r(:)',N,1)).^2; %this replaces the nested for loops from above Thanks Georg Schmitz 17 | 18 | D=zeros(size(d)); 19 | D(1,1)=d(1,1); 20 | 21 | for n=2:N 22 | D(n,1)=d(n,1)+D(n-1,1); 23 | end 24 | for m=2:M 25 | D(1,m)=d(1,m)+D(1,m-1); 26 | end 27 | for n=2:N 28 | for m=2:M 29 | D(n,m)=d(n,m)+min([D(n-1,m),D(n-1,m-1),D(n,m-1)]); 30 | end 31 | end 32 | 33 | Dist=D(N,M); 34 | n=N; 35 | m=M; 36 | k=1; 37 | w=[]; 38 | w(1,:)=[N,M]; 39 | while ((n+m)~=2) 40 | if (n-1)==0 41 | m=m-1; 42 | elseif (m-1)==0 43 | n=n-1; 44 | else 45 | [values,number]=min([D(n-1,m),D(n,m-1),D(n-1,m-1)]); 46 | switch number 47 | case 1 48 | n=n-1; 49 | case 2 50 | m=m-1; 51 | case 3 52 | n=n-1; 53 | m=m-1; 54 | end 55 | end 56 | k=k+1; 57 | w=cat(1,w,[n,m]); 58 | end 59 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/generateChirpSignal.m: -------------------------------------------------------------------------------- 1 | % generate chirp signal 2 | 3 | t = 0:0.001:10; % 2 secs @ 1kHz sample rate 4 | fo = 100; f1 = 1e6; % Start at @fo Hz, go to @f1 Hz 5 | 6 | y = chirp(t,fo,10,f1); % Start @ DC, 7 | % cross @fo Hz at t=10 sec 8 | 9 | % plot(abs(y)) 10 | 11 | % save signal 12 | real_part = real(y); 13 | imag_part = imag(y); 14 | 15 | t = [real_part; imag_part]; 16 | 17 | fpath = '/home/marinyoung/matlab_program/plotSignal/chirp10000.out'; 18 | fid = fopen(fpath, 'wb'); 19 | fwrite(fid, t, 'float'); 20 | fclose(fid); -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/generateGaussSignal.m: -------------------------------------------------------------------------------- 1 | %clear all; 2 | %clc; 3 | close all; 4 | 5 | L = 10000; % sample length for the random signal 6 | 7 | mean = 0; % mean value 8 | std_dev = 0.4; % standard deviation 9 | 10 | % generate gaussian noise 11 | cgnoise = mean + std_dev * randn(L, 1) + 1i * std_dev * randn(L, 1); 12 | 13 | real_part = real(cgnoise); 14 | imag_part = imag(cgnoise); 15 | 16 | t = [real_part; imag_part]; 17 | 18 | fpath = '/home/marinyoung/matlab_program/plotSignal/gauss96050.out'; 19 | fid = fopen(fpath, 'wb'); 20 | fwrite(fid, t, 'float'); 21 | fclose(fid); 22 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/generateSineSignal.m: -------------------------------------------------------------------------------- 1 | clear all; 2 | %close all; 3 | clc; 4 | 5 | 6 | %% arguments setup 7 | ampl = 1000; % amplitude 8 | freq = 3; % frequency 9 | phase = 0; % phase shift 10 | 11 | t = 0 : 0.01 : 50; % sum points = (upper_bound-lower_bound) / step_length 12 | % Total cycle = (upper_bound-lower_bound) * freq 13 | 14 | %% generate complex signal 15 | sin_signal = sin(2*pi*freq*t) + 1; 16 | complex_signal = ampl*cos(2*pi*freq*t) + 1i * ampl*sin(2*pi*freq*t); 17 | 18 | s = complex_signal .* sin_signal; 19 | 20 | %% save 21 | real_part = real(s); 22 | imag_part = imag(s); 23 | xxx = [real_part; imag_part]; 24 | 25 | fpath = '/home/marinyoung/matlab_program/data/original signal/complex_sine_ampl1000.out'; 26 | fid = fopen(fpath, 'wb'); 27 | fwrite(fid, xxx, 'float'); 28 | fclose(fid); 29 | 30 | %% plot 31 | figure; 32 | plot(t, sin_signal, 'r--'); 33 | hold on; 34 | plot(abs(complex_signal), 'g-.'); 35 | hold on; 36 | plot(abs(s), 'b'); 37 | hold on; -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/generateSuqareWave.m: -------------------------------------------------------------------------------- 1 | close all; 2 | clear all; 3 | 4 | amp = 1; 5 | f = 924.38e6; 6 | DUTY = 50; % ??? 7 | 8 | t = 0 : pi / 1024 : 64 * pi / 1024; 9 | y = amp * square(2 * pi * f * t, DUTY); 10 | plot(t,y); 11 | 12 | axis([0 0.2 -1.2 1.2]) -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/hex2bin.m: -------------------------------------------------------------------------------- 1 | function res = hex2bin(hex) 2 | 3 | len = length(hex); 4 | res = ''; 5 | tmp = ''; 6 | 7 | for i = 1 : 1 : len 8 | switch hex(i) 9 | case '0' 10 | tmp = '0000'; 11 | case '1' 12 | tmp = '0001'; 13 | case '2' 14 | tmp = '0010'; 15 | case '3' 16 | tmp = '0011'; 17 | case '4' 18 | tmp = '0100'; 19 | case '5' 20 | tmp = '0101'; 21 | case '6' 22 | tmp = '0110'; 23 | case '7' 24 | tmp = '0111'; 25 | case '8' 26 | tmp = '1000'; 27 | case '9' 28 | tmp = '1001'; 29 | case 'a' 30 | tmp = '1010'; 31 | case 'A' 32 | tmp = '1010'; 33 | case 'b' 34 | tmp = '1011'; 35 | case 'B' 36 | tmp = '1011'; 37 | case 'c' 38 | tmp = '1100'; 39 | case 'C' 40 | tmp = '1100'; 41 | case 'd' 42 | tmp = '1101'; 43 | case 'D' 44 | tmp = '1101'; 45 | case 'e' 46 | tmp = '1110'; 47 | case 'E' 48 | tmp = '1110'; 49 | case 'f' 50 | tmp = '1111'; 51 | case 'F' 52 | tmp = '1111'; 53 | end 54 | res = strcat(res, tmp); 55 | end -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/pseudocode.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/DataAnalysis/MATLAB/USRP/pseudocode.docx -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/read_complex_binary.m: -------------------------------------------------------------------------------- 1 | % 2 | % Copyright 2001 Free Software Foundation, Inc. 3 | % 4 | % This file is part of GNU Radio 5 | % 6 | % GNU Radio is free software; you can redistribute it and/or modify 7 | % it under the terms of the GNU General Public License as published by 8 | % the Free Software Foundation; either version 3, or (at your option) 9 | % any later version. 10 | % 11 | % GNU Radio is distributed in the hope that it will be useful, 12 | % but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | % GNU General Public License for more details. 15 | % 16 | % You should have received a copy of the GNU General Public License 17 | % along with GNU Radio; see the file COPYING. If not, write to 18 | % the Free Software Foundation, Inc., 51 Franklin Street, 19 | % Boston, MA 02110-1301, USA. 20 | % 21 | 22 | function v = read_complex_binary (filename, count) 23 | 24 | %% usage: read_complex_binary (filename, [count]) 25 | %% 26 | %% open filename and return the contents as a column vector, 27 | %% treating them as 32 bit complex numbers 28 | %% 29 | 30 | m = nargchk (1,2,nargin); 31 | if (m) 32 | usage (m); 33 | end 34 | 35 | if (nargin < 2) 36 | count = Inf; 37 | end 38 | 39 | f = fopen (filename, 'rb'); 40 | if (f < 0) 41 | v = 0; 42 | else 43 | t = fread (f, [2, count], 'float'); 44 | fclose (f); 45 | v = t(1,:) + t(2,:)*i; 46 | [r, c] = size (v); 47 | v = reshape (v, c, r); 48 | end 49 | -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/read_epc.m: -------------------------------------------------------------------------------- 1 | dataFilePath = 'D:/RFID/groundtruth/a2'; 2 | fileNmae = ''; 3 | 4 | EPCData=[dataFilePath, '/EPC_1','.data']; 5 | fid=fopen(EPCData, 'r'); 6 | epc=fscanf(fid,'%f %f',[2,inf]); 7 | fclose(fid); 8 | epc=abs(epc(1,:)+epc(2,:)*1i); 9 | plot(epc) -------------------------------------------------------------------------------- /DataAnalysis/MATLAB/USRP/save_signal.m: -------------------------------------------------------------------------------- 1 | clc; 2 | clear all; 3 | 4 | 5 | fsavepath = '/home/marinyoung/matlab_program/data/original signal/complex_sine.out'; 6 | fsrcfile = '/home/marinyoung/matlab_program/data/original signal/complex_sine_ampl1000.out'; 7 | 8 | %% read 9 | count = 50 ^ 7; 10 | data = read_complex_binary(fsrcfile, count); 11 | 12 | %% cut 13 | % first = 4.7e4; 14 | % last = 5.3e4; 15 | % data = data(first : last); 16 | 17 | %% merge and expand 18 | len = length(data); 19 | 20 | % t = 1 : 1 : len; 21 | % zero = (1000 + t - t) + 1i; 22 | % zero = zero'; 23 | 24 | p = 0 + 0i; 25 | zero = zeros(len, 1, 'like', p); 26 | for i = 1 : 1 : length(zero) 27 | zero(i) = 1000 + 1i; 28 | end 29 | 30 | y = [zero; data]; 31 | y = [y; y; y; y; y; y; y; y]; 32 | y = [y; zero]; 33 | 34 | %% convert to binary signal 35 | real_part = real(y); 36 | imag_part = imag(y); 37 | saved_data = [real_part; imag_part]; 38 | 39 | %% save 40 | fid = fopen(fsavepath, 'wb'); 41 | fwrite(fid, saved_data, 'float'); 42 | fclose(fid); 43 | 44 | % plot to verify 45 | figure; 46 | plot(abs(y), 'b'); 47 | figure; 48 | plot(abs(saved_data), 'r'); 49 | figure; 50 | plot(abs(real_part), 'r'); 51 | plot(abs(imag_part), 'y'); 52 | 53 | 54 | -------------------------------------------------------------------------------- /DataAnalysis/Python/FilterDataFromExcel.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import xlrd # read excel 6 | import xlwt # write excel 7 | import numpy as np 8 | 9 | 10 | def readFromExcel(fpath): 11 | bk = xlrd.open_workbook(fpath) # open workbook 12 | sh = bk.sheet_by_index(0) 13 | 14 | nrows = sh.nrows 15 | data = [] 16 | age = '23' 17 | for i in range(nrows): 18 | row = sh.row_values(i) 19 | if row[3] <= age and row[2] == u'女' : 20 | data.append(row) 21 | return data 22 | 23 | 24 | def writeToExcel(data, fpath): 25 | data = np.array(data) 26 | (nrow, ncolumn) = data.shape 27 | wb = xlwt.Workbook(encoding='UTF-8') # create a new work book 28 | wsheet = wb.add_sheet('test', cell_overwrite_ok=True) # create a new sheet 29 | i, j = 0, 0 30 | for i in range(nrow): 31 | for j in range(ncolumn): 32 | wsheet.write(i, j, data[i][j]) 33 | wb.save(fpath) 34 | 35 | 36 | def main(): 37 | fpath = '/home/marinyoung/Documents/1.xls' 38 | fdst = '/home/marinyoung/Documents/2.xls' 39 | data = readFromExcel(fpath) 40 | writeToExcel(data, fdst) 41 | 42 | 43 | 44 | if __name__ == '__main__': 45 | main() 46 | -------------------------------------------------------------------------------- /DataAnalysis/Python/TH_1.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/DataAnalysis/Python/TH_1.csv -------------------------------------------------------------------------------- /DataAnalysis/Python/csvconvert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | #-*- coding: utf-8 -*- 3 | # convert .csv file into .xlsx file 4 | # code by MarinYoung at 2014.8.25 5 | 6 | import os 7 | import sys 8 | import csv 9 | import codecs 10 | import xlrd 11 | from pyExcelerator import * 12 | import numpy as np 13 | 14 | 15 | reload(sys) 16 | sys.setdefaultencoding('utf-8') 17 | 18 | 19 | def loadCsvFile(fsrc): 20 | coord = [] 21 | with open(fsrc, 'r') as f: 22 | for line in f: 23 | if line.startswith(codecs.BOM_UTF8): 24 | line = line[3:] # drop '\xef\xbb\xbf' 25 | line = line[:len(line) - 2] # drop '\r\n' 26 | info = line.split(',') 27 | del info[len(info) - 1] # delete the last '' zero string in source file 28 | coord.append(info) 29 | f.close() 30 | return coord 31 | 32 | 33 | def writeExcel(coord, fname): 34 | data = np.array(coord) 35 | (row, column) = data.shape 36 | w = Workbook() # create a new work book 37 | wsheet = w.add_sheet(fname) # create a new sheet 38 | i = 0 39 | j = 0 40 | for i in range(row): 41 | for j in range(column): 42 | tmp = data[i][j] 43 | tmp = tmp[1 : -1] # drop "" 44 | wsheet.write(i, j, tmp) 45 | 46 | w.save(fname) 47 | 48 | 49 | def main(): 50 | fpath = '/mnt/hgfs/share/Test0828/dist180/' 51 | fpath2 = '/mnt/hgfs/share/Test0828/excel/dist180/' 52 | 53 | files = os.listdir(fpath) 54 | for filename in files: 55 | portion = os.path.splitext(filename) 56 | fdst = '' 57 | if portion[1] == '.csv': 58 | print 'Converting %s into Excel...' % filename 59 | fsrc = fpath + filename 60 | data = loadCsvFile(fsrc) 61 | 62 | fname = portion[0] + '.xls' 63 | fdst = fpath2 + fname 64 | writeExcel(data, fdst) 65 | 66 | 67 | if __name__ == '__main__': 68 | main() 69 | 70 | 71 | -------------------------------------------------------------------------------- /DataAnalysis/Python/drawRSSI.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/env python 2 | # -*- Coding:utf-8 -*- 3 | 4 | # draw the RSSI with time goes on 5 | # Code By MarinYoung@163.com 6 | # Last Modified: 2015/4/9 7 | 8 | # csv FORMAT: EPCValue,TimeStamp,RunNum,RSSI,Reader,Frequency,Power,Antenna 9 | 10 | import sys 11 | import os 12 | import csv 13 | # import xlrd 14 | import codecs 15 | import numpy as np 16 | import matplotlib.pyplot as plt 17 | import timeConvert 18 | 19 | class Packet(object): 20 | def __init__(self, EPC, TimeStamp, Antenna, Phase): 21 | self.EPC = EPC 22 | self.TimeStamp = TimeStamp # value 23 | self.Antenna = Antenna 24 | # self.RSSI = RSSI # value 25 | self.Phase = Phase # value 26 | def __eq__(self, other): 27 | return id(self) == id(other) 28 | def __ne__(self, other): 29 | if self.EPC != other.EPC or self.Antenna != other.Antenna: 30 | return True 31 | return False 32 | 33 | 34 | class Pixel(object): 35 | def __init__(self, x, y): 36 | self.x = x # x = [TimeStamp] 37 | self.y = y # y = [...] 38 | 39 | 40 | def loadCsvFile(fpath): 41 | data = {} 42 | # data = {EPC1: {Antenna 1: ([TimeStamp], [Phase]), 43 | # Antenna 2: ([TimeStamp), [Phase]) }, 44 | # EPC2: {Antenna 1: ([TimeStamp], [Phase]), 45 | # Antenna 2: ([TimeStamp], [Phase]) }, 46 | # ...... } 47 | f = open(fpath, 'r') 48 | i = 0 49 | for line in f: 50 | i += 1 51 | if i <= 1: 52 | continue 53 | 54 | if line.startswith(codecs.BOM_UTF8): 55 | line = line[3:] # drop '\xef\xbb\xbf' 56 | line = line[:len(line) - 2] # drop '\r\n' 57 | info = line.split(',') 58 | if i == 2: 59 | ground_truth = int(info[1][1:-1]) # timestamp ground truth 60 | epc = str(info[0])[1:-1] # get the last 4 bit to represent EPC 61 | packet = Packet(epc[-4:], (int(info[1][1:-1]) - ground_truth), info[2], float(info[7][1:-1]) ) 62 | 63 | # split data and save in the dictionary 64 | if packet.EPC in data: # add into dict 65 | if packet.Antenna in data[packet.EPC]: 66 | data[packet.EPC][packet.Antenna].x.append(packet.TimeStamp) 67 | data[packet.EPC][packet.Antenna].y.append(packet.Phase) 68 | else: # create new pixel object 69 | x, y = [], [] 70 | x.append(packet.TimeStamp) 71 | y.append(packet.Phase) 72 | pixel = Pixel(x, y) 73 | data[packet.EPC][packet.Antenna] = pixel 74 | else: # create new Antenna dict 75 | x, y = [], [] 76 | x.append(packet.TimeStamp) 77 | y.append(packet.Phase) 78 | pixel = Pixel(x, y) # create new pixel object 79 | struct_pixel = {} 80 | struct_pixel.setdefault(packet.Antenna, pixel) # according to the antenna number 81 | data[packet.EPC] = struct_pixel # according to the EPC 82 | f.close() 83 | return data 84 | 85 | 86 | 87 | def save(data, fpath): 88 | out = open(fpath, 'w') 89 | for epc in data: 90 | out.write('EPC' + '\t' + epc + '\n') 91 | for antenna in data[epc]: 92 | out.write('Antenna' + '\t' + antenna) 93 | out.write('\n') 94 | for x in data[epc][antenna].x: 95 | out.write(str(x) + '\t') 96 | out.write('\n') 97 | for y in data[epc][antenna].y: 98 | out.write(str(y) + '\t') 99 | out.write('\n') 100 | out.write('\n') 101 | out.close() 102 | 103 | 104 | 105 | def plotline(data, epc, antenna, COLOR, STYLE, MARKER): 106 | x = data[epc][antenna].x 107 | y = data[epc][antenna].y 108 | LABEL = epc + '-' + antenna 109 | plt.plot(x, y, color=COLOR, linewidth=1, linestyle=STYLE, marker=MARKER, label=LABEL) 110 | 111 | 112 | 113 | def plotEachRSSI(data, filename, fpath): 114 | for epc in data: 115 | print '\tploting... %s' % epc 116 | plt.clf() 117 | plt.title(filename + '----' + epc) 118 | for antenna in data[epc]: 119 | if antenna == '1': 120 | plotline(data, epc, antenna, 'r', '-', 'o') 121 | else: # antenna == '2' 122 | plotline(data, epc, antenna, 'b', '-', 'x') 123 | 124 | plt.xlabel(u'TimeStamp') 125 | plt.ylabel(u'Phase') 126 | plt.legend(loc='lower right') 127 | fdstpath = fpath + epc + '.png' 128 | plt.savefig(fdstpath, format='png') 129 | print '\tsaving...\t %s' % fdstpath 130 | print '\tcomplete!' 131 | 132 | 133 | 134 | def main(): 135 | fpath = "/media/marinyoung/OS/Users/MY/Desktop/" 136 | fdstpath = "/home/marinyoung/Documents/figure/" 137 | 138 | tag = {'A1':'42z0', 'A2':'27b0', 'A3':'46fe', 'A4':'27ae', 'A5':'53a0',\ 139 | 'B1':'3ac5', 'B2':'0004', 'B3':'4029', 'B4':'36d4', 'B5':'0007',\ 140 | 'C1':'4f5d', 'C2':'539d', 'C3':'3acb', 'C4':'32f0', 'C5':'4f60',\ 141 | 'D1':'36d1', 'D2':'57e5', 'D3':'2416', 'D4':'2f1b', 'D5':'4700'} 142 | 143 | files = os.listdir(fpath) 144 | for filename in files: 145 | portion = os.path.splitext(filename) 146 | fdst = '' 147 | if portion[1] == '.csv': 148 | fsrc = fpath + filename 149 | data = loadCsvFile(fsrc) 150 | 151 | fdst = fpath + portion[0] + '.xls' 152 | print 'saving...\t %s' % fdst 153 | save(data, fdst) 154 | 155 | print 'ploting FILE %s...' % filename 156 | fdst = fdstpath + portion[0] 157 | if not os.path.exists(fdst): 158 | os.mkdir(fdstpath + portion[0]) 159 | plotEachRSSI(data, portion[0], fdst) 160 | 161 | print 'Done!' 162 | 163 | 164 | 165 | 166 | if __name__ == '__main__': 167 | main() 168 | -------------------------------------------------------------------------------- /DataAnalysis/Python/timeConvert.py: -------------------------------------------------------------------------------- 1 | # !/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | 4 | import time 5 | import datetime 6 | 7 | def date2timestamp(year, month, day, hour, minute, second): 8 | dateC = datetime.datetime(year, month, day, hour, minute, second) 9 | timestamp = time.mktime(dateC.timestamp()) 10 | return timestamp 11 | 12 | 13 | def timestamp2str(timestamp): 14 | ltime = time.localtime(timestamp) 15 | timeStr = time.strftime('%Y-%m-%d %H:%M:%S', ltime) 16 | return timeStr 17 | -------------------------------------------------------------------------------- /DataAnalysis/Python/unicodeConvert.py: -------------------------------------------------------------------------------- 1 | import csv, sys 2 | """ 3 | This is very import. 4 | for utf-16le code will bring following questions: 5 | Line contains NULL byte in CSV reader 6 | see "python CSV error: line contains NULL byte" 7 | and related questions on stackoverflow.com 8 | The source code from "Converting utf-16 -> utf-8 AND remove BOM" 9 | on stackoverflow.com 10 | """ 11 | with open('StatusData.csv', 'rb') as src_file: 12 | with open('dstStatusData.csv', 'w+b') as dst_file: 13 | contents = src_file.read() 14 | dst_file.write(contents.decode('utf-16le').encode('utf-8')) 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TagDetection 2 | 3 | This is a simple reader program that enables a commercial off-the-shelf (**COTS**) reader (Impinj SpeedWay R220, R420, etc.) to get **multiple** tags' infos (Received Signal Strength (RSS), Phase, Doppler Shift, etc.) with **multiple antennas** (up to 4) in real time. 4 | 5 | The results are logged into a **csv** file, you can personalize the reader parameters by changing the **source code**. 6 | 7 | **[Developing...]** 8 | 9 | # TagReader 10 | The GUI Version of TagDetection. 11 | 12 | **[Developing...]** 13 | 14 | Result: 15 | ![MainWindow][1] 16 | ![SettingsWindow][2] 17 | 18 | # DataAnalysis 19 | This project was used to localize the position of antenna according its accumulated phases. For more details, please read the following publications. 20 | * Wang J, Adib F, Knepper R, et al. **Rf-compass: robot object manipulation using rfids**[C]//Proceedings of the 19th annual international conference on Mobile computing & networking. ACM, 2013: 3-14. http://people.csail.mit.edu/rak/www/sites/default/files/pubs/WanEtal13.pdf 21 | * Liu T, Yang L, Lin Q, et al. **Anchor-free backscatter positioning for rfid tags with high accuracy**[C]//INFOCOM, 2014 Proceedings IEEE. IEEE, 2014: 379-387. http://netlab.csu.edu.cn/infocom2014/papers/1569805925.pdf 22 | * Han J, Qian C, Wang X, et al. **Twins: Device-free object tracking using passive tags**[C]//INFOCOM, 2014 Proceedings IEEE. IEEE, 2014: 469-476. http://netlab.csu.edu.cn/infocom2014/papers/1569799611.pdf 23 | 24 | 25 | Result: 26 | ![Statistical Result][3] 27 | 28 | 29 | [1]: https://github.com/MarinYoung4596/RFID-READER/blob/master/TagReader/MainWindow.png 30 | [2]: https://github.com/MarinYoung4596/RFID-READER/blob/master/TagReader/SettingsWindow.png 31 | [3]: https://github.com/MarinYoung4596/RFID-READER/blob/master/DataAnalysis/MATLAB/COTS/sketch.png -------------------------------------------------------------------------------- /TagDetection/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /TagDetection/CsvStreamWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | using System.Collections; 8 | using System.IO; 9 | using System.Data; 10 | 11 | namespace SimpleLLRPSample 12 | { 13 | #region 类说明信息 14 | /// 15 | ///
16 | ///
写CSV文件类,首先给CSV文件赋值,最后通过Save方法进行保存操作
17 | ///
18 | ///
    19 | ///
20 | ///
21 | ///
22 | /// yangzhihong 23 | /// 2006/01/16 24 | /// 25 | /// 1.0 26 | ///
27 | #endregion 28 | public class CsvStreamWriter 29 | { 30 | private ArrayList rowAL; //行链表,CSV文件的每一行就是一个链 31 | private string fileName; //文件名 32 | private Encoding encoding; //编码 33 | 34 | public CsvStreamWriter() 35 | { 36 | this.rowAL = new ArrayList(); 37 | this.fileName = ""; 38 | this.encoding = Encoding.Default; 39 | } 40 | 41 | /// 42 | /// 43 | /// 44 | /// 文件名,包括文件路径 45 | public CsvStreamWriter(string fileName) 46 | { 47 | this.rowAL = new ArrayList(); 48 | this.fileName = fileName; 49 | this.encoding = Encoding.Default; 50 | } 51 | 52 | /// 53 | /// 54 | /// 55 | /// 文件名,包括文件路径 56 | /// 文件编码 57 | public CsvStreamWriter(string fileName, Encoding encoding) 58 | { 59 | this.rowAL = new ArrayList(); 60 | this.fileName = fileName; 61 | this.encoding = encoding; 62 | } 63 | 64 | /// 65 | /// row:行,row = 1代表第一行 66 | /// col:列,col = 1代表第一列 67 | /// 68 | public string this[int row, int col] 69 | { 70 | set 71 | { 72 | //对行进行判断 73 | if (row <= 0) 74 | { 75 | throw new Exception("行数不能小于0"); 76 | } 77 | else if (row > this.rowAL.Count) //如果当前列链的行数不够,要补齐 78 | { 79 | for (int i = this.rowAL.Count + 1; i <= row; i++) 80 | { 81 | this.rowAL.Add(new ArrayList()); 82 | } 83 | } 84 | else 85 | { 86 | } 87 | //对列进行判断 88 | if (col <= 0) 89 | { 90 | throw new Exception("列数不能小于0"); 91 | } 92 | else 93 | { 94 | ArrayList colTempAL = (ArrayList)this.rowAL[row - 1]; 95 | 96 | //扩大长度 97 | if (col > colTempAL.Count) 98 | { 99 | for (int i = colTempAL.Count; i <= col; i++) 100 | { 101 | colTempAL.Add(""); 102 | } 103 | } 104 | this.rowAL[row - 1] = colTempAL; 105 | } 106 | //赋值 107 | ArrayList colAL = (ArrayList)this.rowAL[row - 1]; 108 | 109 | colAL[col - 1] = value; 110 | this.rowAL[row - 1] = colAL; 111 | } 112 | } 113 | 114 | 115 | /// 116 | /// 文件名,包括文件路径 117 | /// 118 | public string FileName 119 | { 120 | set 121 | { 122 | this.fileName = value; 123 | } 124 | } 125 | 126 | /// 127 | /// 文件编码 128 | /// 129 | 130 | public Encoding FileEncoding 131 | { 132 | set 133 | { 134 | this.encoding = value; 135 | } 136 | } 137 | 138 | /// 139 | /// 获取当前最大行 140 | /// 141 | public int CurMaxRow 142 | { 143 | get 144 | { 145 | return this.rowAL.Count; 146 | } 147 | } 148 | 149 | /// 150 | /// 获取最大列 151 | /// 152 | public int CurMaxCol 153 | { 154 | get 155 | { 156 | int maxCol; 157 | 158 | maxCol = 0; 159 | for (int i = 0; i < this.rowAL.Count; i++) 160 | { 161 | ArrayList colAL = (ArrayList)this.rowAL[i]; 162 | 163 | maxCol = (maxCol > colAL.Count) ? maxCol : colAL.Count; 164 | } 165 | 166 | return maxCol; 167 | } 168 | } 169 | 170 | /// 171 | /// 添加表数据到CSV文件中 172 | /// 173 | /// 表数据 174 | /// 从第几列开始,beginCol = 1代表第一列 175 | public void AddData(DataTable dataDT, int beginCol) 176 | { 177 | if (dataDT == null) 178 | { 179 | throw new Exception("需要添加的表数据为空"); 180 | } 181 | int curMaxRow; 182 | 183 | curMaxRow = this.rowAL.Count; 184 | for (int i = 0; i < dataDT.Rows.Count; i++) 185 | { 186 | for (int j = 0; j < dataDT.Columns.Count; j++) 187 | { 188 | this[curMaxRow + i + 1, beginCol + j] = dataDT.Rows[i][j].ToString(); 189 | } 190 | } 191 | } 192 | 193 | /// 194 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 195 | /// 196 | public void Save() 197 | { 198 | //对数据的有效性进行判断 199 | if (this.fileName == null) 200 | { 201 | throw new Exception("缺少文件名"); 202 | } 203 | else if (File.Exists(this.fileName)) 204 | { 205 | File.Delete(this.fileName); 206 | } 207 | if (this.encoding == null) 208 | { 209 | this.encoding = Encoding.Default; 210 | } 211 | System.IO.StreamWriter sw = new StreamWriter(this.fileName, false, this.encoding); 212 | 213 | for (int i = 0; i < this.rowAL.Count; i++) 214 | { 215 | sw.WriteLine(ConvertToSaveLine((ArrayList)this.rowAL[i])); 216 | } 217 | 218 | sw.Close(); 219 | } 220 | 221 | /// 222 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 223 | /// 224 | /// 文件名,包括文件路径 225 | public void Save(string fileName) 226 | { 227 | this.fileName = fileName; 228 | Save(); 229 | } 230 | 231 | /// 232 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 233 | /// 234 | /// 文件名,包括文件路径 235 | /// 文件编码 236 | public void Save(string fileName, Encoding encoding) 237 | { 238 | this.fileName = fileName; 239 | this.encoding = encoding; 240 | Save(); 241 | } 242 | 243 | 244 | /// 245 | /// 转换成保存行 246 | /// 247 | /// 一行 248 | /// 249 | private string ConvertToSaveLine(ArrayList colAL) 250 | { 251 | string saveLine; 252 | 253 | saveLine = ""; 254 | for (int i = 0; i < colAL.Count; i++) 255 | { 256 | saveLine += ConvertToSaveCell(colAL[i].ToString()); 257 | //格子间以逗号分割 258 | if (i < colAL.Count - 1) 259 | { 260 | saveLine += ","; 261 | } 262 | } 263 | return saveLine; 264 | } 265 | 266 | /// 267 | /// 字符串转换成CSV中的格子 268 | /// 双引号转换成两个双引号,然后首尾各加一个双引号 269 | /// 这样就不需要考虑逗号及换行的问题 270 | /// 271 | /// 格子内容 272 | /// 273 | private string ConvertToSaveCell(string cell) 274 | { 275 | //cell = cell.Replace("/"" , "/"/""); 276 | 277 | //return "/"" + cell + "/""; 278 | 279 | cell = cell.Replace(@"""", @""""""); 280 | return @"""" + cell + @""""; 281 | 282 | } 283 | } 284 | } -------------------------------------------------------------------------------- /TagDetection/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | [assembly: log4net.Config.XmlConfigurator(Watch = true)] 6 | namespace SimpleLLRPSample 7 | { 8 | public class LogHelper 9 | { 10 | /// 11 | /// 输出日志到Log4Net 12 | /// 13 | /// 14 | /// 15 | #region static void WriteLog(Type t, Exception ex) 16 | public static void WriteLog(Type t, Exception ex) 17 | { 18 | log4net.ILog log = log4net.LogManager.GetLogger(t); 19 | log.Error("Error", ex); 20 | } 21 | #endregion 22 | 23 | 24 | /// 25 | /// 输出日志到Log4Net 26 | /// 27 | /// 28 | /// 29 | #region static void WriteLog(Type t, string msg) 30 | public static void WriteLog(Type t, string msg) 31 | { 32 | log4net.ILog log = log4net.LogManager.GetLogger(t); 33 | log.Error(msg); 34 | } 35 | #endregion 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /TagDetection/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DocSample4")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("IMPINJ")] 12 | [assembly: AssemblyProduct("DocSample4")] 13 | [assembly: AssemblyCopyright("Copyright © IMPINJ 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bb6199e2-3663-43c3-8b72-4b7d04b9c6c9")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | 33 | [assembly: AssemblyVersion("10.20.0.240")] 34 | [assembly: AssemblyFileVersion("10.20.0.240")] 35 | 36 | -------------------------------------------------------------------------------- /TagDetection/Reader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | 8 | using SimpleLLRPSample; 9 | 10 | // ReSharper disable once CheckNamespace 11 | namespace SimpleLLRPSample 12 | { 13 | public class Reader 14 | { 15 | public class ReaderParameters 16 | { 17 | public double TransmitPower { get; set; } 18 | public ushort ModeIndex { get; set; } 19 | public ushort TagPopulation { get; set; } 20 | public ushort TagTransitTime { get; set; } 21 | public bool[] AntennaId { get; set; } 22 | public ushort ReaderSensitivity { get; set; } 23 | public ushort ChannelIndex { get; set; } 24 | public ushort HopTableIndex { get; set; } 25 | public ushort PeriodicTriggerValue { get; set; } 26 | 27 | 28 | public ReaderParameters() 29 | { 30 | TransmitPower = 32.5; // dbm 31 | ModeIndex = 2; 32 | TagPopulation = 1; 33 | TagTransitTime = 0; 34 | AntennaId = new bool[] { true, false, false, false }; // Support Multiple Antennas. R420, R220 35 | ReaderSensitivity = 1; 36 | ChannelIndex = 1; 37 | HopTableIndex = 1; 38 | PeriodicTriggerValue = 0; 39 | } // end ReaderParameters constructor 40 | 41 | } // end ReaderParameters 42 | } // end Reader 43 | } // end namespace 44 | -------------------------------------------------------------------------------- /TagDetection/TagDetection.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {3A3542D7-6F9C-4F9C-96F5-5542B6050430} 9 | Exe 10 | Properties 11 | DocSample4 12 | DocSample4 13 | v4.5.1 14 | 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | pdbonly 33 | true 34 | bin\Release\ 35 | TRACE 36 | prompt 37 | 4 38 | false 39 | 40 | 41 | 42 | 43 | 44 | False 45 | ..\Debug\LLRP.dll 46 | 47 | 48 | False 49 | ..\Debug\LLRP.Impinj.dll 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Designer 75 | 76 | 77 | Designer 78 | 79 | 80 | 81 | 82 | False 83 | ..\LLRP.dll 84 | 85 | 86 | False 87 | ..\LLRP.Impinj.dll 88 | 89 | 90 | log4net\log4net.dll 91 | 92 | 93 | 94 | 95 | Designer 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /TagDetection/TagDetection.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagDetection", "TagDetection.csproj", "{3A3542D7-6F9C-4F9C-96F5-5542B6050430}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {3A3542D7-6F9C-4F9C-96F5-5542B6050430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {3A3542D7-6F9C-4F9C-96F5-5542B6050430}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {3A3542D7-6F9C-4F9C-96F5-5542B6050430}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {3A3542D7-6F9C-4F9C-96F5-5542B6050430}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /TagDetection/TagInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | 8 | using SimpleLLRPSample; 9 | 10 | namespace SimpleLLRPSample 11 | { 12 | class TagInfo 13 | { 14 | private string EPC; 15 | 16 | public string _EPC 17 | { 18 | get { return EPC; } 19 | set { EPC = value; } 20 | } 21 | 22 | 23 | private string timeStamp; 24 | 25 | public string TimeStamp 26 | { 27 | get { return timeStamp; } 28 | set { timeStamp = value; } 29 | } 30 | 31 | 32 | private ushort antenna; 33 | 34 | public ushort Antenna 35 | { 36 | get { return antenna; } 37 | set { antenna = value; } 38 | } 39 | 40 | 41 | private float txPower; 42 | 43 | public float TxPower 44 | { 45 | get { return txPower; } 46 | set { txPower = value; } 47 | } 48 | 49 | 50 | private ushort channelIndex; 51 | 52 | public ushort ChannelIndex 53 | { 54 | get { return channelIndex; } 55 | set { channelIndex = value; } 56 | } 57 | 58 | 59 | private double frequency; 60 | 61 | public double Frequency 62 | { 63 | get { return frequency; } 64 | set { frequency = value; } 65 | } 66 | 67 | 68 | private int rssi; 69 | 70 | public int Rssi 71 | { 72 | get { return rssi; } 73 | set { rssi = value; } 74 | } 75 | 76 | 77 | private double phaseInRadian; 78 | 79 | public double PhaseInRadian 80 | { 81 | get { return phaseInRadian; } 82 | set { phaseInRadian = value; } 83 | } 84 | 85 | 86 | private double phaseInDegree; 87 | 88 | public double PhaseInDegree 89 | { 90 | get { return phaseInDegree; } 91 | set { phaseInDegree = value; } 92 | } 93 | 94 | 95 | private int dopplerShift; 96 | 97 | public int DopplerShift 98 | { 99 | get { return dopplerShift; } 100 | set { dopplerShift = value; } 101 | } 102 | 103 | 104 | private double velocity; 105 | 106 | public double Velocity 107 | { 108 | get { return velocity; } 109 | set { velocity = value; } 110 | } 111 | 112 | 113 | // constructor 114 | public TagInfo( 115 | string _EPC, 116 | string _TimeStamp, 117 | ushort _Antenna, 118 | ushort _ChannelIndex, 119 | int _RSSI, 120 | int _RawPhase, 121 | int _DopperShift, 122 | double _Velocity) 123 | { 124 | EPC = _EPC; 125 | timeStamp = _TimeStamp; 126 | antenna = _Antenna; 127 | channelIndex = _ChannelIndex; 128 | frequency = 920.63 + (_ChannelIndex - 1) * 0.25; 129 | rssi = _RSSI; 130 | phaseInDegree = _RawPhase * Program.Convert2Degree; 131 | phaseInRadian = _RawPhase * Program.Convert2Radian; 132 | dopplerShift = _DopperShift; 133 | velocity = _Velocity; 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /TagDetection/addROSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 1111 11 | 0 12 | Enabled 13 | 14 | 15 | Null 16 | 17 | 18 | Null 19 | 0 20 | 21 | 22 | 23 | 1 24 | 25 | Null 26 | 0 27 | 28 | 29 | 1234 30 | EPCGlobalClass1Gen2 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /TagDetection/lib/LLRP.Impinj.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/lib/LLRP.Impinj.dll -------------------------------------------------------------------------------- /TagDetection/lib/LLRP.Impinj.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/lib/LLRP.Impinj.pdb -------------------------------------------------------------------------------- /TagDetection/lib/LLRP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/lib/LLRP.dll -------------------------------------------------------------------------------- /TagDetection/lib/LLRP.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/lib/LLRP.pdb -------------------------------------------------------------------------------- /TagDetection/log4net/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/log4net/log4net.dll -------------------------------------------------------------------------------- /TagDetection/log4net/log4net.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/log4net/log4net.pdb -------------------------------------------------------------------------------- /TagDetection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /TagDetection/obj/Debug/DocSample4.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.exe 2 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.pdb 3 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.dll 4 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.Impinj.dll 5 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.pdb 6 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.Impinj.pdb 7 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\obj\Debug\DocSample4.exe 8 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\obj\Debug\DocSample4.pdb 9 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\obj\Debug\DocSample4.csprojResolveAssemblyReference.cache 10 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.exe.config 11 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.dll 12 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.pdb 13 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.xml 14 | -------------------------------------------------------------------------------- /TagDetection/obj/Debug/DocSample4.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/DocSample4.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /TagDetection/obj/Debug/DocSample4.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/DocSample4.exe -------------------------------------------------------------------------------- /TagDetection/obj/Debug/DocSample4.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/DocSample4.pdb -------------------------------------------------------------------------------- /TagDetection/obj/Debug/TagDetection.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.exe.config 2 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.exe 3 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\DocSample4.pdb 4 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.dll 5 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.Impinj.dll 6 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.dll 7 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.pdb 8 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\LLRP.Impinj.pdb 9 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.pdb 10 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\bin\Debug\log4net.xml 11 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\obj\Debug\DocSample4.exe 12 | C:\Users\MY\Desktop\LTK_.NET_10_20_0\libltknet\DocSample4\obj\Debug\DocSample4.pdb 13 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\DocSample4.exe.config 14 | C:\Users\MY\Documents\RFID READER\TagDetection\obj\Debug\DocSample4.exe 15 | C:\Users\MY\Documents\RFID READER\TagDetection\obj\Debug\DocSample4.pdb 16 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\DocSample4.exe 17 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\DocSample4.pdb 18 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\log4net.dll 19 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\log4net.pdb 20 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\log4net.xml 21 | C:\Users\MY\Documents\RFID READER\TagDetection\obj\Debug\TagDetection.csprojResolveAssemblyReference.cache 22 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.exe.config 23 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\obj\Debug\DocSample4.exe 24 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\obj\Debug\DocSample4.pdb 25 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.exe 26 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.pdb 27 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.dll 28 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.Impinj.dll 29 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\log4net.dll 30 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.pdb 31 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.Impinj.pdb 32 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\log4net.pdb 33 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\bin\Debug\log4net.xml 34 | C:\Users\MarinYoung\Documents\RFID-READER\TagDetection\obj\Debug\TagDetection.csprojResolveAssemblyReference.cache 35 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\LLRP.dll 36 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\LLRP.Impinj.dll 37 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\LLRP.pdb 38 | C:\Users\MY\Documents\RFID READER\TagDetection\bin\Debug\LLRP.Impinj.pdb 39 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.exe.config 40 | C:\Users\Marin\Documents\RFID-READER\TagDetection\obj\Debug\DocSample4.exe 41 | C:\Users\Marin\Documents\RFID-READER\TagDetection\obj\Debug\DocSample4.pdb 42 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.exe 43 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\DocSample4.pdb 44 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.dll 45 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.Impinj.dll 46 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\log4net.dll 47 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.pdb 48 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\LLRP.Impinj.pdb 49 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\log4net.pdb 50 | C:\Users\Marin\Documents\RFID-READER\TagDetection\bin\Debug\log4net.xml 51 | C:\Users\Marin\Documents\RFID-READER\TagDetection\obj\Debug\TagDetection.csprojResolveAssemblyReference.cache 52 | -------------------------------------------------------------------------------- /TagDetection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /TagDetection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /TagDetection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagDetection/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /TagDetection/setReaderConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | true 10 | 11 | 0 12 | 13 | false 14 | 15 | 16 | 1000 17 | 0 18 | 19 | 20 | 21 | 2 22 | 32 23 | 0 24 | 25 | 26 | 27 | Dual_Target 28 | 29 | 30 | Disabled 31 | 10000 32 | 200 33 | 34 | 35 | 36 | 37 | 38 | Upon_N_Tags_Or_End_Of_ROSpec 39 | 1 40 | 41 | 42 | 44 | false 45 | false 46 | false 47 | true 48 | true 49 | true 50 | true 51 | true 52 | false 53 | false 54 | 55 | false 56 | false 57 | 58 | 59 | 60 | 61 | Enabled 62 | 63 | 64 | Enabled 65 | 66 | 67 | Enabled 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /TagReader/MainWindow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/MainWindow.png -------------------------------------------------------------------------------- /TagReader/SettingsWindow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/SettingsWindow.png -------------------------------------------------------------------------------- /TagReader/TagReader.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TagReader", "TagReader\TagReader.csproj", "{B14817B5-859B-4AF1-A656-6276418265A7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B14817B5-859B-4AF1-A656-6276418265A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B14817B5-859B-4AF1-A656-6276418265A7}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B14817B5-859B-4AF1-A656-6276418265A7}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B14817B5-859B-4AF1-A656-6276418265A7}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /TagReader/TagReader/AboutBox.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TagReader 2 | { 3 | partial class AboutBox 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | protected override void Dispose(bool disposing) 14 | { 15 | if (disposing && (components != null)) 16 | { 17 | components.Dispose(); 18 | } 19 | base.Dispose(disposing); 20 | } 21 | 22 | #region Windows Form Designer generated code 23 | 24 | /// 25 | /// Required method for Designer support - do not modify 26 | /// the contents of this method with the code editor. 27 | /// 28 | private void InitializeComponent() 29 | { 30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); 31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 32 | this.logoPictureBox = new System.Windows.Forms.PictureBox(); 33 | this.labelProductName = new System.Windows.Forms.Label(); 34 | this.labelVersion = new System.Windows.Forms.Label(); 35 | this.labelCopyright = new System.Windows.Forms.Label(); 36 | this.labelCompanyName = new System.Windows.Forms.Label(); 37 | this.textBoxDescription = new System.Windows.Forms.TextBox(); 38 | this.okButton = new System.Windows.Forms.Button(); 39 | this.tableLayoutPanel.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // tableLayoutPanel 44 | // 45 | this.tableLayoutPanel.ColumnCount = 2; 46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); 47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); 48 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); 49 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); 50 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); 51 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); 52 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); 53 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); 54 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 55 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.tableLayoutPanel.Location = new System.Drawing.Point(9, 8); 57 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 58 | this.tableLayoutPanel.RowCount = 6; 59 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 65 | this.tableLayoutPanel.Size = new System.Drawing.Size(417, 245); 66 | this.tableLayoutPanel.TabIndex = 0; 67 | // 68 | // logoPictureBox 69 | // 70 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 71 | this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); 72 | this.logoPictureBox.Location = new System.Drawing.Point(3, 3); 73 | this.logoPictureBox.Name = "logoPictureBox"; 74 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); 75 | this.logoPictureBox.Size = new System.Drawing.Size(131, 239); 76 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 77 | this.logoPictureBox.TabIndex = 12; 78 | this.logoPictureBox.TabStop = false; 79 | // 80 | // labelProductName 81 | // 82 | this.labelProductName.AccessibleRole = System.Windows.Forms.AccessibleRole.TitleBar; 83 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; 84 | this.labelProductName.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 85 | this.labelProductName.Location = new System.Drawing.Point(143, 0); 86 | this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 87 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 16); 88 | this.labelProductName.Name = "labelProductName"; 89 | this.labelProductName.Size = new System.Drawing.Size(271, 16); 90 | this.labelProductName.TabIndex = 19; 91 | this.labelProductName.Text = "Product Name"; 92 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 93 | // 94 | // labelVersion 95 | // 96 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; 97 | this.labelVersion.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 98 | this.labelVersion.Location = new System.Drawing.Point(143, 24); 99 | this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 100 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 16); 101 | this.labelVersion.Name = "labelVersion"; 102 | this.labelVersion.Size = new System.Drawing.Size(271, 16); 103 | this.labelVersion.TabIndex = 0; 104 | this.labelVersion.Text = "Version"; 105 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 106 | // 107 | // labelCopyright 108 | // 109 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; 110 | this.labelCopyright.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 111 | this.labelCopyright.Location = new System.Drawing.Point(143, 48); 112 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 113 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 16); 114 | this.labelCopyright.Name = "labelCopyright"; 115 | this.labelCopyright.Size = new System.Drawing.Size(271, 16); 116 | this.labelCopyright.TabIndex = 21; 117 | this.labelCopyright.Text = "Copyright"; 118 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 119 | // 120 | // labelCompanyName 121 | // 122 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; 123 | this.labelCompanyName.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 124 | this.labelCompanyName.Location = new System.Drawing.Point(143, 72); 125 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 126 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 16); 127 | this.labelCompanyName.Name = "labelCompanyName"; 128 | this.labelCompanyName.Size = new System.Drawing.Size(271, 16); 129 | this.labelCompanyName.TabIndex = 22; 130 | this.labelCompanyName.Text = "Company Name"; 131 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 132 | // 133 | // textBoxDescription 134 | // 135 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; 136 | this.textBoxDescription.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 137 | this.textBoxDescription.Location = new System.Drawing.Point(143, 99); 138 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); 139 | this.textBoxDescription.Multiline = true; 140 | this.textBoxDescription.Name = "textBoxDescription"; 141 | this.textBoxDescription.ReadOnly = true; 142 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; 143 | this.textBoxDescription.Size = new System.Drawing.Size(271, 116); 144 | this.textBoxDescription.TabIndex = 23; 145 | this.textBoxDescription.TabStop = false; 146 | this.textBoxDescription.Text = "Description"; 147 | // 148 | // okButton 149 | // 150 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 151 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 152 | this.okButton.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 153 | this.okButton.Location = new System.Drawing.Point(339, 221); 154 | this.okButton.Name = "okButton"; 155 | this.okButton.Size = new System.Drawing.Size(75, 21); 156 | this.okButton.TabIndex = 24; 157 | this.okButton.Text = "&OK"; 158 | this.okButton.Click += new System.EventHandler(this.okButton_Click); 159 | // 160 | // AboutBox 161 | // 162 | this.AcceptButton = this.okButton; 163 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 164 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 165 | this.ClientSize = new System.Drawing.Size(435, 261); 166 | this.Controls.Add(this.tableLayoutPanel); 167 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 168 | this.MaximizeBox = false; 169 | this.MinimizeBox = false; 170 | this.Name = "AboutBox"; 171 | this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8); 172 | this.ShowIcon = false; 173 | this.ShowInTaskbar = false; 174 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 175 | this.Text = "AboutBox"; 176 | this.tableLayoutPanel.ResumeLayout(false); 177 | this.tableLayoutPanel.PerformLayout(); 178 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); 179 | this.ResumeLayout(false); 180 | 181 | } 182 | 183 | #endregion 184 | 185 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 186 | private System.Windows.Forms.PictureBox logoPictureBox; 187 | private System.Windows.Forms.Label labelProductName; 188 | private System.Windows.Forms.Label labelVersion; 189 | private System.Windows.Forms.Label labelCopyright; 190 | private System.Windows.Forms.Label labelCompanyName; 191 | private System.Windows.Forms.TextBox textBoxDescription; 192 | private System.Windows.Forms.Button okButton; 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /TagReader/TagReader/AboutBox.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Windows.Forms; 4 | 5 | namespace TagReader 6 | { 7 | partial class AboutBox : Form 8 | { 9 | public AboutBox() 10 | { 11 | InitializeComponent(); 12 | this.Text = String.Format("About {0}", AssemblyTitle); 13 | this.labelProductName.Text = AssemblyProduct; 14 | this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion); 15 | this.labelCopyright.Text = AssemblyCopyright; 16 | this.labelCompanyName.Text = AssemblyCompany; 17 | this.textBoxDescription.Text = AssemblyDescription; 18 | } 19 | 20 | #region Assembly Attribute Accessors 21 | 22 | public string AssemblyTitle 23 | { 24 | get 25 | { 26 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 27 | if (attributes.Length > 0) 28 | { 29 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; 30 | if (titleAttribute.Title != "") 31 | { 32 | return titleAttribute.Title; 33 | } 34 | } 35 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); 36 | } 37 | } 38 | 39 | public string AssemblyVersion 40 | { 41 | get 42 | { 43 | return Assembly.GetExecutingAssembly().GetName().Version.ToString(); 44 | } 45 | } 46 | 47 | public string AssemblyDescription 48 | { 49 | get 50 | { 51 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 52 | if (attributes.Length == 0) 53 | { 54 | return ""; 55 | } 56 | return ((AssemblyDescriptionAttribute)attributes[0]).Description; 57 | } 58 | } 59 | 60 | public string AssemblyProduct 61 | { 62 | get 63 | { 64 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 65 | if (attributes.Length == 0) 66 | { 67 | return ""; 68 | } 69 | return ((AssemblyProductAttribute)attributes[0]).Product; 70 | } 71 | } 72 | 73 | public string AssemblyCopyright 74 | { 75 | get 76 | { 77 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 78 | if (attributes.Length == 0) 79 | { 80 | return ""; 81 | } 82 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; 83 | } 84 | } 85 | 86 | public string AssemblyCompany 87 | { 88 | get 89 | { 90 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 91 | if (attributes.Length == 0) 92 | { 93 | return ""; 94 | } 95 | return ((AssemblyCompanyAttribute)attributes[0]).Company; 96 | } 97 | } 98 | #endregion 99 | 100 | private void okButton_Click(object sender, EventArgs e) 101 | { 102 | this.Close(); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /TagReader/TagReader/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | kIACAAgAACAgCAUAAACAAAADAAAAEIAAAAAAAAAAAAA= 7 | AboutBox.cs 8 | 9 | 10 | 11 | 12 | 13 | BQOkIBlCJKEEiFbBMRCFN2YXQEEipAQZQEIcAibJIxk= 14 | MainWindow.cs 15 | 16 | 17 | 18 | 19 | 20 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAA= 21 | Program.cs 22 | 23 | 24 | 25 | 26 | 27 | AAAAAAAQACAAABAAAACAAAACAAAAAAAAAAAAAAAAAAA= 28 | ProgressWindow.cs 29 | 30 | 31 | 32 | 33 | 34 | VAAAAFHAIDkIABAkHACAAggCAAAgAAQSgKQhCAGCwqA= 35 | SettingsWindow.cs 36 | 37 | 38 | 39 | 40 | 41 | AAAAAEABAACAgQAAAAQBEQAAIQCgAEAAAAABAAAAAIA= 42 | 43 | 44 | 45 | 46 | 47 | AAAAAAAAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAA= 48 | 49 | 50 | 51 | 52 | 53 | AIAAAIAAAIAAAAQCCAAAAAAAAAAgEAAIAAAgAABAAEA= 54 | RFIDReader\CsvStreamWriter.cs 55 | 56 | 57 | 58 | 59 | 60 | AAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAA= 61 | RFIDReader\LogHelper.cs 62 | 63 | 64 | 65 | 66 | 67 | AAAAAAAIBAACAEAAgAAAAAAAAAAAACAAABCQABAAIAA= 68 | RFIDReader\ReaderSettings.cs 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | RFIDReader\ReaderWrapper.cs 80 | 81 | 82 | 83 | 84 | RFIDReader\ReaderWrapper.cs 85 | 86 | 87 | 88 | 89 | IgIiAECAACBCIIAAD6AigAAUAAAAEBAAYBgAwIIgAgI= 90 | RFIDReader\ReaderWrapper.cs 91 | 92 | 93 | 94 | 95 | 96 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= 97 | RFIDReader\TagInfos.cs 98 | 99 | 100 | 101 | 102 | 103 | AAEAAACJAEAAAAAAAACgAgAAAIAAACAAAAAQAAAGAQA= 104 | RFIDReader\TagStatus.cs 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /TagReader/TagReader/GlobalSuppressions.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/GlobalSuppressions.cs -------------------------------------------------------------------------------- /TagReader/TagReader/MainWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.IO; 5 | using System.Windows.Forms; 6 | using TagReader.RFIDReader; 7 | using System.Windows.Forms.DataVisualization.Charting; 8 | 9 | namespace TagReader 10 | { 11 | public partial class FormTagReader : Form 12 | { 13 | private static bool _isConnected2Reader; 14 | private static bool _isStartButtonClicked; 15 | public static bool IsStopButtonClicked; 16 | private static bool _isClearButtonClicked; 17 | public static bool IsSettingsButtonClicked; 18 | public static bool IsSettigsWindowShowing; 19 | private static bool _showQuickAccessToolStrip = true; 20 | private static bool _showReaderSettingsToolStrip = true; 21 | 22 | 23 | public FormTagReader() 24 | { 25 | InitializeComponent(); 26 | ReaderWrapper.MainForm = this; 27 | 28 | ReaderWrapper.Initialize_Configuration(); 29 | 30 | toolStripButton_Save.Enabled = false; 31 | toolStripButton_Connect.Enabled = true; 32 | toolStripButton_Start.Enabled = false; 33 | toolStripButton_Stop.Enabled = false; 34 | toolStripButton_Clear.Enabled = false; 35 | toolStripButton_Refresh.Enabled = false; 36 | toolStripButton_Settings.Enabled = true; 37 | 38 | ToolStripMenuItem_Save.Enabled = false; 39 | ToolStripMenuItem_Connect.Enabled = true; 40 | ToolStripMenuItem_Start.Enabled = false; 41 | ToolStripMenuItem_Stop.Enabled = false; 42 | ToolStripMenuItem_Settings.Enabled = true; 43 | } 44 | 45 | #region Update Component 46 | private ulong _startTime; 47 | private DateTime _startTimeDateTime; 48 | private int ConvertTime(ulong time) 49 | { 50 | var ts = time - _startTime; 51 | return (int) (ts / 1000000); 52 | } 53 | 54 | 55 | private static HashSet _keySet = new HashSet(); 56 | public void AddListItem(ref TagStatus tagStatus) 57 | { 58 | var epc = tagStatus.Epc; 59 | var antenna = tagStatus.Antenna; 60 | var channel = tagStatus.ChannelIndex; 61 | var key = new TagInfos.Key(epc, antenna, channel); 62 | 63 | if (_keySet.Contains(key)) 64 | { 65 | foreach (ListViewItem item in listView_Data.Items) 66 | { 67 | if (item.SubItems[0].Text != epc || Convert.ToUInt16(item.SubItems[1].Text) != antenna) 68 | continue; 69 | item.SubItems[2].Text = tagStatus.TimeStamp.ToString(); // time 70 | item.SubItems[3].Text = tagStatus.Rssi.ToString(CultureInfo.InvariantCulture); // rssi 71 | item.SubItems[4].Text = tagStatus.PhaseRadian.ToString(CultureInfo.InvariantCulture);// phase 72 | item.SubItems[5].Text = tagStatus.DopplerShift.ToString();// Doppler 73 | item.SubItems[6].Text = tagStatus.Velocity.ToString(CultureInfo.InvariantCulture);// velocity 74 | item.SubItems[7].Text = tagStatus.TagSeenCount.ToString();// count 75 | } 76 | } 77 | else 78 | { 79 | var lvi = new ListViewItem(epc); 80 | lvi.SubItems.Add(antenna.ToString()); 81 | lvi.SubItems.Add(ConvertTime(tagStatus.TimeStamp).ToString()); 82 | lvi.SubItems.Add(tagStatus.Rssi.ToString(CultureInfo.InvariantCulture)); 83 | lvi.SubItems.Add(tagStatus.PhaseRadian.ToString(CultureInfo.InvariantCulture)); 84 | lvi.SubItems.Add(tagStatus.DopplerShift.ToString()); 85 | lvi.SubItems.Add(tagStatus.Velocity.ToString(CultureInfo.InvariantCulture)); 86 | lvi.SubItems.Add(tagStatus.TagSeenCount.ToString()); 87 | 88 | listView_Data.Items.Add(lvi); 89 | _keySet.Add(key); 90 | } 91 | } 92 | 93 | 94 | private static Dictionary _map = new Dictionary(); 95 | public void UpdateChart(ref TagStatus tagStatus) 96 | { 97 | var epc = tagStatus.Epc; 98 | var antenna = tagStatus.Antenna; 99 | var channel = tagStatus.ChannelIndex; 100 | var key = new TagInfos.Key(epc, antenna, channel); 101 | var time = tagStatus.TimeStamp; 102 | 103 | if (!_map.ContainsKey(key)) 104 | { 105 | _isClearButtonClicked = false; 106 | if (_startTime == 0) 107 | { 108 | _startTime = time; 109 | var dt = new DateTime(1970, 1, 1, 0, 0, 0, 0); 110 | _startTimeDateTime = dt.AddSeconds(Convert.ToDouble(_startTime / 1000000)).ToLocalTime(); 111 | } 112 | 113 | var s = new Series 114 | { 115 | ChartType = SeriesChartType.FastLine, 116 | Name = epc + "_" + antenna 117 | }; 118 | chart_Rssi.Series.Add(s); 119 | 120 | var s1 = new Series 121 | { 122 | ChartType = SeriesChartType.FastLine, 123 | Name = epc + "_" + antenna 124 | }; 125 | chart_Phase.Series.Add(s1); 126 | 127 | var s2 = new Series 128 | { 129 | ChartType = SeriesChartType.FastLine, 130 | Name = epc + "_" + antenna 131 | }; 132 | chart_Doppler.Series.Add(s2); 133 | 134 | _map.Add(key, _map.Count); // save index 135 | } 136 | var seriesId = _map[key]; 137 | 138 | chart_Rssi.Series[seriesId].Points.AddXY(ConvertTime(time), tagStatus.Rssi); 139 | chart_Rssi.Series[seriesId].LegendText = epc.Substring(epc.Length - 4, 4) + "_" + antenna; 140 | 141 | chart_Phase.Series[seriesId].Points.AddXY(ConvertTime(time), tagStatus.PhaseRadian); 142 | chart_Phase.Series[seriesId].LegendText = epc.Substring(epc.Length - 4, 4) + "_" + antenna; 143 | 144 | chart_Doppler.Series[seriesId].Points.AddXY(ConvertTime(time), tagStatus.DopplerShift); 145 | chart_Doppler.Series[seriesId].LegendText = epc.Substring(epc.Length - 4, 4) + "_" + antenna; 146 | 147 | if (SettingsWindow.IsTimerModeActied) 148 | { 149 | int t = ConvertTime(time); 150 | Invoke(new Action(() => 151 | { 152 | UpdateStatusBar_ProgressBar(ref t); 153 | })); 154 | 155 | if (t >= ReaderWrapper.ReaderParameters.Duration) 156 | { 157 | StopReceive(); 158 | 159 | if (SettingsWindow.IsAutoSaveChecked) 160 | { 161 | var fpath = @"C:\Users\Marin\Desktop\"; 162 | if (!Directory.Exists(fpath)) 163 | Directory.CreateDirectory(fpath); 164 | 165 | var dt = DateTime.Now; 166 | var strCurrentTime = dt.ToString("yyyyMMdd_HHmmss"); 167 | var fname = strCurrentTime + ".csv"; 168 | var csvWriter = new CsvStreamWriter(fpath + fname); 169 | ReaderWrapper.SaveData(csvWriter); 170 | } 171 | } 172 | } 173 | } 174 | 175 | 176 | public void UpdateStatusBar_ProgressBar(ref int val) 177 | { 178 | toolStripProgressBar.Value = val; 179 | if (toolStripProgressBar.Value < toolStripProgressBar.Maximum) 180 | toolStripProgressBar.PerformStep(); 181 | } 182 | 183 | public void UpdateStatusBar_Message(ref string str) 184 | { 185 | toolStripStatusLabel_Message.Text = str; 186 | } 187 | 188 | public void UpdateStatusBar_Event() 189 | { 190 | toolStripStatusLabel_TotalEvent.Text = ReaderWrapper.TotalEvent.ToString(); 191 | } 192 | 193 | public void UpdateStatusBar_Report() 194 | { 195 | toolStripStatusLabel_TotalReport.Text = ReaderWrapper.TotalReport.ToString(); 196 | } 197 | 198 | public void UpdateStatusBar_Time(ulong timestamp) 199 | { 200 | System.DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0); 201 | dt = dt.AddSeconds(Convert.ToDouble(timestamp / 1000000)).ToLocalTime(); 202 | 203 | TimeSpan time = dt - _startTimeDateTime; 204 | toolStripStatusLabel_RunTime.Text = time.Hours + @":" + time.Minutes + @":" + time.Seconds; 205 | } 206 | #endregion 207 | 208 | private void Form_TagReader_Resize(object sender, EventArgs e) 209 | { 210 | var h = Height/2; 211 | chart_Rssi.Height = h; 212 | chart_Phase.Height = h; 213 | chart_Doppler.Height = h; 214 | 215 | var w = Width/3; 216 | chart_Rssi.Left = 0; 217 | chart_Phase.Left = w*1; 218 | chart_Doppler.Left = w*2; 219 | 220 | chart_Rssi.Width = w; 221 | chart_Phase.Width = w; 222 | chart_Doppler.Width = w; 223 | } 224 | 225 | 226 | #region Button Clicked Event Response 227 | 228 | private void button_Connect_Click(object sender, EventArgs e) 229 | { 230 | if (IsSettingsButtonClicked) 231 | { 232 | toolStripTextBox_Address.Text = ReaderWrapper.ReaderParameters.Ip; 233 | toolStripTextBox_Power.Text = 234 | ReaderWrapper.ReaderParameters.TransmitPower.ToString(CultureInfo.InvariantCulture); 235 | toolStripComboBox_Frequency.Text = 236 | Convert.ToString(920.625 + ReaderWrapper.ReaderParameters.ChannelIndex*0.25, 237 | CultureInfo.InvariantCulture); 238 | } 239 | else 240 | { 241 | var ipAddress = toolStripTextBox_Address.Text; 242 | var txPower = Convert.ToDouble(toolStripTextBox_Power.Text); 243 | var frequency = toolStripComboBox_Frequency.SelectedItem.ToString(); 244 | 245 | if (ipAddress == string.Empty) 246 | { 247 | MessageBox.Show("IP Address Cannot be Empty"); 248 | } 249 | if (txPower < 10 || txPower > 32.5) 250 | { 251 | MessageBox.Show("Invalid Power!"); 252 | } 253 | 254 | ReaderWrapper.ReaderParameters.Ip = ipAddress; 255 | ReaderWrapper.ReaderParameters.TransmitPower = txPower; 256 | ReaderWrapper.ReaderParameters.ChannelIndex = 257 | Convert.ToUInt16((Convert.ToDouble(frequency) - 920.625)/0.25); 258 | } 259 | 260 | _isConnected2Reader = ReaderWrapper.ConnectToReader(); 261 | 262 | //MessageBox.Show(_isConnected2Reader ? "Successfully Connected!" : "Connect Failed!"); 263 | 264 | if (_isConnected2Reader) 265 | { 266 | toolStripButton_Settings.Enabled = false; 267 | ToolStripMenuItem_Settings.Enabled = false; 268 | 269 | toolStripButton_Connect.Enabled = false; 270 | ToolStripMenuItem_Connect.Enabled = false; 271 | 272 | toolStripButton_Start.Enabled = true; 273 | ToolStripMenuItem_Start.Enabled = true; 274 | } 275 | } 276 | 277 | private void StartReceive() 278 | { 279 | ReaderWrapper.Start(); 280 | 281 | _startTime = 0; 282 | _isStartButtonClicked = true; 283 | IsStopButtonClicked = false; 284 | 285 | toolStripButton_Start.Enabled = false; 286 | ToolStripMenuItem_Start.Enabled = false; 287 | 288 | toolStripButton_Stop.Enabled = true; 289 | ToolStripMenuItem_Stop.Enabled = true; 290 | 291 | //toolStripButton_Clear.Enabled = true; 292 | 293 | toolStripButton_Settings.Enabled = false; 294 | ToolStripMenuItem_Settings.Enabled = false; 295 | } 296 | 297 | private void button_Start_Click(object sender, EventArgs e) 298 | { 299 | if (_isConnected2Reader) 300 | { 301 | StartReceive(); 302 | 303 | if (SettingsWindow.IsTimerModeActied) 304 | { 305 | toolStripProgressBar.Maximum = ReaderWrapper.ReaderParameters.Duration; 306 | toolStripProgressBar.Step = 1; 307 | } 308 | } 309 | } 310 | 311 | private void StopReceive() 312 | { 313 | IsStopButtonClicked = true; 314 | IsSettingsButtonClicked = false; 315 | _isClearButtonClicked = false; 316 | 317 | ReaderWrapper.Stop(); 318 | 319 | chart_Rssi.EndInit(); 320 | chart_Phase.EndInit(); 321 | chart_Doppler.EndInit(); 322 | 323 | toolStripButton_Stop.Enabled = false; 324 | ToolStripMenuItem_Stop.Enabled = false; 325 | 326 | // 327 | //toolStripButton_Start.Enabled = true; 328 | //ToolStripMenuItem_Start.Enabled = true; 329 | 330 | toolStripButton_Save.Enabled = true; 331 | ToolStripMenuItem_Save.Enabled = true; 332 | toolStripButton_Settings.Enabled = true; 333 | ToolStripMenuItem_Settings.Enabled = true; 334 | 335 | toolStripButton_Clear.Enabled = true; 336 | } 337 | 338 | private void button_Stop_Click(object sender, EventArgs e) 339 | { 340 | if (_isConnected2Reader && _isStartButtonClicked) 341 | { 342 | StopReceive(); 343 | } 344 | } 345 | 346 | private void button_Export_Click(object sender, EventArgs e) 347 | { 348 | SaveFileDialog sfd = new SaveFileDialog 349 | { 350 | Filter = "csv file|*.csv", 351 | FilterIndex = 1, 352 | RestoreDirectory = true, 353 | DefaultExt = ".csv" 354 | }; 355 | if (sfd.ShowDialog() == DialogResult.OK) 356 | { 357 | var fpath = sfd.FileName; 358 | CsvStreamWriter csvWriter = new CsvStreamWriter(fpath); 359 | ReaderWrapper.SaveData(csvWriter); 360 | } 361 | } 362 | 363 | private void button_Clear_Click(object sender, EventArgs e) 364 | { 365 | if (IsStopButtonClicked) 366 | { 367 | listView_Data.Items.Clear(); // clean up the Reader 368 | chart_Rssi.Dispose(); 369 | chart_Phase.Dispose(); 370 | chart_Doppler.Dispose(); 371 | 372 | var a = 0; 373 | UpdateStatusBar_ProgressBar(ref a); 374 | _isClearButtonClicked = true; 375 | } 376 | } 377 | 378 | private void toolStripButton_Refresh_Click(object sender, EventArgs e) 379 | { 380 | 381 | } 382 | 383 | private void button_Settings_Click(object sender, EventArgs e) 384 | { 385 | if (!IsSettigsWindowShowing) 386 | { 387 | var x = new SettingsWindow(); 388 | x.Show(); 389 | 390 | IsSettingsButtonClicked = true; 391 | IsSettigsWindowShowing = true; 392 | } 393 | } 394 | 395 | private void ToolStripMenuItem_About_Click(object sender, EventArgs e) 396 | { 397 | var x = new AboutBox(); 398 | x.Show(); 399 | } 400 | 401 | private void quickAccessToolStripMenuItem_Click(object sender, EventArgs e) 402 | { 403 | if (_showQuickAccessToolStrip) 404 | { 405 | _showQuickAccessToolStrip = false; 406 | quickAccessToolStripMenuItem.Checked = false; 407 | toolStrip_QuickAccess.Visible = false; 408 | 409 | if (_showReaderSettingsToolStrip) 410 | { 411 | toolStrip_ReaderSettings.Left = toolStrip_QuickAccess.Left; 412 | } 413 | else 414 | { 415 | listView_Data.Top = toolStrip_QuickAccess.Top; 416 | listView_Data.Height += toolStrip_QuickAccess.Height; 417 | } 418 | } 419 | else 420 | { 421 | _showQuickAccessToolStrip = true; 422 | quickAccessToolStripMenuItem.Checked = true; 423 | toolStrip_QuickAccess.Visible = true; 424 | if (_showReaderSettingsToolStrip) 425 | { 426 | toolStrip_ReaderSettings.Left = toolStrip_QuickAccess.Right; 427 | } 428 | else 429 | { 430 | listView_Data.Top += toolStrip_QuickAccess.Height; 431 | listView_Data.Height -= toolStrip_QuickAccess.Height; 432 | } 433 | } 434 | } 435 | 436 | private void readerSettingsToolStripMenuItem_Click(object sender, EventArgs e) 437 | { 438 | if (_showReaderSettingsToolStrip) 439 | { 440 | _showReaderSettingsToolStrip = false; 441 | readerSettingsToolStripMenuItem.Checked = false; 442 | toolStrip_ReaderSettings.Visible = false; 443 | if (!_showQuickAccessToolStrip) 444 | { 445 | listView_Data.Top = toolStrip_QuickAccess.Top; 446 | listView_Data.Height += toolStrip_QuickAccess.Height; 447 | } 448 | } 449 | else 450 | { 451 | _showReaderSettingsToolStrip = true; 452 | readerSettingsToolStripMenuItem.Checked = true; 453 | toolStrip_ReaderSettings.Visible = true; 454 | if (_showQuickAccessToolStrip) 455 | { 456 | toolStrip_ReaderSettings.Left = toolStrip_QuickAccess.Right; 457 | } 458 | else 459 | { 460 | listView_Data.Top = toolStrip_QuickAccess.Bottom; 461 | listView_Data.Height -= toolStrip_QuickAccess.Height; 462 | } 463 | } 464 | } 465 | 466 | #endregion 467 | 468 | } // end FormTagReader 469 | } // end namespace 470 | -------------------------------------------------------------------------------- /TagReader/TagReader/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace TagReader 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// 应用程序的主入口点。 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new FormTagReader()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /TagReader/TagReader/ProgressWindow.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TagReader 2 | { 3 | partial class ProgressWindow 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.progressBar = new System.Windows.Forms.ProgressBar(); 32 | this.label = new System.Windows.Forms.Label(); 33 | this.SuspendLayout(); 34 | // 35 | // progressBar 36 | // 37 | this.progressBar.Location = new System.Drawing.Point(1, 12); 38 | this.progressBar.Name = "progressBar"; 39 | this.progressBar.Size = new System.Drawing.Size(232, 52); 40 | this.progressBar.TabIndex = 0; 41 | // 42 | // label 43 | // 44 | this.label.AutoSize = true; 45 | this.label.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 46 | this.label.Location = new System.Drawing.Point(255, 25); 47 | this.label.Name = "label"; 48 | this.label.Size = new System.Drawing.Size(66, 39); 49 | this.label.TabIndex = 1; 50 | this.label.Text = "0%"; 51 | // 52 | // ProgressWindow 53 | // 54 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 55 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 56 | this.ClientSize = new System.Drawing.Size(321, 75); 57 | this.Controls.Add(this.label); 58 | this.Controls.Add(this.progressBar); 59 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 60 | this.Name = "ProgressWindow"; 61 | this.Text = "ProgressWindow"; 62 | this.ResumeLayout(false); 63 | this.PerformLayout(); 64 | 65 | } 66 | 67 | #endregion 68 | 69 | private System.Windows.Forms.ProgressBar progressBar; 70 | private System.Windows.Forms.Label label; 71 | } 72 | } -------------------------------------------------------------------------------- /TagReader/TagReader/ProgressWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace TagReader 11 | { 12 | public partial class ProgressWindow : Form 13 | { 14 | public ProgressWindow() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /TagReader/TagReader/ProgressWindow.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /TagReader/TagReader/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("TagReader")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Xi'an Jiaotong University, SSMC Lab")] 12 | [assembly: AssemblyProduct("TagReader")] 13 | [assembly: AssemblyCopyright("Copyright © 2016 MarinYoung")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("382fa0a1-84e6-44ce-8cc3-2a7b299657fd")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /TagReader/TagReader/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TagReader.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TagReader.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap about { 67 | get { 68 | object obj = ResourceManager.GetObject("about", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap alarm { 77 | get { 78 | object obj = ResourceManager.GetObject("alarm", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap delete { 87 | get { 88 | object obj = ResourceManager.GetObject("delete", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized string similar to ERROR!\n. 95 | /// 96 | internal static string ERROR { 97 | get { 98 | return ResourceManager.GetString("ERROR", resourceCulture); 99 | } 100 | } 101 | 102 | /// 103 | /// Looks up a localized resource of type System.Drawing.Bitmap. 104 | /// 105 | internal static System.Drawing.Bitmap ic_link { 106 | get { 107 | object obj = ResourceManager.GetObject("ic_link", resourceCulture); 108 | return ((System.Drawing.Bitmap)(obj)); 109 | } 110 | } 111 | 112 | /// 113 | /// Looks up a localized string similar to Initializing.... 114 | /// 115 | internal static string Initialize { 116 | get { 117 | return ResourceManager.GetString("Initialize", resourceCulture); 118 | } 119 | } 120 | 121 | /// 122 | /// Looks up a localized string similar to 192.168.1.222. 123 | /// 124 | internal static string IP { 125 | get { 126 | return ResourceManager.GetString("IP", resourceCulture); 127 | } 128 | } 129 | 130 | /// 131 | /// Looks up a localized string similar to OK!\n. 132 | /// 133 | internal static string OK { 134 | get { 135 | return ResourceManager.GetString("OK", resourceCulture); 136 | } 137 | } 138 | 139 | /// 140 | /// Looks up a localized resource of type System.Drawing.Bitmap. 141 | /// 142 | internal static System.Drawing.Bitmap play { 143 | get { 144 | object obj = ResourceManager.GetObject("play", resourceCulture); 145 | return ((System.Drawing.Bitmap)(obj)); 146 | } 147 | } 148 | 149 | /// 150 | /// Looks up a localized resource of type System.Drawing.Bitmap. 151 | /// 152 | internal static System.Drawing.Bitmap refresh { 153 | get { 154 | object obj = ResourceManager.GetObject("refresh", resourceCulture); 155 | return ((System.Drawing.Bitmap)(obj)); 156 | } 157 | } 158 | 159 | /// 160 | /// Looks up a localized resource of type System.Drawing.Bitmap. 161 | /// 162 | internal static System.Drawing.Bitmap save { 163 | get { 164 | object obj = ResourceManager.GetObject("save", resourceCulture); 165 | return ((System.Drawing.Bitmap)(obj)); 166 | } 167 | } 168 | 169 | /// 170 | /// Looks up a localized resource of type System.Drawing.Bitmap. 171 | /// 172 | internal static System.Drawing.Bitmap settings { 173 | get { 174 | object obj = ResourceManager.GetObject("settings", resourceCulture); 175 | return ((System.Drawing.Bitmap)(obj)); 176 | } 177 | } 178 | 179 | /// 180 | /// Looks up a localized resource of type System.Drawing.Bitmap. 181 | /// 182 | internal static System.Drawing.Bitmap stop { 183 | get { 184 | object obj = ResourceManager.GetObject("stop", resourceCulture); 185 | return ((System.Drawing.Bitmap)(obj)); 186 | } 187 | } 188 | 189 | /// 190 | /// Looks up a localized string similar to TIME OUT!\n. 191 | /// 192 | internal static string TIMEOUT { 193 | get { 194 | return ResourceManager.GetString("TIMEOUT", resourceCulture); 195 | } 196 | } 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /TagReader/TagReader/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\ic_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\alarm.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | OK!\n 150 | 151 | 152 | ERROR!\n 153 | 154 | 155 | TIME OUT!\n 156 | 157 | 158 | Initializing... 159 | 160 | 161 | 192.168.1.222 162 | 163 | -------------------------------------------------------------------------------- /TagReader/TagReader/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.34014 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TagReader.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /TagReader/TagReader/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/CsvStreamWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Collections; 4 | using System.IO; 5 | using System.Data; 6 | 7 | namespace TagReader.RFIDReader 8 | { 9 | #region 类说明信息 10 | /// 11 | ///
12 | ///
写CSV文件类,首先给CSV文件赋值,最后通过Save方法进行保存操作
13 | ///
14 | ///
    15 | ///
16 | ///
17 | ///
18 | /// yangzhihong 19 | /// 2006/01/16 20 | /// 21 | /// 1.0 22 | ///
23 | #endregion 24 | public class CsvStreamWriter 25 | { 26 | private readonly ArrayList _rowAl; //行链表,CSV文件的每一行就是一个链 27 | private string _fileName; //文件名 28 | private Encoding _encoding; //编码 29 | 30 | public CsvStreamWriter() 31 | { 32 | _rowAl = new ArrayList(); 33 | _fileName = ""; 34 | _encoding = Encoding.Default; 35 | } 36 | 37 | /// 38 | /// 39 | /// 40 | /// 文件名,包括文件路径 41 | public CsvStreamWriter(string fileName) 42 | { 43 | _rowAl = new ArrayList(); 44 | _fileName = fileName; 45 | _encoding = Encoding.Default; 46 | } 47 | 48 | /// 49 | /// 50 | /// 51 | /// 文件名,包括文件路径 52 | /// 文件编码 53 | public CsvStreamWriter(string fileName, Encoding encoding) 54 | { 55 | _rowAl = new ArrayList(); 56 | _fileName = fileName; 57 | _encoding = encoding; 58 | } 59 | 60 | /// 61 | /// row:行,row = 1代表第一行 62 | /// col:列,col = 1代表第一列 63 | /// 64 | public string this[int row, int col] 65 | { 66 | set 67 | { 68 | //对行进行判断 69 | if (row <= 0) 70 | { 71 | throw new Exception("行数不能小于0"); 72 | } 73 | if (row > _rowAl.Count) //如果当前列链的行数不够,要补齐 74 | { 75 | for (var i = _rowAl.Count + 1; i <= row; i++) 76 | { 77 | _rowAl.Add(new ArrayList()); 78 | } 79 | } 80 | //对列进行判断 81 | if (col <= 0) 82 | { 83 | throw new Exception("列数不能小于0"); 84 | } 85 | ArrayList colTempAl = (ArrayList)_rowAl[row - 1]; 86 | 87 | //扩大长度 88 | if (col > colTempAl.Count) 89 | { 90 | for (var i = colTempAl.Count; i <= col; i++) 91 | { 92 | colTempAl.Add(""); 93 | } 94 | } 95 | _rowAl[row - 1] = colTempAl; 96 | //赋值 97 | ArrayList colAl = (ArrayList)_rowAl[row - 1]; 98 | 99 | colAl[col - 1] = value; 100 | _rowAl[row - 1] = colAl; 101 | } 102 | } 103 | 104 | 105 | /// 106 | /// 文件名,包括文件路径 107 | /// 108 | public string FileName 109 | { 110 | set 111 | { 112 | _fileName = value; 113 | } 114 | } 115 | 116 | /// 117 | /// 文件编码 118 | /// 119 | public Encoding FileEncoding 120 | { 121 | set 122 | { 123 | _encoding = value; 124 | } 125 | } 126 | 127 | /// 128 | /// 获取当前最大行 129 | /// 130 | public int CurMaxRow 131 | { 132 | get { return _rowAl.Count; } 133 | } 134 | 135 | /// 136 | /// 获取最大列 137 | /// 138 | public int CurMaxCol 139 | { 140 | get 141 | { 142 | var maxCol = 0; 143 | for (int i = 0; i < _rowAl.Count; i++) 144 | { 145 | ArrayList colAl = (ArrayList)_rowAl[i]; 146 | 147 | maxCol = (maxCol > colAl.Count) ? maxCol : colAl.Count; 148 | } 149 | 150 | return maxCol; 151 | } 152 | } 153 | 154 | /// 155 | /// 添加表数据到CSV文件中 156 | /// 157 | /// 表数据 158 | /// 从第几列开始,beginCol = 1代表第一列 159 | public void AddData(DataTable dataDt, int beginCol) 160 | { 161 | if (dataDt == null) 162 | { 163 | throw new Exception("需要添加的表数据为空"); 164 | } 165 | 166 | var curMaxRow = _rowAl.Count; 167 | for (var i = 0; i < dataDt.Rows.Count; i++) 168 | { 169 | for (var j = 0; j < dataDt.Columns.Count; j++) 170 | { 171 | this[curMaxRow + i + 1, beginCol + j] = dataDt.Rows[i][j].ToString(); 172 | } 173 | } 174 | } 175 | 176 | /// 177 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 178 | /// 179 | public void Save() 180 | { 181 | //对数据的有效性进行判断 182 | if (_fileName == null) 183 | { 184 | throw new Exception("缺少文件名"); 185 | } 186 | if (File.Exists(_fileName)) 187 | { 188 | File.Delete(_fileName); 189 | } 190 | if (_encoding == null) 191 | { 192 | _encoding = Encoding.Default; 193 | } 194 | var sw = new StreamWriter(_fileName, false, _encoding); 195 | 196 | foreach (object t in _rowAl) 197 | { 198 | sw.WriteLine(ConvertToSaveLine((ArrayList)t)); 199 | } 200 | 201 | sw.Close(); 202 | } 203 | 204 | /// 205 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 206 | /// 207 | /// 文件名,包括文件路径 208 | public void Save(string fileName) 209 | { 210 | _fileName = fileName; 211 | Save(); 212 | } 213 | 214 | /// 215 | /// 保存数据,如果当前硬盘中已经存在文件名一样的文件,将会覆盖 216 | /// 217 | /// 文件名,包括文件路径 218 | /// 文件编码 219 | public void Save(string fileName, Encoding encoding) 220 | { 221 | _fileName = fileName; 222 | _encoding = encoding; 223 | Save(); 224 | } 225 | 226 | 227 | /// 228 | /// 转换成保存行 229 | /// 230 | /// 一行 231 | /// 232 | private string ConvertToSaveLine(ArrayList colAl) 233 | { 234 | var saveLine = string.Empty; 235 | for (var i = 0; i < colAl.Count; i++) 236 | { 237 | saveLine += ConvertToSaveCell(colAl[i].ToString()); 238 | //格子间以逗号分割 239 | if (i < colAl.Count - 1) 240 | { 241 | saveLine += ","; 242 | } 243 | } 244 | return saveLine; 245 | } 246 | 247 | /// 248 | /// 字符串转换成CSV中的格子 249 | /// 双引号转换成两个双引号,然后首尾各加一个双引号 250 | /// 这样就不需要考虑逗号及换行的问题 251 | /// 252 | /// 格子内容 253 | /// 254 | private string ConvertToSaveCell(string cell) 255 | { 256 | //cell = cell.Replace("/"" , "/"/""); 257 | 258 | //return "/"" + cell + "/""; 259 | 260 | cell = cell.Replace(@"""", @""""""); 261 | return @"""" + cell + @""""; 262 | } 263 | } 264 | } -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | [assembly: log4net.Config.XmlConfigurator(Watch = true)] 6 | namespace TagReader.RFIDReader 7 | { 8 | public class LogHelper 9 | { 10 | /// 11 | /// 输出日志到Log4Net 12 | /// 13 | /// 14 | /// 15 | #region static void WriteLog(Type t, Exception ex) 16 | public static void WriteLog(Type t, Exception ex) 17 | { 18 | log4net.ILog log = log4net.LogManager.GetLogger(t); 19 | log.Error("Error", ex); 20 | } 21 | #endregion 22 | 23 | 24 | /// 25 | /// 输出日志到Log4Net 26 | /// 27 | /// 28 | /// 29 | #region static void WriteLog(Type t, string msg) 30 | public static void WriteLog(Type t, string msg) 31 | { 32 | log4net.ILog log = log4net.LogManager.GetLogger(t); 33 | log.Error(msg); 34 | } 35 | #endregion 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/ReaderSettings.cs: -------------------------------------------------------------------------------- 1 |  2 | using Org.LLRP.LTK.LLRPV1.Impinj; 3 | using TagReader.Properties; 4 | 5 | namespace TagReader.RFIDReader 6 | { 7 | public class ReaderSettings 8 | { 9 | public string Ip { get; set; } 10 | public double TransmitPower { get; set; } 11 | public ushort ModeIndex { get; set; } 12 | public ushort TagPopulation { get; set; } 13 | public ushort TagTransitTime { get; set; } 14 | public bool[] AntennaId { get; set; } 15 | public ushort Tari { get; set; } 16 | public ushort ReaderSensitivity { get; set; } 17 | public ushort ChannelIndex { get; set; } 18 | public ushort HopTableIndex { get; set; } 19 | public ushort PeriodicTriggerValue { get; set; } 20 | public ushort Duration { get; set; } 21 | public ENUM_ImpinjInventorySearchType SearchType { get; set; } 22 | 23 | public ReaderSettings() 24 | { 25 | Ip = Resources.IP; // default: 192.168.1.222 26 | /* 27 | ** Set Channel Index, 16 in total, which represents different frequency (MHz). Namely, 28 | ** [1: 920.375] 29 | ** [2: 920.875] 30 | ** ...... 31 | ** [16: 924.375] 32 | */ 33 | ChannelIndex = 16; 34 | // Power(dbm) [10 : 0.25 : 32.5], 90 different values in total 35 | TransmitPower = 32.5; 36 | /* 37 | ** ModeIndex NAME SENSITIVITY INTERFERENCE TOLERANCE 38 | ** 0 Max Throughput good poor 39 | ** 1 Hybrid good good 40 | ** 2 Dense Reader (M=4) better excellent 41 | ** 3 Dense Reader (M=8) best excellent 42 | ** 4* MaxMiller better good 43 | ** 1000 Auto set Dense Reader 44 | ** 1001 Auto set Single Reader 45 | ** * MaxMiller is not available in all regions 46 | */ 47 | ModeIndex = 1000; 48 | HopTableIndex = 1; // ? 49 | PeriodicTriggerValue = 0; // ? 50 | TagPopulation = 32; 51 | Tari = 10; 52 | TagTransitTime = 0; // ? 53 | ReaderSensitivity = 1; // ? 54 | // each value in the array map to Antenna 1, Antenna 2, Antenna 3, Antenna 4, respectively. 55 | AntennaId = new[] { true, true, false, false }; 56 | Duration = 10; // transmission duration, (s) 57 | SearchType = ENUM_ImpinjInventorySearchType.Dual_Target; 58 | } // end Reader constructor 59 | } // end Reader 60 | } // end namespace 61 | -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/TagInfos.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace TagReader.RFIDReader 4 | { 5 | public class TagInfos 6 | { 7 | #region Class @Key Defination 8 | public class Key 9 | { 10 | public string Epc { get; set; } 11 | public ushort Antenna { get; set; } 12 | public ushort ChannalIndex { get; set; } 13 | 14 | public Key(string epc, ushort antenna, ushort channal) 15 | { 16 | Epc = epc; 17 | Antenna = antenna; 18 | ChannalIndex = channal; 19 | } 20 | 21 | public override int GetHashCode() 22 | { 23 | const int prime = 37; 24 | var result = 17; 25 | result = result*prime + Epc.GetHashCode(); 26 | result = result*prime + Antenna.GetHashCode(); 27 | result = result*prime + ChannalIndex.GetHashCode(); 28 | return result; 29 | } 30 | 31 | public override bool Equals(object obj) 32 | { 33 | if (null == obj) 34 | return false; 35 | if (obj.GetType() != this.GetType()) 36 | return false; 37 | 38 | return obj.GetHashCode() == this.GetHashCode(); 39 | } 40 | } 41 | #endregion 42 | 43 | 44 | #region Class @Value Defination 45 | public class Value 46 | { 47 | public List RssiList; 48 | public List PhaseList; // Radian 49 | public List DopplerShifList; 50 | public int ReadNums; 51 | 52 | public Value() 53 | { 54 | RssiList = new List(); 55 | PhaseList = new List(); 56 | DopplerShifList = new List(); 57 | ReadNums = 0; 58 | } 59 | }// 60 | #endregion 61 | 62 | }// 63 | } 64 | -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/TagStatus.cs: -------------------------------------------------------------------------------- 1 | namespace TagReader.RFIDReader 2 | { 3 | public class TagStatus 4 | { 5 | public string Epc { get; set; } // 6 | public ulong LastSeenTime { get; set; } // 7 | public ulong FirstSeenTime { get; set; } // 8 | public ulong TimeStamp { get; set; } 9 | public ushort Antenna { get; set; } // 10 | public double TxPower { get; set; } 11 | public ushort ChannelIndex { get; set; } // 12 | public double Frequency { get; set; } 13 | 14 | public float Rssi { get; set; } // 15 | public ushort RawPhase { get; set; } // 16 | public double PhaseRadian { get; set; } 17 | public double PhaseDegree { get; set; } 18 | public int DopplerShift { get; set; } // 19 | public double Velocity { get; set; } 20 | public int TagSeenCount { get; set; } // 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/addROSpec.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 1111 11 | 0 12 | Enabled 13 | 14 | 15 | Null 16 | 17 | 18 | Null 19 | 0 20 | 21 | 22 | 23 | 1 24 | 25 | Null 26 | 0 27 | 28 | 29 | 1234 30 | EPCGlobalClass1Gen2 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /TagReader/TagReader/RFIDReader/setReaderConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | true 10 | 11 | 0 12 | 13 | false 14 | 15 | 16 | 1000 17 | 0 18 | 19 | 20 | 21 | 2 22 | 32 23 | 0 24 | 25 | 26 | 27 | Dual_Target 28 | 29 | 30 | Disabled 31 | 10000 32 | 200 33 | 34 | 35 | 36 | 37 | 38 | Upon_N_Tags_Or_End_Of_ROSpec 39 | 1 40 | 41 | 42 | 44 | false 45 | false 46 | false 47 | true 48 | true 49 | true 50 | true 51 | true 52 | false 53 | false 54 | 55 | false 56 | false 57 | 58 | 59 | 60 | 61 | Enabled 62 | 63 | 64 | Enabled 65 | 66 | 67 | Enabled 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/TagReader.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/TagReader.ico -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/about.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/alarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/alarm.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/delete.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/ic_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/ic_link.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/play.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/refresh.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/rfid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/rfid.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/save.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/settings.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/settings_32px.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/settings_32px.ico -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/settings_32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/settings_32px.png -------------------------------------------------------------------------------- /TagReader/TagReader/Resources/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/Resources/stop.png -------------------------------------------------------------------------------- /TagReader/TagReader/SettingsWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography.X509Certificates; 3 | using System.Windows.Forms; 4 | using System.Threading; 5 | using Org.LLRP.LTK.LLRPV1.Impinj; 6 | using TagReader.RFIDReader; 7 | 8 | 9 | namespace TagReader 10 | { 11 | public partial class SettingsWindow : Form 12 | { 13 | public static bool IsTimerModeActied = false; 14 | public static bool IsAutoSaveChecked = false; 15 | public static bool IsSaveSettingsButtonClicked = false; 16 | 17 | public SettingsWindow() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void button_SaveSettings_Click(object sender, System.EventArgs e) 23 | { 24 | var ip = String.Empty; 25 | if (radioButton_IP.Checked) 26 | { 27 | ip = textBox_IP.Text; 28 | } 29 | else if (radioButton_MAC.Checked) 30 | { 31 | ip = String.Format(@"speedwayr-{0}-{1}-{2}.local", textBox_MAC_1, textBox_MAC_2, textBox_MAC_3); 32 | } 33 | if (ip == String.Empty) 34 | { 35 | MessageBox.Show("IP address can not be String.Empty!"); 36 | return; 37 | } 38 | ReaderWrapper.ReaderParameters.Ip = ip; 39 | 40 | if (textBox_Power.Text == String.Empty) 41 | { 42 | MessageBox.Show("Please assign Transmission Power!"); 43 | return; 44 | } 45 | ReaderWrapper.ReaderParameters.TransmitPower = Convert.ToDouble(textBox_Power.Text); 46 | 47 | ReaderWrapper.ReaderParameters.ChannelIndex = Convert.ToUInt16((Convert.ToDouble(comboBox_Frequency.Text) - 920.625) / 0.25); 48 | 49 | var activedAntennas = 0; 50 | if (checkBox_Antenna1.Checked) ++activedAntennas; 51 | if (checkBox_Antenna2.Checked) ++activedAntennas; 52 | if (checkBox_Antenna3.Checked) ++activedAntennas; 53 | if (checkBox_Antenna4.Checked) ++activedAntennas; 54 | if (0 == activedAntennas) 55 | { 56 | MessageBox.Show("You should assign at least 1 antenna!"); 57 | return; 58 | } 59 | ReaderWrapper.ReaderParameters.AntennaId[0] = checkBox_Antenna1.Checked; 60 | ReaderWrapper.ReaderParameters.AntennaId[1] = checkBox_Antenna2.Checked; 61 | if (comboBox_ReaderType.SelectedIndex == 1) 62 | { 63 | ReaderWrapper.ReaderParameters.AntennaId[2] = checkBox_Antenna3.Checked; 64 | ReaderWrapper.ReaderParameters.AntennaId[3] = checkBox_Antenna4.Checked; 65 | } 66 | 67 | if (textBox_Population.Text == String.Empty) 68 | { 69 | MessageBox.Show("Pls assign population!"); 70 | return; 71 | } 72 | ReaderWrapper.ReaderParameters.TagPopulation = Convert.ToUInt16(textBox_Population.Text); 73 | 74 | if (textBox_Tari.Text == String.Empty) 75 | { 76 | MessageBox.Show("Pls assign Tari!"); 77 | return; 78 | } 79 | ReaderWrapper.ReaderParameters.Tari = Convert.ToUInt16(textBox_Tari.Text); 80 | 81 | if (IsTimerModeActied) 82 | { 83 | if (textBox_Timer.Text == String.Empty) 84 | { 85 | MessageBox.Show("Pls assign transmission timer!"); 86 | return; 87 | } 88 | ReaderWrapper.ReaderParameters.Duration = Convert.ToUInt16(textBox_Timer.Text); 89 | } 90 | IsSaveSettingsButtonClicked = true; 91 | 92 | this.Close(); 93 | FormTagReader.IsSettigsWindowShowing = false; 94 | FormTagReader.IsSettigsWindowShowing = false; 95 | } 96 | 97 | private void comboBox_ReaderType_SelectedIndexChanged(object sender, EventArgs e) 98 | { 99 | if (comboBox_ReaderType.SelectedIndex == 1) 100 | { 101 | checkBox_Antenna3.Enabled = true; 102 | checkBox_Antenna4.Enabled = true; 103 | } 104 | else 105 | { 106 | checkBox_Antenna3.Enabled = false; 107 | checkBox_Antenna4.Enabled = false; 108 | } 109 | } 110 | 111 | private void radioButton_IP_CheckedChanged(object sender, EventArgs e) 112 | { 113 | textBox_IP.Enabled = radioButton_IP.Checked; 114 | 115 | var isEnable = !radioButton_IP.Checked; 116 | label1.Enabled = isEnable; 117 | textBox_MAC_1.Enabled = isEnable; 118 | label2.Enabled = isEnable; 119 | textBox_MAC_2.Enabled = isEnable; 120 | label3.Enabled = isEnable; 121 | textBox_MAC_3.Enabled = isEnable; 122 | label4.Enabled = isEnable; 123 | } 124 | 125 | private void radioButton_MAC_CheckedChanged(object sender, EventArgs e) 126 | { 127 | var isEnable = radioButton_MAC.Checked; 128 | 129 | label1.Enabled = isEnable; 130 | textBox_MAC_1.Enabled = isEnable; 131 | label2.Enabled = isEnable; 132 | textBox_MAC_2.Enabled = isEnable; 133 | label3.Enabled = isEnable; 134 | textBox_MAC_3.Enabled = isEnable; 135 | label4.Enabled = isEnable; 136 | 137 | textBox_IP.Enabled = !isEnable; 138 | } 139 | 140 | private void checkBox_TimerMode_CheckedChanged(object sender, System.EventArgs e) 141 | { 142 | label_Timer.Enabled = checkBox_TimerMode.Checked; 143 | textBox_Timer.Enabled = checkBox_TimerMode.Checked; 144 | checkBox_AutoSave.Enabled = checkBox_TimerMode.Checked; 145 | 146 | IsTimerModeActied = checkBox_TimerMode.Checked; 147 | } 148 | 149 | private void checkBox_AutoSave_CheckedChanged(object sender, EventArgs e) 150 | { 151 | IsAutoSaveChecked = checkBox_AutoSave.Checked; 152 | } 153 | 154 | private void comboBox_ReaderMode_SelectedIndexChanged(object sender, EventArgs e) 155 | { 156 | ushort mode = 0; 157 | switch (comboBox_ReaderMode.SelectedIndex) 158 | { 159 | case 0: 160 | mode = 0; 161 | break; 162 | case 1: 163 | mode = 1; 164 | break; 165 | case 2: 166 | mode = 2; 167 | break; 168 | case 3: 169 | mode = 3; 170 | break; 171 | case 4: 172 | mode = 4; 173 | break; 174 | case 5: 175 | mode = 1000; 176 | break; 177 | case 6: 178 | mode = 1001; 179 | break; 180 | } 181 | ReaderWrapper.ReaderParameters.ModeIndex = mode; 182 | } 183 | 184 | private void comboBox_SearchMode_SelectedIndexChanged(object sender, EventArgs e) 185 | { 186 | var type = ENUM_ImpinjInventorySearchType.Dual_Target; 187 | switch (comboBox_SearchMode.SelectedIndex) 188 | { 189 | case 0: 190 | type = ENUM_ImpinjInventorySearchType.No_Target; 191 | break; 192 | case 1: 193 | type = ENUM_ImpinjInventorySearchType.Reader_Selected; 194 | break; 195 | case 2: 196 | type = ENUM_ImpinjInventorySearchType.Dual_Target; 197 | break; 198 | case 3: 199 | type = ENUM_ImpinjInventorySearchType.Dual_Target_with_BtoASelect; 200 | break; 201 | case 4: 202 | type = ENUM_ImpinjInventorySearchType.Single_Target; 203 | break; 204 | case 5: 205 | type = ENUM_ImpinjInventorySearchType.Single_Target_BtoA; 206 | break; 207 | case 6: 208 | type = ENUM_ImpinjInventorySearchType.Single_Target_With_Suppression; 209 | break; 210 | } 211 | ReaderWrapper.ReaderParameters.SearchType = type; 212 | } 213 | } // end of settings window 214 | } 215 | -------------------------------------------------------------------------------- /TagReader/TagReader/SettingsWindow.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 125 | 126 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAEZcAABGXAAAAAAAAAAA 127 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 128 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 129 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 130 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 131 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 132 | AAAAAAAAAAAAAMfKxwDHyschx8rHXcfKx1/HysdNx8rHB8fKxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 133 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 134 | AAAAAAAAAAAAAAAAAADHyscAx8rHAMfKx3LHysf/x8rH/8fKx+DHyscgx8rHAAAAAAAAAAAAAAAAAAAA 135 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMfK 136 | xwDHyscBx8rHAcfKxwAAAAAAAAAAAMfKxwDHyscEx8rHp8fKx//Hysf/x8rH+MfKx1PHyscAx8rHAAAA 137 | AADHyscAx8rHAMfKxwHHyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 138 | AADHyscAx8rHBcfKx2fHysddx8rHB8fKxwDHyscAx8rHAMfKx0bHysfqx8rH/8fKx//Hysf/x8rHxsfK 139 | xyrHyscAx8rHAMfKxwbHysdVx8rHb8fKxwnHyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 140 | AAAAAAAAx8rHAMfKxwbHysdyx8rH9MfKx/THysedx8rHSMfKxzvHysdzx8rH3sfKx//Hysf/x8rH/8fK 141 | x//Hysf/x8rH2cfKx47Hysd5x8rHqsfKx/LHysf4x8rHgMfKxwnHyscAAAAAAAAAAAAAAAAAAAAAAAAA 142 | AAAAAAAAAAAAAAAAAADHyscAx8rHLsfKx+XHysf/x8rH/8fKx//Hysf4x8rH9MfKx/3Hysf/x8rH/8fK 143 | x//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysftx8rHO8fKxwAAAAAAAAAAAAAA 144 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAMfKxwDHyscGx8rHl8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fK 145 | x//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx6fHyscLx8rHAAAA 146 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMfKxwDHyscwx8rH6MfKx//Hysf/x8rH/8fK 147 | x//Hysf/x8rH/8fKx//Iy8j/yMvJ/8jLyP/Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysfxx8rHPsfK 148 | xwDHyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAx8rHAMfKxxHHysfPx8rH/8fK 149 | x//Hysf/x8rH/8fKx//Iy8j/w8TB/7q2sv+3sq3/vby3/8bIxf/Iy8j/x8rH/8fKx//Hysf/x8rH/8fK 150 | x9zHyscbx8rHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHIcfK 151 | x9/Hysf/x8rH/8fKx//Hysf/xsnG/6+nof+ReXD/hWhd/4NlWv+IbGL/m4mB/7y6tf/Iy8j/x8rH/8fK 152 | x//Hysf/x8rH6cfKxy7HyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAx8rHAMfK 153 | xwPHysd8x8rH/cfKx//Hysf/x8rH/8fKx/+qn5n/g2Va/39eU/+AYFT/gGBV/39fVP9/XlP/jnVs/7y6 154 | tf/Iy8j/x8rH/8fKx//Hysf/x8rHjcfKxwbHyscAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHB8fK 155 | xx3Hysc7x8rHjcfKx/HHysf/x8rH/8fKx//Iy8j/u7m0/4hsYv9/X1T/gGBV74FhVpyBYld8gWFWwIBg 156 | Vf1/XlP/m4mB/8bIxf/Hysf/x8rH/8fKx//Hysf1x8rHl8fKxz/Hyscfx8rHB8fKxwAAAAAAAAAAAMfK 157 | xwDHysdNx8rH3cfKx/LHysf+x8rH/8fKx//Hysf/x8rH/8jMyf+onJX/gF9U/4BgVf2BYld0i3FnAoJj 158 | WACDZVoZgWFWwH9fVP+IbGL/vby3/8jLyP/Hysf/x8rH/8fKx//Hysf/x8rH9MfKx9/HysdNx8rHAAAA 159 | AAAAAAAAx8rHAMfKx17Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/yMvI/5+Oh/9/XlP/gGBV64Jj 160 | WSyCY1gAjnVrAH5dUgCBYld+gGBV/4NlWv+3sq3/yMvJ/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fK 161 | x17HyscAAAAAAAAAAADHyscAx8rHXMfKx/7Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Iy8j/o5SN/39e 162 | U/+AYFX1gmNYSIBhVgCFZ1wAim5kA4FhVpyAYFT/hWhd/7q2sv/Iy8j/x8rH/8fKx//Hysf/x8rH/8fK 163 | x//Hysf+x8rHXcfKxwAAAAAAAAAAAMfKxwDHyscex8rHbcfKx6HHysfmx8rH/8fKx//Hysf/x8rH/8jL 164 | yf+zrKf/g2RZ/4BgVf+BYVbIgmNYR4JkWSqBYld0gGBV739eU/+ReXD/w8TB/8fKx//Hysf/x8rH/8fK 165 | x//Hysfqx8rHp8fKx3HHyscgx8rHAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHAsfKxzvHysfVx8rH/8fK 166 | x//Hysf/x8rH/8TGw/+ahn7/f15T/4BgVf+AYFX0gGBV64BgVft/X1T/g2Va/6+nof/Iy8j/x8rH/8fK 167 | x//Hysf/x8rH38fKx0bHyscDx8rHAMfKxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHAMfK 168 | x2PHysf8x8rH/8fKx//Hysf/yMvI/8C/u/+ahn7/g2RZ/39eU/9/XlP/gF9U/4hsYv+qn5n/xsnG/8fK 169 | x//Hysf/x8rH/8fKx//Hysd0x8rHAMfKxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 170 | AADHyscAx8rHLsfKx+zHysf/x8rH/8fKx//Hysf/yMvI/8TGw/+zrKf/o5SN/5+Oh/+onJX/u7m0/8fK 171 | x//Hysf/x8rH/8fKx//Hysf/x8rH9MfKxz3HyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 172 | AAAAAAAAAAAAAMfKxwDHysc6x8rH8cfKx//Hysf/x8rH/8fKx//Hysf/x8rH/8jLyf/Iy8j/yMvI/8jM 173 | yf/Iy8j/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf4x8rHScfKxwDHyscAAAAAAAAAAAAAAAAAAAAAAAAA 174 | AAAAAAAAAAAAAAAAAADHyscAx8rHA8fKx43Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fK 175 | x//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysedx8rHBsfKxwAAAAAAAAAAAAAA 176 | AAAAAAAAAAAAAAAAAAAAAAAAx8rHAMfKxwDHysdOx8rH78fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fK 177 | x//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx//Hysf/x8rH/8fKx/XHysddx8rHAMfK 178 | xwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHAMfKx1nHysfwx8rH/8fKx//Hysffx8rHpcfK 179 | x57HysfSx8rH/cfKx//Hysf/x8rH/8fKx//Hysf/x8rH/MfKx9/HysfOx8rH6MfKx/7Hysf/x8rH9MfK 180 | x2fHyscAx8rHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHAsfKx2XHysfmx8rHocfK 181 | xynHyscCx8rHAMfKxxrHysecx8rH/sfKx//Hysf/x8rH/8fKx/HHysd8x8rHIMfKxxDHyscvx8rHmMfK 182 | x+fHysdyx8rHBcfKxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHBcfK 183 | xy7HyscLx8rHAAAAAAAAAAAAx8rHAMfKxx3HysfUx8rH/8fKx//Hysf/x8rHjcfKxwPHyscAAAAAAMfK 184 | xwDHyscIx8rHLsfKxwjHyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 185 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADHyscAx8rHAMfKx5vHysf/x8rH/8fKx/LHysc8x8rHAAAA 186 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 187 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMfKxwDHyscAx8rHbsfKx//Hysf/x8rH3cfK 188 | xx3HyscAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 189 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMfKxwDHyscfx8rHXcfK 190 | x1/HysdNx8rHB8fKxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 191 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 192 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 193 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 194 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 195 | AAAAAAAAAAAAAAAAAAAAAAAA/////////////B////wf//54Hn/8OAw/+AAAH/gAAB/4AAAf/AAAP/wA 196 | AD/8AAA/+AAAH8AAAAPAAIADwAHAA8ABgAPAAAAD8AAAD/wAAD/8AAA//AAAP/gAAB/4AAAf+AAAH/gA 197 | AB/8eA4///gf///8H////B////////////8= 198 | 199 | 200 | -------------------------------------------------------------------------------- /TagReader/TagReader/TagReader.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B14817B5-859B-4AF1-A656-6276418265A7} 8 | WinExe 9 | Properties 10 | TagReader 11 | TagReader 12 | v4.0 13 | 512 14 | publish\ 15 | true 16 | Disk 17 | false 18 | Foreground 19 | 7 20 | Days 21 | false 22 | false 23 | true 24 | 0 25 | 1.0.0.%2a 26 | false 27 | false 28 | true 29 | 30 | 31 | AnyCPU 32 | true 33 | full 34 | false 35 | bin\Debug\ 36 | DEBUG;TRACE 37 | prompt 38 | 4 39 | 40 | 41 | AnyCPU 42 | pdbonly 43 | true 44 | bin\Release\ 45 | TRACE 46 | prompt 47 | 4 48 | 49 | 50 | 51 | lib\LLRP.dll 52 | 53 | 54 | lib\LLRP.Impinj.dll 55 | 56 | 57 | lib\log4net.dll 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Form 80 | 81 | 82 | AboutBox.cs 83 | 84 | 85 | 86 | Form 87 | 88 | 89 | MainWindow.cs 90 | 91 | 92 | 93 | Form 94 | 95 | 96 | ProgressWindow.cs 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | Form 107 | 108 | 109 | SettingsWindow.cs 110 | 111 | 112 | AboutBox.cs 113 | 114 | 115 | MainWindow.cs 116 | 117 | 118 | ProgressWindow.cs 119 | 120 | 121 | ResXFileCodeGenerator 122 | Resources.Designer.cs 123 | Designer 124 | 125 | 126 | True 127 | Resources.resx 128 | True 129 | 130 | 131 | SettingsWindow.cs 132 | 133 | 134 | 135 | SettingsSingleFileGenerator 136 | Settings.Designer.cs 137 | 138 | 139 | True 140 | Settings.settings 141 | True 142 | 143 | 144 | 145 | 146 | False 147 | Microsoft .NET Framework 4 %28x86 and x64%29 148 | true 149 | 150 | 151 | False 152 | .NET Framework 3.5 SP1 Client Profile 153 | false 154 | 155 | 156 | False 157 | .NET Framework 3.5 SP1 158 | false 159 | 160 | 161 | False 162 | Windows Installer 4.5 163 | true 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 186 | -------------------------------------------------------------------------------- /TagReader/TagReader/TagReader.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | CSharp60 -------------------------------------------------------------------------------- /TagReader/TagReader/lib/LLRP.Impinj.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/lib/LLRP.Impinj.dll -------------------------------------------------------------------------------- /TagReader/TagReader/lib/LLRP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/lib/LLRP.dll -------------------------------------------------------------------------------- /TagReader/TagReader/lib/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dorisoy/RFID-Reader/a5b3d89b308d005397479d3d230b0228eddf9f09/TagReader/TagReader/lib/log4net.dll --------------------------------------------------------------------------------