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

Fix #666, alignment of CMD/TLM message definitions #678

Merged
merged 2 commits into from
May 8, 2020

Commits on May 6, 2020

  1. Issue nasa#666, Define aligned message headers

    The "CFE_SB_CmdHdr_t" and "CFE_SB_TlmHdr_t" types were not defined
    such that they would have compatible alignment with (and thereby allow
    safe casting to/from) a CFE_SB_Msg_t type.
    
    This changes the definition to be a union so that the types are
    aligned correctly.
    jphickey committed May 6, 2020
    Configuration menu
    Copy the full SHA
    4908b72 View commit details
    Browse the repository at this point in the history
  2. Issue nasa#666, Change message definitions to ensure alignment

    Update the CFE_ES_ShellTlm_t, CFE_TIME_ToneSignalCmd_t, and
    CFE_TIME_FakeToneCmd_t to use the CFE_SB_TlmHdr_t/CFE_SB_CmdHdr_t
    types to define the buffer, rather than a uint8 array.
    
    This should not change the size, as it was already defined using
    sizeof() this structure, but it will make it aligned correctly
    which resolves the compiler warning.
    
    Note that all CMD/TLM should really be defined this way, but
    this only selectively changes the places that were actually
    generating a compiler warning about this.  There is a risk
    that padding will be added, but this change should not change
    the padding or size of messages in 32-bit builds.
    jphickey committed May 6, 2020
    Configuration menu
    Copy the full SHA
    5e71fe2 View commit details
    Browse the repository at this point in the history