Skip to content
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

Better error handling #96

Closed
huebrick opened this issue Apr 30, 2024 · 2 comments
Closed

Better error handling #96

huebrick opened this issue Apr 30, 2024 · 2 comments

Comments

@huebrick
Copy link

I have a suggestion on how to improve this library regarding the error handling when the communication is in some way interrupted.

So for example currently if the library sends a frame out to the meter and the meter doesn't respond it will just try to read the serial port into oblivion waiting for a msg that will never come for one reason or another. One way to get out of this would be if the library encounters this error then it can repeat the last action it tried to do and if it fails x times then it should exit.
image
In this example meter didn't turn on in time to start the connection, if it tried again a second later then it would have succeeded.

Basically in any case where data is not readable it should try again(I do understand its not so simple as just trying again but it should have a way to get out of these kinds of errors), communication over optical probes can be very unreliable if you get the correct combination of probe and meter(a lot of hair was lost to this cause 😄)

I do understand that this library is free and you are offering paid development of features so this is just a suggestion 😃

@Krolken
Copy link
Contributor

Krolken commented Apr 30, 2024

Hi.

I appreciate all feedback. :) I just had a new kid and have not had time to give the library some love lately.

I know this is a problem, but it is usually just when you are trying to figure out the HDLC settings etc. Once everything is working well things flow quite ok.

I don't like the resend in the protocol or transport layer. If implemented it should be on the client.
But I think this problem could be avoided with proper timeout handling as mentioned in #93. At least it would fail with a proper error.

@huebrick
Copy link
Author

Hey, congratulations !!!

I agree if the library gave out an error when the serial timed out then it wouldn't be too much work for me to implement my own error handling.

Then we can consider this as a duplicate of #93

Thanks :)

@huebrick huebrick closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants