Commit 23d54b9c authored by shaxuezheng's avatar shaxuezheng

commit tempe modify

parent e70d8cea
......@@ -466,7 +466,7 @@ namespace ModbusDemo
}
ID = ctrl.ss[0].getAddr();
Modbus_polling();
ctrl_Back.taskId = ctrl.taskId.ToString();
ctrl_Back_ss[0] = ctrl.ss[0];
......@@ -488,6 +488,7 @@ namespace ModbusDemo
{
control(ctrl.ss[0].getAddr(), address, on_off);//根据下发确定控制通道
mqttData_Back = JsonConvert.SerializeObject(ctrl2);
Modbus_polling();
await Publish();
await Back();
}
......@@ -1723,38 +1724,6 @@ namespace ModbusDemo
comPort.Close();
totxt.Log(DateTime.Now.ToString() + " =>Disconnect " + comPort.PortName);
}
public class ThreadDemoClass
{
public void Run1(object obj)
{
#region 注释部分
//string name = obj as string;
//Console.WriteLine();
//Console.WriteLine("Child thread working...");
//Console.WriteLine("My name is " + name);
//Console.WriteLine("Child thread ID is:" + Thread.CurrentThread.ManagedThreadId.ToString());
#endregion
}
public void Run2(object obj)
{
#region 注释部分
//UserInfo userInfo = (UserInfo)obj;
//Console.WriteLine();
//Console.WriteLine("Child thread working...");
//Console.WriteLine("My name is " + userInfo.Name);
//Console.WriteLine("I'm " + userInfo.Age + " years old this year");
//Console.WriteLine("Child thread ID is:" + Thread.CurrentThread.ManagedThreadId.ToString());
#endregion
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment