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

Fixing direct import of skeleton_app into latest cfs #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rokrsa
Copy link

@rokrsa rokrsa commented Apr 16, 2021

  • Issue as highlighted in Skeleton_app creation #5

  • I was able to replicate the issue in Linux and Raspbian

  • Fixed the files to align to the latest functions and structures of the CFE

  • This version of skeleton_app can be directly copied into the apps folder of CFS. It will not give any errors when the make command is run.

  • Also the MID of messages have been updated in "skeleton_app_msgids.h" to avoid conflict with the Message Ids of sample_app which comes with the CFS. There is a high chance that the developer trying to learn might have both sample_app and skeleton_app included. Hence its important to have non-conflicting ids.

@rokrsa
Copy link
Author

rokrsa commented Apr 23, 2021

@astrogeco - please do share your thoughts on this PR.


CommandCode = CFE_SB_GetCmdCode(Msg);
CFE_MSG_GetFcnCode(&SBBufPtr->Msg, &CommandCode);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to check the return value == CFE_SUCCESS


uint16 ActualLength = CFE_SB_GetTotalMsgLength(Msg);
CFE_MSG_GetSize(MsgPtr, &ActualLength);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment, check return value in case the message is mangled

CFE_SB_TimeStampMsg(&SKELETON_AppData.HkBuf.MsgHdr);
CFE_SB_SendMsg(&SKELETON_AppData.HkBuf.MsgHdr);
CFE_SB_TimeStampMsg(&SKELETON_AppData.HkBuf.TlmHeader.Msg);
CFE_SB_TransmitMsg(&SKELETON_AppData.HkBuf.TlmHeader.Msg, true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above, should check return code (I realize the old code did not check return codes on these either :D )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants