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

SB Pipe Info 'LastSender' Field is Unused #744

Closed
dmccomas opened this issue Jun 17, 2020 · 4 comments
Closed

SB Pipe Info 'LastSender' Field is Unused #744

dmccomas opened this issue Jun 17, 2020 · 4 comments
Assignees

Comments

@dmccomas
Copy link

Describe the bug
The LastSender field in in the file produced by a SB 'Send Pipe Info to file' command is always zero. After doing some seraches it appears that this field defined in CFE_SB_PipeD_t in cfe_sb_priv.h is never set.

To Reproduce

  1. Send a SB CFE_SB_SEND_PIPE_INFO_CC command
  2. Transfer the file to the ground
  3. Decode the binary file

Expected behavior
The structure definition does not have any comments as to what to expect in this field. I would expect the AppId of the of the sender of last message send to the particular pipe.

Code snips
n/a

System observed on:
Wndows VM running Ubuntu 18.04
cfE 6.71, OSAL 5.0.1.0, PSP 1.4.0.0

Additional context
None

Reporter Info
David McComas, NASA Emeritus

@jwilmot
Copy link

jwilmot commented Jun 17, 2020

Is the just the reporting or does CFE_SB_GetLastSenderId API also not work?

@dmccomas
Copy link
Author

dmccomas commented Jun 17, 2020 via email

@CDKnightNASA CDKnightNASA self-assigned this Jun 18, 2020
@CDKnightNASA
Copy link
Contributor

So cfe_sb.h defines:

typedef struct {
    uint32  ProcessorId;/**< \brief Processor Id from which the message was sent */
    char    AppName[OS_MAX_API_NAME];/**< \brief Application that sent the message */
} CFE_SB_SenderId_t;

The definition in cfe_sb_priv.h does not define what the LastSender field should be, but I'm guessing ProcessorId is not all that helpful. (Even SBN-relayed messages would show up with the local ProcessorId.)

I will implement as AppId as that seems the most sensible. I'll also add AppId to CFE_SB_SenderId_t as well, and at some point it might make more sense to deprecate AppName from this struct. Note that SBN uses the GetLastSenderId() API to ensure that it doesn't end up with an echo problem.

@skliper
Copy link
Contributor

skliper commented Sep 9, 2020

This is OBE by #784 which deprecates it. Marking as duplicate of #759. Merge to main was in #816.

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