-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: master
Are you sure you want to change the base?
Conversation
@astrogeco - please do share your thoughts on this PR. |
|
||
CommandCode = CFE_SB_GetCmdCode(Msg); | ||
CFE_MSG_GetFcnCode(&SBBufPtr->Msg, &CommandCode); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 )
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.