Commit 2f28bb24 顾剑亮

debug

1 个父辈 078036de
正在显示 87 个修改的文件 包含 600 行增加110 行删除
此文件类型无法预览
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asa.RFID
{
/// <summary>
/// 读取所有RFID
/// </summary>
public class ReadAll2 : IReadAll
{
private HiStation[] _device;
private Dictionary<string, string> _id; //RFID编号
private string _logName;
public event IReadAll.ReceivedEvent Received;
public event IReadAll.ReceiveBufferEvent ReceiveBuffer;
/// <summary>
/// 读取所有RFID
/// </summary>
/// <param name="logName">日志名称</param>
public ReadAll2(string logName = "HFReader")
{
_logName = logName;
_id = new Dictionary<string, string>();
if (Common.log == null)
Common.log = log4net.LogManager.GetLogger(logName);
}
public void Start(int port)
{
}
/// <summary>
/// 开启
/// </summary>
/// <param name="ip"></param>
public void Start(string[] ip)
{
try
{
_id.Clear();
_device = new HiStation[ip.Length];
for (int i = 0; i < _device.Length; i++)
{
_id.Add(ip[i], "000");
_device[i] = new HiStation(_logName) { IP = ip[i] };
_device[i].Connected += ReadAll_Connected;
_device[i].Received += ReadAll_Received;
_device[i].Open();
}
Common.log.Info("Server Start");
}
catch (Exception ex)
{
Common.log.Error("Start", ex);
}
}
/// <summary>
/// 停止
/// </summary>
public void Stop()
{
if (_device != null)
{
for (int i = 0; i < _device.Length; i++)
{
try
{
_device[i].TriggerMode(false);
System.Threading.Thread.Sleep(50);
_device[i].Close();
}
catch (Exception ex)
{
Common.log.Error("Stop", ex);
}
}
}
_device = null;
Common.log.Info("Server Stop");
}
/// <summary>
/// 读取ID号
/// </summary>
/// <param name="ip"></param>
/// <returns></returns>
public string Read(string ip)
{
if (_id.TryGetValue(ip, out string value))
{
Common.log.Info("[" + ip + "]Read " + value);
return value;
}
else
{
Common.log.Info("[" + ip + "]Read 没有找到");
return "000";
}
}
/// <summary>
/// 清除缓存
/// </summary>
/// <param name="ip"></param>
public void Clear(string ip)
{
if (_id.ContainsKey(ip))
{
_id[ip] = "000";
Common.log.Info("[" + ip + "]Clear");
}
else
{
Common.log.Info("[" + ip + "]Clear 没有找到");
}
}
private void ReadAll_Connected(string ip)
{
int index = -1;
foreach (var ss in _id.Keys)
{
index++;
if (ss == ip)
break;
}
if (index != -1)
_device[index].TriggerMode(true);
}
private void ReadAll_Received(string ip, string uid, string data)
{
Common.log.Debug("Received IP=" + ip + " uid=" + uid + " data=" + data);
if (_id[ip] == data)
{
}
else
{
_id[ip] = data;
Received?.Invoke(ip, data);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asa.RFID
{
public static class Common
{
public static log4net.ILog log = null;
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("RFID-HiStation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RFID-HiStation")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("4d5996f8-7206-480d-834a-be1db5fb05b2")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4D5996F8-7206-480D-834A-BE1DB5FB05B2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asa.RFID</RootNamespace>
<AssemblyName>Asa.RFID.HiStation</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Class2.cs" />
<Compile Include="Class3.cs" />
<Compile Include="Common.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RFID_Interface\RFID_Interface.csproj">
<Project>{e7a36c72-093b-428e-a4e3-4739ee0bf4cc}</Project>
<Name>RFID_Interface</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
此文件类型无法预览
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.pdb
D:\Neotel\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.dll
D:\Neotel\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.pdb
D:\Neotel\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.dll
D:\Neotel\RFID\RFID-HiStation\bin\Debug\log4net.dll
D:\Neotel\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.pdb
D:\Neotel\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csprojAssemblyReference.cache
D:\Neotel\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CoreCompileInputs.cache
D:\Neotel\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CopyComplete
D:\Neotel\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.dll
D:\Neotel\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.pdb
C:\Neotel\Program\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.dll
C:\Neotel\Program\RFID\RFID-HiStation\bin\Debug\Asa.RFID.HiStation.pdb
C:\Neotel\Program\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.dll
C:\Neotel\Program\RFID\RFID-HiStation\bin\Debug\Asa.RFID.IReadAll.pdb
C:\Neotel\Program\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csprojAssemblyReference.cache
C:\Neotel\Program\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CoreCompileInputs.cache
C:\Neotel\Program\RFID\RFID-HiStation\obj\Debug\RFID-HiStation.csproj.CopyComplete
C:\Neotel\Program\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.dll
C:\Neotel\Program\RFID\RFID-HiStation\obj\Debug\Asa.RFID.HiStation.pdb
......@@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFID_HFReader", "RFID_HFRea
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFID_HFReader_Debug", "RFID_HFReader_Debug\RFID_HFReader_Debug.csproj", "{5C55663B-DBDA-490B-A80F-0ABB173AEF88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFID_Interface", "RFID_Interface\RFID_Interface.csproj", "{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RFID-HiStation", "RFID-HiStation\RFID-HiStation.csproj", "{4D5996F8-7206-480D-834A-BE1DB5FB05B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -51,6 +55,22 @@ Global
{5C55663B-DBDA-490B-A80F-0ABB173AEF88}.Release|Any CPU.Build.0 = Release|Any CPU
{5C55663B-DBDA-490B-A80F-0ABB173AEF88}.Release|x86.ActiveCfg = Release|x86
{5C55663B-DBDA-490B-A80F-0ABB173AEF88}.Release|x86.Build.0 = Release|x86
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Debug|x86.ActiveCfg = Debug|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Debug|x86.Build.0 = Debug|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Release|Any CPU.Build.0 = Release|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Release|x86.ActiveCfg = Release|Any CPU
{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}.Release|x86.Build.0 = Release|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Debug|x86.Build.0 = Debug|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Release|Any CPU.Build.0 = Release|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Release|x86.ActiveCfg = Release|Any CPU
{4D5996F8-7206-480D-834A-BE1DB5FB05B2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -12,28 +12,28 @@ namespace Asa.RFID
/// <summary>
/// 读取所有RFID
/// </summary>
public class ReadAll
public class ReadAll1 : IReadAll
{
/// <summary>
/// 接收数据包事件
/// </summary>
/// <param name="ip"></param>
/// <param name="id"></param>
public delegate void ReceivedEvent(string ip, string id);
/// <summary>
/// 接收数据包
/// </summary>
public event ReceivedEvent Received;
/// <summary>
/// 接收网卡缓存事件
/// </summary>
/// <param name="ip"></param>
/// <param name="buffer"></param>
public delegate void ReceiveBufferEvent(string ip, byte[] buffer);
/// <summary>
/// 接收网卡缓存
/// </summary>
public event ReceiveBufferEvent ReceiveBuffer;
///// <summary>
///// 接收数据包事件
///// </summary>
///// <param name="ip"></param>
///// <param name="id"></param>
//public delegate void ReceivedEvent(string ip, string id);
///// <summary>
///// 接收数据包
///// </summary>
//public event ReceivedEvent Received;
///// <summary>
///// 接收网卡缓存事件
///// </summary>
///// <param name="ip"></param>
///// <param name="buffer"></param>
//public delegate void ReceiveBufferEvent(string ip, byte[] buffer);
///// <summary>
///// 接收网卡缓存
///// </summary>
//public event ReceiveBufferEvent ReceiveBuffer;
......@@ -42,22 +42,25 @@ namespace Asa.RFID
private List<Client> _client; //所有客户端
private Thread tListenClient; //监听客户端连接
private Dictionary<string, string> _id; //RFID编号
private log4net.ILog log;
private log4net.ILog log = null;
private const int CLIENT_SLEEP = 10;
public event IReadAll.ReceivedEvent Received;
public event IReadAll.ReceiveBufferEvent ReceiveBuffer;
/// <summary>
/// 读取所有RFID
/// </summary>
/// <param name="logName">日志名称</param>
public ReadAll(string logName)
public ReadAll1(string logName)
{
_id = new Dictionary<string, string>();
log = log4net.LogManager.GetLogger(logName);
if (log == null)
log = log4net.LogManager.GetLogger(logName);
}
/// <summary>
/// 开启
/// </summary>
......@@ -84,6 +87,11 @@ namespace Asa.RFID
}
}
public void Start(string[] ip)
{
}
/// <summary>
/// 停止
/// </summary>
......@@ -145,6 +153,12 @@ namespace Asa.RFID
private void ClientClose(int idx)
{
try
......@@ -230,8 +244,9 @@ namespace Asa.RFID
int count = client.Socket.Receive(buff);
byte[] temp = new byte[count];
Array.Copy(buff, 0, temp, 0, count);
receive.AddRange(temp);
log.Debug(" Receive[" + client.IP + "]: " + HexBuff(temp));
log.Debug("Receive[" + client.IP + "]: " + HexBuff(temp));
Task.Run(() => ReceiveBuffer?.Invoke(client.IP, temp));
do
......@@ -240,8 +255,8 @@ namespace Asa.RFID
int idx = receive.FindIndex(n => n == 0x5A);
if (idx == -1)
{
log.Debug("清除缓存[" + client.IP + "]: " + HexBuff(receive));
receive.Clear();
log.Debug(client.IP + " 整个缓存没有找到包头0x5A,清除缓存。");
break;
}
......@@ -256,11 +271,16 @@ namespace Asa.RFID
receive.CopyTo(idx, arr, 0, 4);
receive.CopyTo(idx + 5, arr, 4, 4);
log.Info("Packet[" + client.IP + "]: " + HexBuff(arr));
Task.Run(() => TriggerEvent(client.IP, arr));
TriggerEvent(client.IP, arr);
//2020年6月5日
//Task.Run(() => TriggerEvent(client.IP, arr));
}
else
{
log.Debug(client.IP + " 指定字节没有包尾," + HexBuff(receive, idx, 9));
log.Debug("没有包尾[" + client.IP + "]: " + HexBuff(receive));
}
receive.RemoveRange(0, len);
} while (true);
......@@ -287,12 +307,18 @@ namespace Asa.RFID
s = (char)buff[1] + buff[2].ToString();
}
if (!_id[ip].Equals(s))
//添加到缓存
if (_id[ip].Equals(s))
{
log.Debug("相同ID[" + ip + "]: " + s);
}
else
{
_id[ip] = s;
log.Info("Trigger " + ip + " -> " + s);
Received?.Invoke(ip, s);
log.Info("Trigger[" + ip + "]: " + s);
Task.Run(() => Received?.Invoke(ip, s));
}
}
private string HexBuff(byte[] buff)
......@@ -305,13 +331,13 @@ namespace Asa.RFID
return s;
}
private string HexBuff(List<byte> buff, int start, int len)
private string HexBuff(List<byte> buff)
{
string s = "";
if (buff == null) return s;
for (int i = 0; i < len; i++)
s += buff[i + start].ToString("X2") + " ";
for (int i = 0; i < buff.Count; i++)
s += buff[i].ToString("X2") + " ";
return s;
}
......@@ -325,7 +351,5 @@ namespace Asa.RFID
}
}
}
......@@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asa.RFID</RootNamespace>
<AssemblyName>Asa.RFID</AssemblyName>
<AssemblyName>Asa.RFID.HFRead</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
......@@ -21,7 +21,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Asa.RFID.xml</DocumentationFile>
<DocumentationFile>bin\Debug\Asa.RFID.HFRead.xml</DocumentationFile>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -30,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
......@@ -45,12 +47,18 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ReadAll.cs" />
<Compile Include="HFReader1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RFID_Interface\RFID_Interface.csproj">
<Project>{e7a36c72-093b-428e-a4e3-4739ee0bf4cc}</Project>
<Name>RFID_Interface</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetFileName)"
copy "$(TargetDir)$(TargetName).xml" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetName).xml"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.RFID</name>
<name>Asa.RFID.HFRead</name>
</assembly>
<members>
<member name="T:Asa.RFID.ReadAll">
<member name="T:Asa.RFID.ReadAll1">
<summary>
读取所有RFID
</summary>
</member>
<member name="T:Asa.RFID.ReadAll.ReceivedEvent">
<summary>
接收数据包事件
</summary>
<param name="ip"></param>
<param name="id"></param>
</member>
<member name="E:Asa.RFID.ReadAll.Received">
<summary>
接收数据包
</summary>
</member>
<member name="T:Asa.RFID.ReadAll.ReceiveBufferEvent">
<summary>
接收网卡缓存事件
</summary>
<param name="ip"></param>
<param name="buffer"></param>
</member>
<member name="E:Asa.RFID.ReadAll.ReceiveBuffer">
<summary>
接收网卡缓存
</summary>
</member>
<member name="M:Asa.RFID.ReadAll.#ctor(System.String)">
<member name="M:Asa.RFID.ReadAll1.#ctor(System.String)">
<summary>
读取所有RFID
</summary>
<param name="logName">日志名称</param>
</member>
<member name="M:Asa.RFID.ReadAll.Start(System.Int32)">
<member name="M:Asa.RFID.ReadAll1.Start(System.Int32)">
<summary>
开启
</summary>
<param name="port">RFID设备的端口</param>
</member>
<member name="M:Asa.RFID.ReadAll.Stop">
<member name="M:Asa.RFID.ReadAll1.Stop">
<summary>
停止
</summary>
</member>
<member name="M:Asa.RFID.ReadAll.Read(System.String)">
<member name="M:Asa.RFID.ReadAll1.Read(System.String)">
<summary>
读取ID号
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReadAll.Clear(System.String)">
<member name="M:Asa.RFID.ReadAll1.Clear(System.String)">
<summary>
清除缓存
</summary>
......
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
此文件类型无法预览
此文件类型无法预览
69c039e606bb9165e14128328c07bf92dd159bcc
3bf2123f61e462f98293a71c3705cf62ab1802c0
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\RFID.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\Asa.RFID.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\Asa.RFID.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\RFID.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\RFID.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.HFRead.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.HFRead.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.HFRead.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.IReadAll.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\bin\Debug\Asa.RFID.IReadAll.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\Asa.RFID.HFRead.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID\obj\Debug\Asa.RFID.HFRead.pdb
......@@ -12,7 +12,7 @@ namespace RFID_Debug
{
public partial class Form1 : Form
{
private Asa.RFID.ReadAll read;
private Asa.RFID.HFReader1 read;
public Form1()
{
......@@ -31,7 +31,7 @@ namespace RFID_Debug
private void Form1_Load(object sender, EventArgs e)
{
read = new Asa.RFID.ReadAll("RollingLogFileAppender");
read = new Asa.RFID.HFReader1("RollingLogFileAppender");
//read.Received += Read_Received;
read.ReceiveBuffer += Read_ReceiveBuffer;
}
......
......@@ -23,6 +23,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -32,6 +33,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
......@@ -92,6 +94,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetFileName)"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
dae59b7058d208e5ffe3231183ee4d194d58f1db
59165c7d8d04c21b0667232e63d5cf2ca22cf77c
......@@ -12,4 +12,3 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Debug\obj\Debug\RFID_
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Debug\bin\Debug\Asa.RFID.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Debug\bin\Debug\Asa.RFID.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Debug\bin\Debug\Asa.RFID.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Debug\bin\Debug\log4net.dll
......@@ -112,8 +112,8 @@ namespace Asa.RFID
if (autoScan)
AutoScanRead();
else
FindIDMode();
//else
// FindIDMode();
}
/// <summary>
......
......@@ -22,6 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Asa.RFID.HFReader.xml</DocumentationFile>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -30,6 +31,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
......@@ -38,7 +40,7 @@
<DocumentationFile>bin\Debug\Asa.RFID.xml</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
......@@ -48,7 +50,7 @@
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
......@@ -75,7 +77,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetFileName)"
copy "$(TargetDir)$(TargetName).xml" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetName).xml"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
41fe085d0abc68030e109433fbfa5b3ef359a6da
a40ac34a172bfd483e269dfe9e4a4ebea403c9dc
......@@ -9,7 +9,6 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_old\obj\Debug\Asa.RFI
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\bin\Debug\Asa.RFID.HFReader.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\bin\Debug\Asa.RFID.HFReader.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\bin\Debug\Asa.RFID.HFReader.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\bin\Debug\HFReader9CSharp.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\obj\Debug\RFID_HFReader.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\obj\Debug\RFID_HFReader.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader\obj\Debug\Asa.RFID.HFReader.dll
......
......@@ -38,6 +38,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -47,6 +48,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
......@@ -54,7 +56,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
......@@ -64,12 +66,15 @@
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
......@@ -146,6 +151,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(TargetPath)" "D:\OneDrive - 上海挚锦科技有限公司\DLL\RFID\$(TargetFileName)"</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
</configuration>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
b644603fc31ffca78a5b7897e8dfe94eeb64a158
3912e82c529aa47bcfcd4a34281eddb72e8ecf2f
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.FrmMain.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.Properties.Resources.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.UserControl1.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\RFID_HFReader_Debug.exe.config
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\RFID_HFReader_Debug.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\RFID_HFReader_Debug.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\Asa.RFID.HFReader.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\HFReader9CSharp.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\Asa.RFID.HFReader.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\bin\Debug\Asa.RFID.HFReader.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.FrmMain.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.Properties.Resources.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_Debug.UserControl1.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_HFReader_Debug\obj\Debug\RFID_HFReader_Debug.pdb
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Asa.RFID
{
public interface IReadAll
{
public delegate void ReceivedEvent(string ip, string id);
public event ReceivedEvent Received;
public delegate void ReceiveBufferEvent(string ip, byte[] buffer);
public event ReceiveBufferEvent ReceiveBuffer;
public void Start(int port);
public void Start(string[] ip);
public void Stop();
public string Read(string ip);
public void Clear(string ip);
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("RFID_Interface")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RFID_Interface")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("e7a36c72-093b-428e-a4e3-4739ee0bf4cc")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E7A36C72-093B-428E-A4E3-4739EE0BF4CC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asa.RFID</RootNamespace>
<AssemblyName>Asa.RFID.IReadAll</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Interface.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Interface\obj\Debug\RFID_Interface.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.pdb
D:\Neotel\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.dll
D:\Neotel\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.pdb
D:\Neotel\RFID\RFID_Interface\obj\Debug\RFID_Interface.csprojAssemblyReference.cache
D:\Neotel\RFID\RFID_Interface\obj\Debug\RFID_Interface.csproj.CoreCompileInputs.cache
D:\Neotel\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.dll
D:\Neotel\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.pdb
C:\Neotel\Program\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.dll
C:\Neotel\Program\RFID\RFID_Interface\bin\Debug\Asa.RFID.IReadAll.pdb
C:\Neotel\Program\RFID\RFID_Interface\obj\Debug\RFID_Interface.csprojAssemblyReference.cache
C:\Neotel\Program\RFID\RFID_Interface\obj\Debug\RFID_Interface.csproj.CoreCompileInputs.cache
C:\Neotel\Program\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.dll
C:\Neotel\Program\RFID\RFID_Interface\obj\Debug\Asa.RFID.IReadAll.pdb
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!