Skip to content

Commit

Permalink
#2799 Allow modbus tcp slave id to be zero
Browse files Browse the repository at this point in the history
Added option to set modbus data point slave id to range from 0 to 255 instead of range from 1 to 255
  • Loading branch information
Patrykb0802 committed Dec 16, 2024
1 parent 284961e commit 243934a
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ public void validate(DwrResponseI18n response) {
if (!MODBUS_DATA_TYPE_CODES.isValidId(modbusDataType))
response.addContextualMessage("modbusDataType",
"validate.invalidValue");
if (!StringUtils.isBetweenInc(slaveId, 1, 255) && !socketMonitor)
response.addContextualMessage("slaveId", "validate.1to255");
if (!StringUtils.isBetweenInc(slaveId, 0, 255) && !socketMonitor)
response.addContextualMessage("slaveId", "validate.0to255");

if (!slaveMonitor && !socketMonitor) {
int maxEndOffset = 65536 - DataType
Expand Down
3 changes: 2 additions & 1 deletion webapp-resources/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3368,4 +3368,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3371,4 +3371,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3411,4 +3411,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_fi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3496,4 +3496,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3365,4 +3365,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_lu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3384,4 +3384,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3486,4 +3486,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3508,4 +3508,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_pt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3523,4 +3523,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3519,4 +3519,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive
3 changes: 2 additions & 1 deletion webapp-resources/messages_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3471,4 +3471,5 @@ systemSettings.invalidCustomCss=Invalid custom CSS
systemsettings.reports.dataPointExtendedNameLengthLimit=Point name length limit in reports
event.ds.recursiveError=Recursive Error
event.meta.recursiveError=Recursive error in point "{0}": {1}
validate.cyclicDependency=Cyclic dependency: {0}
validate.cyclicDependency=Cyclic dependency: {0}
validate.0to255=Must be between 0 and 255 inclusive

0 comments on commit 243934a

Please sign in to comment.