Skip to content

Commit

Permalink
fix nasa#744 - update LastSender in pipe description and add AppId to…
Browse files Browse the repository at this point in the history
… buf desc
  • Loading branch information
CDKnightNASA committed Jun 18, 2020
1 parent 1df042b commit ec6a8f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions fsw/cfe-core/src/inc/cfe_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ extern CFE_SB_Qos_t CFE_SB_Default_Qos;/**< \brief Defines a default priority a
**/
typedef struct {
uint32 ProcessorId;/**< \brief Processor Id from which the message was sent */
uint32 AppId;/**< \brief Application Id from which the message was sent */
char AppName[OS_MAX_API_NAME];/**< \brief Application that sent the message */
} CFE_SB_SenderId_t;

Expand Down
3 changes: 3 additions & 0 deletions fsw/cfe-core/src/sb/cfe_sb_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,7 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr,
if(CFE_SB.SenderReporting != 0)
{
BufDscPtr->Sender.ProcessorId = CFE_PSP_GetProcessorId();
BufDscPtr->Sender.AppId = CFE_SB.AppId;
strncpy(&BufDscPtr->Sender.AppName[0],CFE_SB_GetAppTskName(TskId,FullName),OS_MAX_API_NAME);
}

Expand All @@ -1347,6 +1348,8 @@ int32 CFE_SB_SendMsgFull(CFE_SB_Msg_t *MsgPtr,

PipeDscPtr = &CFE_SB.PipeTbl[DestPtr->PipeId];

PipeDscPtr->LastSender = CFE_SB.AppId;

if(PipeDscPtr->Opts & CFE_SB_PIPEOPTS_IGNOREMINE)
{
uint32 AppId = 0xFFFFFFFF;
Expand Down

0 comments on commit ec6a8f7

Please sign in to comment.