|
|
@ -200,7 +200,7 @@ public class RfidReadWriteTool
|
|
|
|
|
|
|
|
|
|
|
|
#endregion 结构体
|
|
|
|
#endregion 结构体
|
|
|
|
|
|
|
|
|
|
|
|
public RfidReadModel RfidReadModel;
|
|
|
|
public RfidReadModel? RfidReadModel;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// RFID读写器连接
|
|
|
|
/// RFID读写器连接
|
|
|
@ -254,27 +254,29 @@ public class RfidReadWriteTool
|
|
|
|
|
|
|
|
|
|
|
|
strTemps = strResult.Split(';');
|
|
|
|
strTemps = strResult.Split(';');
|
|
|
|
|
|
|
|
|
|
|
|
if (strTemps.Length == 4)
|
|
|
|
if (strTemps.Length >= 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (strTemps[3] != "")
|
|
|
|
if (strTemps[1] != "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] bytesVelNo = ToByteByHexStr(strTemps[3]);
|
|
|
|
byte[] bytesVelNo = ToByteByHexStr(strTemps[1]);
|
|
|
|
Encoding gbEcoding = Encoding.GetEncoding("gb2312");
|
|
|
|
Encoding gbEcoding = Encoding.GetEncoding("gb2312");
|
|
|
|
strVelNo = gbEcoding.GetString(bytesVelNo);
|
|
|
|
strVelNo = gbEcoding.GetString(bytesVelNo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
strResult = "VIN码:" + strTemps[0] + ";车型号:" + strTemps[1] + ";车辆MAC:" + strTemps[2] + ";车牌号:" + strVelNo;
|
|
|
|
if (strTemps.Length > 0)
|
|
|
|
SetRecvMsgEvent(strResult);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RfidReadModel = new RfidReadModel()
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Result = 1,
|
|
|
|
strResult = "VIN码:" + strTemps[0] + ";车牌号:" + strVelNo;
|
|
|
|
VelVin = strTemps[0],
|
|
|
|
SetRecvMsgEvent(strResult);
|
|
|
|
VelMac = strTemps[2],
|
|
|
|
|
|
|
|
VelNo = strTemps[3],
|
|
|
|
RfidReadModel = new RfidReadModel()
|
|
|
|
};
|
|
|
|
{
|
|
|
|
|
|
|
|
Result = 1,
|
|
|
|
|
|
|
|
VelVin = strTemps[0],
|
|
|
|
|
|
|
|
VelNo = strVelNo,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -383,6 +385,7 @@ public class RfidReadWriteTool
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
RfidReadModel = null;
|
|
|
|
if (_rfid_reader != null)
|
|
|
|
if (_rfid_reader != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_rfid_reader.Inventry_stop();
|
|
|
|
_rfid_reader.Inventry_stop();
|
|
|
|