Skip to content

Added simple error flag to handle packet issues.#237

Open
Shal-Ziar wants to merge 1 commit intoCroatiaControlLtd:masterfrom
Shal-Ziar:fix/cat62_sigseg
Open

Added simple error flag to handle packet issues.#237
Shal-Ziar wants to merge 1 commit intoCroatiaControlLtd:masterfrom
Shal-Ziar:fix/cat62_sigseg

Conversation

@Shal-Ziar
Copy link
Copy Markdown

@Shal-Ziar Shal-Ziar commented Mar 26, 2025

Made use of C++ internal check for correct packet size.
Now uses a simple flag to check if packet length error has been triggered, if so -> runtime error.

Should fix decoding issues, or at least will allow Python side error capturing.
This Issue

@sonarqubecloud
Copy link
Copy Markdown

@ifsnop
Copy link
Copy Markdown
Contributor

ifsnop commented Mar 26, 2025 via email

@Shal-Ziar
Copy link
Copy Markdown
Author

No, it probably isn't. But honestly C++ isn't my forte, so this is the best that I could come up with.
Probably there's a better and neater way to deal with this. Probably using the checksum of the packet, but in the short-term it's better than crashing the code imho.

I'd thus rather view it as a mitigation as opposed to a solution. Now the user can at least catch the error from the Python side and continue operation (or not).

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

Successfully merging this pull request may close these issues.

2 participants