-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[modbus] Expose modbus exceptions #4067
Merged
cweitkamp
merged 4 commits into
openhab:master
from
mrbig:modbus-expose-modbus-exceptions
Oct 5, 2018
Merged
[modbus] Expose modbus exceptions #4067
cweitkamp
merged 4 commits into
openhab:master
from
mrbig:modbus-expose-modbus-exceptions
Oct 5, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This value tells what is the exact cause of the error. Clients receiving this exception can use this value to handle errors better. Also added documentation to error constants Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
cweitkamp
requested changes
Oct 5, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. Code looks good so far. I added some remarks.
....modbus/src/main/java/org/openhab/io/transport/modbus/ModbusSlaveErrorResponseException.java
Outdated
Show resolved
Hide resolved
....modbus/src/main/java/org/openhab/io/transport/modbus/ModbusSlaveErrorResponseException.java
Outdated
Show resolved
Hide resolved
....modbus/src/main/java/org/openhab/io/transport/modbus/ModbusSlaveErrorResponseException.java
Outdated
Show resolved
Hide resolved
....modbus/src/main/java/org/openhab/io/transport/modbus/ModbusSlaveErrorResponseException.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openhab/io/transport/modbus/internal/ModbusSlaveErrorResponseExceptionImpl.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
cweitkamp
approved these changes
Oct 5, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
chaton78
pushed a commit
to chaton78/openhab-addons
that referenced
this pull request
Jan 1, 2019
* Added type getter to ModbusSlaveErrorResponseException This value tells what is the exact cause of the error. Clients receiving this exception can use this value to handle errors better. * Added documentation to error constants Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: Pascal Larin <plarin@gmail.com>
magx2
pushed a commit
to magx2/openhab2-addons
that referenced
this pull request
Mar 18, 2019
* Added type getter to ModbusSlaveErrorResponseException This value tells what is the exact cause of the error. Clients receiving this exception can use this value to handle errors better. * Added documentation to error constants Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a minor addition to the modbus transport.
The modbus protocol uses a custom error handling method, where a few predefined exceptions can be sent to the master by the salve when it can not fulfill the request. These exception codes will tell the master what is the exact cause of the failure.
The modbus implementation in the master branch failed to expose this value, and that made writing sophisticated error handling impossible.
This change is related to an upcoming extension of the modbus addon, see #3216