| | |
| | | */ |
| | | void sendModBus(Object data, DCUniMPJSCallback callback) { |
| | | String tempData = getKeyValue("data", data); |
| | | if (tempData == null) { |
| | | LogUtils.i("data内容为空"); |
| | | if (TextUtils.isEmpty(tempData)) { |
| | | HdlLogLogic.print("data内容为空"); |
| | | return; |
| | | } |
| | | ModBusBean modBusBean = com.alibaba.fastjson.JSONObject.parseObject(JSON.toJSONString(tempData), ModBusBean.class); |
| | |
| | | // modBusBean.setOid("0101050219D44A00"); |
| | | // modBusBean.setData(new byte[]{00,01,00,00,00,0x09,00,00,00,01,03,00,00,00,01}); |
| | | if (modBusBean.getOid() == null || modBusBean.getData() == null) { |
| | | LogUtils.i("内容为空,oid=" + modBusBean.getOid() + " data=" + modBusBean.getData()); |
| | | HdlLogLogic.print("内容为空,oid=" + modBusBean.getOid() + " data=" + modBusBean.getData()); |
| | | return; |
| | | } |
| | | |