Fix schema guess in modbus adapter
@@ -144,12 +144,13 @@ public class Plc4xModbusAdapter extends PullAdapter{
StaticPropertyExtractor memberExtractor =
StaticPropertyExtractor.from(((StaticPropertyGroup) member).getStaticProperties(), new ArrayList<>());
- if (ids.add(memberExtractor.singleValueParameter(PLC_NODE_ID, Integer.class)) ||
+ if (ids.add(memberExtractor.singleValueParameter(PLC_NODE_ADDRESS, Integer.class)) == false ||
names.add(memberExtractor.textParameter(PLC_NODE_RUNTIME_NAME)) == false) {
throw new AdapterException("NodeID or RuntimeName is specified twice." +
"Please prevent duplicate names.");
}
+
Map map = new HashMap();
map.put(PLC_NODE_RUNTIME_NAME, memberExtractor.textParameter(PLC_NODE_RUNTIME_NAME));
map.put(PLC_NODE_ADDRESS, memberExtractor.singleValueParameter(PLC_NODE_ADDRESS, Integer.class));
