hutcheb commented on a change in pull request #172:
URL: https://github.com/apache/plc4x/pull/172#discussion_r456318413
##########
File path:
plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/field/ModbusFieldCoil.java
##########
@@ -26,17 +26,37 @@ Licensed to the Apache Software Foundation (ASF) under one
public class ModbusFieldCoil extends ModbusField {
public static final Pattern ADDRESS_PATTERN = Pattern.compile("coil:" +
ModbusField.ADDRESS_PATTERN);
+ public static final Pattern ADDRESS_SHORTER_PATTERN = Pattern.compile("0"
+ ModbusField.ADDRESS_PATTERN);
Review comment:
I wasn't too sure about this because depending on the device they will
list the Modbus address as 40001 or 400001. The extra 0 seems to have been
added when the larger memory areas started to be used.
In Proworx NXT when referencing Modbus addresses you can just type 41 and it
will always take the first digit as the memory area, the rest will be the
address. I wasn't sure about extending the format to this extent.
It doesn't make sense to have more than 5 digits for the address though or
values greater than 65536. I can fix this up.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]