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

CFE_SB_ReceiveBuffer() should use CFE_SB_TimeOut_t for the TimeOut parameter #1062

Closed
CDKnightNASA opened this issue Jan 5, 2021 · 2 comments · Fixed by #1063 or #1088
Closed

CFE_SB_ReceiveBuffer() should use CFE_SB_TimeOut_t for the TimeOut parameter #1062

CDKnightNASA opened this issue Jan 5, 2021 · 2 comments · Fixed by #1063 or #1088
Assignees
Labels
Milestone

Comments

@CDKnightNASA
Copy link
Contributor

In cfe_sb.h...

typedef uint32 CFE_SB_TimeOut_t;

But below, the CFE_SB_ReceiveBuffer() takes uint32 for the timeout...

CFE_Status_t CFE_SB_ReceiveBuffer(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut);

Shouldn't it be using the CFE_SB_TimeOut_t type instead of uint32 for the TimeOut parameter?

@CDKnightNASA CDKnightNASA self-assigned this Jan 5, 2021
@CDKnightNASA
Copy link
Contributor Author

...or, as the docs say, "...Internally used by SB in the #CFE_SB_ReceiveBuffer API...", then should it be exposed in cfe_sb.h at all? Given that it's also a uint32, this is confusing to me.

@skliper
Copy link
Contributor

skliper commented Jan 5, 2021

I didn't change the arguments from:

int32 CFE_SB_RcvMsg(CFE_SB_MsgPtr_t *BufPtr,
CFE_SB_PipeId_t PipeId,
int32 TimeOut)

I'm not aware of the history of CFE_SB_TimeOut_t, it's only used in the CFE_SB_ReadQueue API. An abstraction here seems like overkill to me (osal uses int32 for timeouts all over).

EDIT - "didn't change..." other than the buffer change

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