| | |
| | | |
| | | private String stableIdentity(String dataType, Map<String, Object> row) |
| | | { |
| | | String deviceId = value(row, "deviceId"); |
| | | String channelId = value(row, "channelId"); |
| | | String adapterId = identityPart(row, "adapterId"); |
| | | String devtype = identityPart(row, "devtype"); |
| | | String deviceId = identityPart(row, "deviceId"); |
| | | String subdevid = identityPart(row, "subdevid"); |
| | | String channelId = identityPart(row, "channelId"); |
| | | String cycleNo = value(row, "cycleNo"); |
| | | if ("REALTIME".equals(dataType)) return deviceId + ":" + channelId + ":" + value(row, "sequenceId"); |
| | | if ("STEP".equals(dataType)) return "step:" + deviceId + ":" + channelId + ":" + cycleNo + ":" + value(row, "stepNo"); |
| | | return "cycle:" + deviceId + ":" + channelId + ":" + cycleNo; |
| | | String channelIdentity = String.join(":", adapterId, devtype, deviceId, subdevid, channelId); |
| | | if ("REALTIME".equals(dataType)) return channelIdentity + ":" + value(row, "sequenceId"); |
| | | if ("STEP".equals(dataType)) return "step:" + channelIdentity + ":" + cycleNo + ":" + value(row, "stepNo"); |
| | | return "cycle:" + channelIdentity + ":" + cycleNo; |
| | | } |
| | | |
| | | private String identityPart(Map<String, Object> row, String key) |
| | | { |
| | | Object value = row == null ? null : row.get(key); |
| | | return value == null ? "" : String.valueOf(value); |
| | | } |
| | | |
| | | private String value(Map<String, Object> row, String key) |
| | | { |
| | | Object value = row == null ? null : row.get(key); |
| | | return value == null ? "" : String.valueOf(value); |
| | | return identityPart(row, key); |
| | | } |
| | | |
| | | private void requireTest(Long testId) |