| | |
| | | /** |
| | | * 根据参数标识 获取某个参数实例 |
| | | * |
| | | * @param codeid 参数标识 |
| | | * @param codeids 参数标识 |
| | | * @return 获取某个参数实例 |
| | | */ |
| | | public List<String> getPlcParameterValues(List<String> codeids) { |
| | | List<String> arrayList = new ArrayList(); |
| | | if (plcParameterList != null) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (codeids.contains(plcParameterInfo.getCodeId().toString())) |
| | | if (codeids.contains(plcParameterInfo.getCodeId())) |
| | | arrayList.add(plcParameterInfo.getValue()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public List<String> getPlcAddressList(String codeid) { |
| | | List<String> addressList = new ArrayList<>(); |
| | | if (plcParameterList != null) { |
| | | for (PlcParameterInfo plcParameterInfo : plcParameterList) { |
| | | if (plcParameterInfo.getCodeId().equals(codeid)) { |
| | | int plcAddress = plcParameterInfo.getPlcAddress(); |
| | | if (!addressList.contains(plcAddress)) { |
| | | addressList.add(String.valueOf(plcAddress)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return addressList; |
| | | } |
| | | |
| | | |
| | | |
| | | |