|
@@ -42,6 +42,7 @@ import com.example.bpa.helper.UpdateManager; |
|
|
import com.example.bpa.helper.WrapContentLinearLayoutManager; |
|
|
import com.example.bpa.helper.WrapContentLinearLayoutManager; |
|
|
import com.example.bpa.message.MessageLooper; |
|
|
import com.example.bpa.message.MessageLooper; |
|
|
import com.example.bpa.message.MessageManager; |
|
|
import com.example.bpa.message.MessageManager; |
|
|
|
|
|
import com.example.bpa.service.DeviceData; |
|
|
import com.example.bpa.service.OrderServer; |
|
|
import com.example.bpa.service.OrderServer; |
|
|
import com.example.bpa.service.ScanCodeServer; |
|
|
import com.example.bpa.service.ScanCodeServer; |
|
|
import com.example.bpa.view.adapter.makegood_adapter; |
|
|
import com.example.bpa.view.adapter.makegood_adapter; |
|
@@ -152,7 +153,16 @@ public class MainActivity extends FragmentActivity implements View.OnClickListen |
|
|
private void initBusiness() { |
|
|
private void initBusiness() { |
|
|
Main.getInstance().ToggleEnvironment(); |
|
|
Main.getInstance().ToggleEnvironment(); |
|
|
//PLC数据监控 |
|
|
//PLC数据监控 |
|
|
ModbusTcpServer.get().Connect(ConfigName.getInstance().Address, ConfigName.getInstance().Post); |
|
|
|
|
|
|
|
|
new Thread(new Runnable() { |
|
|
|
|
|
@Override |
|
|
|
|
|
public void run() { |
|
|
|
|
|
try { |
|
|
|
|
|
ModbusTcpServer.get().Connect(ConfigName.getInstance().Address, ConfigName.getInstance().Post); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}).start(); |
|
|
//MQTT数据监听 |
|
|
//MQTT数据监听 |
|
|
OrderServer.Get().MqttInit(); |
|
|
OrderServer.Get().MqttInit(); |
|
|
//消息中心 |
|
|
//消息中心 |
|
|