Skip to content

Commit

Permalink
Merge pull request #3067 from SCADA-LTS/fix/#2799_Allow_modbus_tcp_sl…
Browse files Browse the repository at this point in the history
…ave_id_to_be_zero

#2799 Allow modbus tcp slave id to be zero
  • Loading branch information
Limraj authored Dec 18, 2024
2 parents 017ee5c + 243934a commit 6c274b5
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 6c274b5

Please sign in to comment.