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

Updated MAT table assumes "CommandHeader" first member name #96

Closed
2 tasks done
jphickey opened this issue Apr 20, 2023 · 0 comments · Fixed by #97
Closed
2 tasks done

Updated MAT table assumes "CommandHeader" first member name #96

jphickey opened this issue Apr 20, 2023 · 0 comments · Fixed by #97

Comments

@jphickey
Copy link
Contributor

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
Depending on where the message definitions came from, and the type of HDR implementation used, the first element of a structure may or may not be named CommandHeader. This is controlled by the specific MsgHdr implementation that was chosen.

To Reproduce
Build the MAT using EDS-generated structs - in these (unfortunately) there is an extra layer of nesting, so this fails. The first element still is ultimately a command header.

Expected behavior
The TBL message definitions are defined by a combination of TBL itself and the MSG HDR module selection. No assumptions in HS should be made about its structure.

Code snips

.HsMsg.cmd1.CommandHeader =

Specifically the ".CommandHeader" part.

System observed on:
Debian

Additional context
Should be able to just remove this part of the designated initializer. Normally I would recommend use of designated initializers, but in this context it introduces a dependency/assumption that may not be correct.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

jphickey added a commit to jphickey/HS that referenced this issue Apr 20, 2023
Do not assume specific member names on structs that are not directly
part of the HS app itself.
jphickey added a commit to jphickey/HS that referenced this issue Apr 20, 2023
Do not assume specific member names on structs that are not directly
part of the HS app itself.
jphickey added a commit to jphickey/HS that referenced this issue Apr 20, 2023
Do not assume specific member names on structs that are not directly
part of the HS app itself.
dzbaker added a commit that referenced this issue Apr 20, 2023
Fix #96, use non-designated initializer for command header
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants