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.
The CFE_SB_EDS_PackOutputMessage function is not sufficient for packing command messages. There is only one step in the packing process which cannot handle EDS objects that have constraints such as command codes. This is sufficient for packing telemetry messages in the TO_LAB app as telemetry message typically don't have constraints and the correct EDS object can be obtained from the call to CFE_MissionLib_GetArgumentType.
Additions:
Mirroring the two step unpacking process in CFE_SB_EDS_UnpackInputMessage, there is now a two step packing process to handle if any constraints are found.
Deletions:
The first part of the function that created an EdsId from a base command or telemetry packet was unnecessary. With the input packet header the appropriate starting point for the EdsId is found via CFE_MissionLib_GetArgumentType which overwrites the EdsId set at the beginning.
I've tested this function using both TO_LAB and an EDS version of the Data Storage App. The former is able to pack telemetry messages and the latter is able to pack both telemetry and command messages and write them to a file.