Commit 82abb114 LN

1

1 个父辈 19729b9d
......@@ -9,31 +9,11 @@
RFID读卡器
</summary>
</member>
<member name="E:Asa.RFID.Reader.Data_Received">
<summary>
自动扫描接收到的数据
</summary>
</member>
<member name="M:Asa.RFID.Reader.#ctor">
<summary>
RFID读卡器
</summary>
</member>
<member name="P:Asa.RFID.Reader.LocalIP">
<summary>
本地IP地址,用于查找或修改远程IP
</summary>
</member>
<member name="P:Asa.RFID.Reader.RemoteIP">
<summary>
远程IP地址
</summary>
</member>
<member name="P:Asa.RFID.Reader.RemoteIndex">
<summary>
远程设备索引,用于修改远程IP
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsConn">
<summary>
是否连接
......@@ -59,10 +39,12 @@
ID号码
</summary>
</member>
<member name="M:Asa.RFID.Reader.Connect">
<member name="M:Asa.RFID.Reader.Connect(System.String,System.Boolean)">
<summary>
连接
</summary>
<param name="ip">设备IP地址</param>
<param name="autoScan">自动扫描</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Close">
......@@ -72,24 +54,10 @@
</member>
<member name="M:Asa.RFID.Reader.FindRFID">
<summary>
查找电子标签
查找电子标签,扫描模式不能使用
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.AutoScan(System.Boolean,System.Int32)">
<summary>
自动读取扫描,使用查找模式
</summary>
<param name="open">扫描模式开启,true扫描</param>
<param name="time">间隔时间</param>
</member>
<member name="M:Asa.RFID.Reader.AutoScan(System.Boolean)">
<summary>
自动读取扫描,使用扫描模式,扫描模式只读
</summary>
<param name="open">扫描模式开启,true扫描</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Read">
<summary>
读取电子标签
......@@ -106,94 +74,200 @@
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[])">
<summary>
写入数据到电子标签
写入数据到电子标签,扫描模式不能使用
</summary>
<param name="buff">数据,必须小于等于112字节</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[],System.Int32)">
<summary>
写入数据到电子标签
写入数据到电子标签,扫描模式不能使用
</summary>
<param name="buff"></param>
<param name="start"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.FindIP">
<member name="M:Asa.RFID.Reader.Receive">
<summary>
查找IP地址,需要设置LocalIP
自动扫描接受数据事件
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID">
<summary>
读取电子标签内所有数据
</summary>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID(System.Int32)">
<summary>
读取电子标签指定块
</summary>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.ModifyIP(System.String)">
<member name="M:Asa.RFID.Reader.WriteRFID(System.Int32)">
<summary>
修改IP地址
写入指定块数据到电子标签
</summary>
<param name="IP"></param>
<param name="num"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.GetLocalIP">
<member name="M:Asa.RFID.Reader.InitBuff(System.Int32,System.Int32)">
<summary>
获取本地IPv4地址
初始buff为0
</summary>
<param name="start"></param>
<param name="len"></param>
</member>
<member name="T:Asa.RFID.Reader2">
<summary>
RFID读卡器
</summary>
</member>
<member name="M:Asa.RFID.Reader2.#ctor">
<summary>
RFID读卡器
</summary>
</member>
<member name="M:Asa.RFID.Reader2.IsConn(System.Int32)">
<summary>
是否连接
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Receive(System.Object)">
<member name="M:Asa.RFID.Reader2.AddIP(System.String[])">
<summary>
自动扫描接受数据事件
添加设备IP地址
</summary>
<param name="param"></param>
<param name="ip"></param>
</member>
<member name="M:Asa.RFID.Reader.Receive2">
<member name="M:Asa.RFID.Reader2.Connect(System.Boolean)">
<summary>
自动扫描接受数据事件
连接
</summary>
<param name="autoScan">自动扫描</param>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID">
<member name="M:Asa.RFID.Reader2.Connect(System.Int32,System.Boolean)">
<summary>
读取电子标签内所有数据
连接
</summary>
<param name="index"></param>
<param name="autoScan">自动扫描</param>
</member>
<member name="M:Asa.RFID.Reader.ReadRFID(System.Int32)">
<member name="M:Asa.RFID.Reader2.Close">
<summary>
读取电子标签指定块
关闭所有
</summary>
<param name="num"></param>
</member>
<member name="M:Asa.RFID.Reader2.Close(System.Int32)">
<summary>
关闭
</summary>
<param name="index"></param>
</member>
<member name="M:Asa.RFID.Reader2.FindRFID(System.Int32)">
<summary>
查找电子标签
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.WriteRFID(System.Int32)">
<member name="M:Asa.RFID.Reader2.GetID(System.Int32)">
<summary>
写入指定块数据到电子标签
ID号码
</summary>
<param name="num"></param>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.InitBuff(System.Int32,System.Int32)">
<member name="M:Asa.RFID.Reader2.Read(System.Int32)">
<summary>
初始buff为0
读取电子标签
</summary>
<param name="index"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.Read(System.Int32,System.Int32,System.Int32)">
<summary>
读取电子标签
</summary>
<param name="index"></param>
<param name="start"></param>
<param name="len"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader2.Write(System.Int32,System.Byte[],System.Int32)">
<summary>
写入数据到电子标签
</summary>
<param name="index"></param>
<param name="buff"></param>
<param name="start"></param>
<returns></returns>
</member>
<member name="T:Asa.RFID.ReaderInfo">
<member name="M:Asa.RFID.Reader2.AutoScan(System.Int32,System.Boolean)">
<summary>
读卡设备信息
自动读取扫描,扫描模式只读
</summary>
<param name="idx"></param>
<param name="open"></param>
</member>
<member name="F:Asa.RFID.ReaderInfo.IP">
<member name="M:Asa.RFID.Reader2.Receive(System.Object)">
<summary>
IP地址
自动扫描接受数据事件
</summary>
</member>
<member name="M:Asa.RFID.Reader2.Find(System.Int32)">
<summary>
查找电子标签
</summary>
<param name="idx"></param>
</member>
<member name="M:Asa.RFID.Reader2.ReadRFID(System.Int32)">
<summary>
读取电子标签内所有数据
</summary>
<param name="idx"></param>
</member>
<member name="M:Asa.RFID.Reader2.ReadRFID(System.Int32,System.Int32)">
<summary>
读取电子标签指定块
</summary>
<param name="idx"></param>
<param name="num"></param>
</member>
<member name="M:Asa.RFID.Reader2.WriteRFID(System.Int32,System.Int32)">
<summary>
写入指定块数据到电子标签
</summary>
<param name="idx"></param>
<param name="num"></param>
<returns></returns>
</member>
<member name="F:Asa.RFID.ReaderInfo.Mac">
<member name="T:Asa.RFID.IP">
<summary>
MAC地址
IP地址操作
</summary>
</member>
<member name="F:Asa.RFID.ReaderInfo.Port">
<member name="M:Asa.RFID.IP.Find(System.String)">
<summary>
端口
查找IP地址
</summary>
<param name="localIP"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.IP.Modify(System.String,System.String,System.String)">
<summary>
修改IP地址,需要先查找IP
</summary>
<param name="localIP">本地IP</param>
<param name="beforeIP">修改前的IP</param>
<param name="afterIP">修改后的IP</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.IP.GetLocal">
<summary>
获取本地IPv4地址
</summary>
<returns></returns>
</member>
</members>
</doc>
......@@ -8,7 +8,7 @@
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="流水线客户端" />
<!--Server address-->
<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>
<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>
<!--storeType-->
<add key="Line_moveEquip_count" value="18" />
<add key="Line_feedingEquip_count" value="4" />
......@@ -49,7 +49,8 @@
<add key ="OpenRFIDWrite" value ="1"/>
<add key="DefaultPWD" value ="123456"/>
<!--当前调试的设备ID,分号分割-->
<add key ="DebugDeviceId" value ="0"/>
<add key ="DebugDeviceId" value ="11"/>
<add key ="NeedScanCode" value ="1"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -37,7 +37,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>true</Prefer32Bit>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
......
......@@ -371,7 +371,14 @@ namespace OnlineStore.AssemblyLine
}
private void btnFeedSideWay_Click(object sender, EventArgs e)
{
BtnMove(btnFeedSideWay, "上料横移机构上升", "上料横移机构下降", IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
if (equipBean.IOValue(IO_Type.SL_MoveCylinder_Take).Equals(IO_VALUE.HIGH) && equipBean.IOValue(IO_Type.SL_MoveCylinder_Give).Equals(IO_VALUE.LOW))
{
BtnMove(btnFeedSideWay, "上料横移机构上升", "上料横移机构下降", IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
else
{
MessageBox.Show("上料机构不在放料端");
}
}
private void btnFeedCylinder_Click(object sender, EventArgs e)
......
......@@ -29,30 +29,90 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lblConInfo = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblConInfo = new System.Windows.Forms.Label();
this.lblRFID = new System.Windows.Forms.Label();
this.lblBox = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label();
this.btnUpdate = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// timer1
//
this.timer1.Interval = 3000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// lblConInfo
//
this.lblConInfo.AutoSize = true;
this.lblConInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblConInfo.Location = new System.Drawing.Point(63, 37);
this.lblConInfo.Location = new System.Drawing.Point(63, 73);
this.lblConInfo.Name = "lblConInfo";
this.lblConInfo.Size = new System.Drawing.Size(80, 20);
this.lblConInfo.TabIndex = 0;
this.lblConInfo.Text = "lblConInfo";
//
// timer1
// lblRFID
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
this.lblRFID.AutoSize = true;
this.lblRFID.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblRFID.Location = new System.Drawing.Point(309, 73);
this.lblRFID.Name = "lblRFID";
this.lblRFID.Size = new System.Drawing.Size(50, 20);
this.lblRFID.TabIndex = 1;
this.lblRFID.Text = "label1";
//
// lblBox
//
this.lblBox.AutoSize = true;
this.lblBox.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBox.Location = new System.Drawing.Point(549, 73);
this.lblBox.Name = "lblBox";
this.lblBox.Size = new System.Drawing.Size(50, 20);
this.lblBox.TabIndex = 2;
this.lblBox.Text = "label2";
//
// lblMsg
//
this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.Location = new System.Drawing.Point(56, 26);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(87, 17);
this.lblMsg.TabIndex = 3;
this.lblMsg.Text = "3秒钟刷新一次";
//
// btnUpdate
//
this.btnUpdate.Location = new System.Drawing.Point(383, 18);
this.btnUpdate.Name = "btnUpdate";
this.btnUpdate.Size = new System.Drawing.Size(115, 33);
this.btnUpdate.TabIndex = 4;
this.btnUpdate.Text = "刷新";
this.btnUpdate.UseVisualStyleBackColor = true;
this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(504, 18);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(115, 33);
this.btnExit.TabIndex = 5;
this.btnExit.Text = "退出";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// FrmIOMsg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(602, 708);
this.ClientSize = new System.Drawing.Size(766, 708);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnUpdate);
this.Controls.Add(this.lblMsg);
this.Controls.Add(this.lblBox);
this.Controls.Add(this.lblRFID);
this.Controls.Add(this.lblConInfo);
this.Name = "FrmIOMsg";
this.Text = "IO连接状态";
......@@ -66,5 +126,10 @@
private System.Windows.Forms.Label lblConInfo;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label lblRFID;
private System.Windows.Forms.Label lblBox;
private System.Windows.Forms.Label lblMsg;
private System.Windows.Forms.Button btnUpdate;
private System.Windows.Forms.Button btnExit;
}
}
\ No newline at end of file
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -20,21 +21,66 @@ namespace OnlineStore.AssemblyLine
private void timer1_Tick(object sender, EventArgs e)
{
UpdateData();
}
private void UpdateData()
{
lblMsg.Text = "自动刷新时间:" + timer1.Interval + "毫秒,最后更新时间:" + DateTime.Now.ToLongTimeString();
lblConInfo.Text = "IO连接信息:\r\n";
string msg = "";
List<string> tList = new List<string>(LineManager.Line.cioList);
foreach (string ip in tList)
{
string con = (IOManager.instance.IsConnect(ip)) ? "✔" : "✘";
string con = (IOManager.instance.IsConnect(ip)) ? " ✔" : " ✘";
msg += ("IO模块[" + ip + "]").PadLeft(26, ' ') + con + "\n";
}
lblConInfo.Text += msg;
lblRFID.Text = "RFID连接信息:\r\n";
msg = "";
List<string> rfidList = new List<string>(DeviceConfig.ProRFIpMap.Values);
foreach (string ip in tList)
{
string con = (RFIDManager.IsConnect(ip)) ? " ✔" : " ✘";
msg += ("RFID[" + ip + "]").PadLeft(26, ' ') + con + "\n";
}
lblRFID.Text += msg;
lblBox.Text = "料仓连接信息:\r\n";
msg = "";
List<int> list = new List<int>(LineManager.Line.MoveEquipMap.Keys);
foreach (int storeId in list)
{
if (LineServer.ClientMap.ContainsKey(storeId))
{
msg += ("BOX[" + storeId + "]").PadLeft(16, ' ') + " ✔ "+LineServer.ClientMap[storeId].AddStr + "\n";
}
else
{
msg += ("BOX[" + storeId + "]").PadLeft(16, ' ') + " ✘ " + "\n";
}
}
lblBox.Text += msg;
}
private void FrmIOMsg_Load(object sender, EventArgs e)
{
UpdateData();
timer1.Start();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnUpdate_Click(object sender, EventArgs e)
{
UpdateData();
}
}
}
......@@ -41,15 +41,10 @@ D2(上料模块出口)
放料需要定位和顶升。
X403 环形线横移2阻挡检测
环形线横移四没有上升
上料工位检测信号要等待1秒钟以上
上料模块回原点之前链条先转
......
......@@ -79,5 +79,8 @@ namespace OnlineStore.Common
public static string AgvServerIp = "AgvServerIp";
public static string DebugDeviceId = "DebugDeviceId";
public static string NeedScanCode = "NeedScanCode";
}
}
......@@ -16,7 +16,7 @@ namespace OnlineStore.Common
/// <summary>
/// 接受消息时的间隔
/// </summary>
public static int ReviceMsgMS = 100;
public static int ReviceMsgMS = 10;
private Thread m_serverThread;
private Socket m_serverSocket;
......@@ -30,6 +30,7 @@ namespace OnlineStore.Common
public delegate void AcceptClientDelegate(TcpClientBean client);
ReceiveMessageDelegate receiveMessageDelegate;
private bool isRun = true;
private int serverPort = 0;
private void logLocalIp()
{
string[] addresses = GetLocalAddresses();
......@@ -57,7 +58,7 @@ namespace OnlineStore.Common
isRun = true;
m_serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, m_serverPort);
this.serverPort = m_serverPort;
m_serverSocket.Bind(localEndPoint);
m_serverSocket.Listen(10);
......@@ -105,8 +106,8 @@ namespace OnlineStore.Common
{
client.ClientSocket = m_serverSocket.Accept();
IPEndPoint clientipe = (IPEndPoint)client.ClientSocket.RemoteEndPoint;
client.ipAdd = clientipe.Address;
LogUtil.info(LOGGER, "有新的客户端链接上:" + client.ipAdd.ToString());
client.AddStr = clientipe.Address.ToString()+":"+clientipe.Port.ToString();
LogUtil.info(LOGGER, "["+serverPort+"]有新的客户端链接上:[" + client.AddStr+"]");
AcceptClientEvent?.Invoke(client);
receiveMessageDelegate = new ReceiveMessageDelegate(ReceiveMessages);
......@@ -121,7 +122,7 @@ namespace OnlineStore.Common
}
private StringBuilder sb = new StringBuilder(); //这个是用来保存:接收到了的,但是还没有结束的消息
private int receiveBufferSize = 1024;
private string terminateString = ";";
private string terminateString = "\r";
public void ReceiveMessages(TcpClientBean client) //这个函数会被以线程方式运行
{
try
......@@ -254,7 +255,7 @@ namespace OnlineStore.Common
Socket m_clientSocket;
public TcpClientBean() { }
public IPAddress ipAdd { get; set; }
public string AddStr = "";
public Socket ClientSocket
{
get { return m_clientSocket; }
......
......@@ -10,7 +10,7 @@ PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D2,,,,,
AXIS,0,提升上料轴,Batch_Axis,5,COM5,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,23400000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,0,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,22280000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,20659205,,,,,
PRO,0,提升上料轴目标速度,BatchAxis_TargetSpeed,1500,,,,,
PRO,0,提升上料轴加速度,BatchAxis_AddSpeed,400,,,,,
PRO,0,提升上料轴减速度,BatchAxis_DelSpeed,400,,,,,
......@@ -25,7 +25,7 @@ PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,50000,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,6,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=90000,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,202040,,,,,
PRO,0,移栽上下轴P3取料位置,UpDownAxisP3,278294,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
......
......@@ -32,10 +32,11 @@ namespace OnlineStore.DeviceLibrary
return msg = deviceName + "托盘【" + trayNum + "】 没有扫码到条码";
}
if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
{
return msg = deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",暂未开启,不需要发送服务器";
}
//if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
//{
// return msg = deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",暂未开启,不需要发送服务器";
//}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
......
......@@ -9,6 +9,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System.Threading.Tasks;
using Asa.IOModule;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
......@@ -130,6 +131,7 @@ namespace OnlineStore.DeviceLibrary
{
// Create new modbus master and add event functions
aioBox = new AIOBOX();
//aioBox.LogPath( Application.StartupPath+@"\logs\aio\");
aioBox.IP = ioIp;
// bool rtn = aioBox.AutoIP(ioIp);
......
......@@ -43,6 +43,16 @@ namespace OnlineStore.DeviceLibrary
}
private static bool isProcess = false;
private static DateTime lastTime = DateTime.Now;
public static bool IsConnect(string ip)
{
if (RFReaderMap.ContainsKey(ip))
{
return true;
}
return false;
}
private static void ConTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
TimeSpan span = DateTime.Now - lastTime;
......@@ -84,30 +94,20 @@ namespace OnlineStore.DeviceLibrary
rfidReader = new Reader();
// rfidReader.LocalIP = "192.168.100.101";
rfidReader.RemoteIP = rfid;
// rfidReader.RemoteIP = rfid;
//string[] array = rfid.Split('.');
//int index = Convert.ToInt32(array[3]);
bool result = rfidReader.Connect();
bool result = rfidReader.Connect(rfid,true);
if (result)
{
rfidReader.AutoScan(true);
//rfidReader.AutoScan(true);
LogUtil.info("连接 " + logName + "成功");
RFReaderMap.Add(rfid, rfidReader);
if (RfIPList.Contains(rfid))
{
RfIPList.Remove(rfid);
}
return true;
}
......@@ -173,15 +173,15 @@ namespace OnlineStore.DeviceLibrary
public static string[] SearchIP(string localIp)
{
string[] ipList=null;
try
{
Reader rfReader = new Reader();
rfReader.LocalIP = localIp;
ipList = rfReader.FindIP();
}
catch (Exception ex)
{
}
//try
//{
// Reader rfReader = new Reader();
// rfReader.LocalIP = localIp;
// ipList = rfReader.FindIP();
//}
//catch (Exception ex)
//{
//}
return ipList;
}
public static bool FindRFID(string IP)
......
......@@ -194,7 +194,7 @@ namespace OnlineStore.DeviceLibrary
codeList.Add(c.CodeStr);
r = r + "##" + c.CodeStr;
}
LogUtil.debug(" 【" + cameraName + "】【" + codeType + "】扫码完成:"+r);
LogUtil.info(" 【" + cameraName + "】【" + codeType + "】扫码完成:"+r);
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!