fix: Align all 0x34 and 0x36 framing bytes - #848
Open
bvanelli wants to merge 1 commit into
Open
Conversation
This file contains hidden or 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
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.
Changes
Aligns the transmission with the received bytes when it comes to the transport flags. The C# library has the following definitions:
InitSslRequest.cs:230x30CreateObjectRequest.cs:23,570x36DeleteObjectRequest.cs:230x34ExploreRequest.cs:240x34(with a// or 0x36???comment)GetMultiVariablesRequest.cs:240x34GetVarSubstreamedRequest.cs:230x34SetMultiVariablesRequest.cs:240x34SetVariableRequest.cs:230x34I aligned based on the testing with a S71500 PLC, and it seems to accept the framing 0x34 or 0x36 in most cases, but sometimes the wrong frame leads to a connection reset. Here are the sent and received frames:
0x300x300x700x360x360x360x340x340x340x360x340x340x340x340x340x360x340x34Once the new codes from the C# library are added, they can be added to the same frozenset to keep compatibility.
PS: I checked if this was the cause why #820 was not working, but that was not the issue.