Commit 20ecde30 刘韬

1

1 个父辈 1b91aab0
此文件类型无法预览
......@@ -441,12 +441,52 @@ namespace Asa.RFID
return true;
}
public bool WriteEPC(byte[] data)
{
_dataMode = false;
bool rtn = false;
Write(0x227, data);
if (Wait())
{
if (_fullCmd[7] == 0x10)
rtn = true;
//else
// Common.log.Info("0x10功能码不匹配");
}
return rtn;
}
public bool ReadEPC(out byte[] value)
{
_dataMode = false;
bool rtn = false;
value = null;
Read(0x0227, 6);
//Read(0x0245, 6);//TID
if (Wait())
{
if (_fullCmd[7] == 0x03)
{
var readlen = _fullCmd.Count() - 9;
//value = HexBuff(_fullCmd.GetRange(9, readlen).ToArray());
value = _fullCmd.GetRange(9, readlen).ToArray();
rtn = true;
}
else
{
//Common.log.Info("0x03功能码不匹配");
}
}
return rtn;
}
/// <summary>
/// 16进制转换
/// </summary>
/// <param name="buff"></param>
/// <returns></returns>
private string HexBuff(byte[] buff)
public string HexBuff(byte[] buff)
{
string s = "";
if (buff == null) return s;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!