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

Use CFE_MSG_CMD_HDR_INIT macro in Message Action Table implementation #43

Closed
3 tasks done
skliper opened this issue Sep 19, 2022 · 0 comments · Fixed by #86
Closed
3 tasks done

Use CFE_MSG_CMD_HDR_INIT macro in Message Action Table implementation #43

skliper opened this issue Sep 19, 2022 · 0 comments · Fixed by #86

Comments

@skliper
Copy link
Contributor

skliper commented Sep 19, 2022

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the README file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Current raw buffer/command implementation in MAT table isn't portable across different endian systems and is somewhat challenging/messy to implement.

Describe the solution you'd like
Similar to nasa/SC#35, the message action table could use the CFE_MSG_CMD_HDR_INIT macro and real command types to simplify table implementation.

Suggestion:
Typedef a union that contains each of the message types in the table, then define the array w/ the MAT info and unioned element

typedef union {cmda, cmdb} cmdbuff;
typedef struct {mat_info, cmdbuff} mat_element;
then mat_element[X] = ... where cmdbuff.cmda can set the header w/ the macro and actual elements of command directly

Describe alternatives you've considered
None

Additional context
Similar possible approach with SCH

Requester Info
Jacob Hageman - NASA/GSFC

dmknutsen added a commit to dmknutsen/HS that referenced this issue Apr 3, 2023
dmknutsen added a commit to dmknutsen/HS that referenced this issue Apr 4, 2023
@dmknutsen dmknutsen added this to the Equuleus milestone Apr 4, 2023
dmknutsen added a commit to dmknutsen/HS that referenced this issue Apr 5, 2023
Fix nasa#43, Refactor MAT table to be more portable
dmknutsen added a commit to dmknutsen/HS that referenced this issue Apr 10, 2023
dmknutsen added a commit to dmknutsen/HS that referenced this issue Apr 10, 2023
dzbaker added a commit that referenced this issue Apr 11, 2023
Fix #43, Refactor MAT table to be more portable
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.

3 participants