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

Fields crossing octet-boundary not serialized correctly #531

Closed
senier opened this issue Dec 30, 2020 · 0 comments · Fixed by #532
Closed

Fields crossing octet-boundary not serialized correctly #531

senier opened this issue Dec 30, 2020 · 0 comments · Fixed by #532
Assignees
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)

Comments

@senier
Copy link
Member

senier commented Dec 30, 2020

package Test is

   type T1 is mod 2**7;
   type T2 is mod 2**18;

   type M1 is
      message
         F1 : T1;
         F2 : T1;
         F3 : T2;
      end message;
end Test;

Serializing a parsed message should yield the original message:

data = b"abcd"

msg = PyRFLX.from_specs (["test.rflx"], skip_model_verification=True)["Test"]["M1"]
msg.parse (data)

if data != msg.bytestring:
    print(f"Serialization mismatch:\ngot:      {msg.bytestring.hex()}\nexpected: {data.hex()}")

This fails:

Serialization mismatch:
got:      616131b2
expected: 61626364
@senier senier created this issue from a note in RecordFlux 0.5 (To do) Dec 30, 2020
@senier senier added bug pyrflx Related to pyrflx package (Legacy Python API) labels Dec 30, 2020
@senier senier moved this from To do to In progress in RecordFlux 0.5 Dec 30, 2020
@senier senier self-assigned this Dec 30, 2020
senier pushed a commit that referenced this issue Dec 30, 2020
@senier senier moved this from In progress to Merged in RecordFlux 0.5 Dec 30, 2020
@senier senier moved this from Merged to Done in RecordFlux 0.5 Dec 30, 2020
senier pushed a commit to Componolit/RecordFlux-specifications that referenced this issue Dec 30, 2020
senier pushed a commit to Componolit/RecordFlux-specifications that referenced this issue Dec 30, 2020
senier pushed a commit to Componolit/RecordFlux-specifications that referenced this issue Jan 2, 2021
senier pushed a commit that referenced this issue Jan 4, 2021
RecordFlux 0.5 automation moved this from Done to Merged Jan 4, 2021
senier pushed a commit that referenced this issue Jan 4, 2021
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pyrflx Related to pyrflx package (Legacy Python API)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant