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

Fix #111, make dispatch tables and functions consistent #135

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

jphickey
Copy link
Contributor

Standardize the dynamic handler functions to two basic types, one that accepts a PDU (recv) and one that does not (send).

Also create several dispatch table types, one based on file directive code, one based on Tx sub state, and one based
on Rx sub state.

Change the dispatcher functions to use these common types and create new dispatcher functions where there was not
a separate function already (this makes the pattern consistent).

Make all "receive" helper functions accept a pointer to the recieved PDU and actually use that pointer to read the data. This
substantially reduces reliance on the global and fixes some cases where a pointer was actually passed into a function, but
ignored. This takes a significant step toward removing the global entirely, but does not do so yet.

Fixes #111
Also related to/makes some progress on #90 and #91 but does not fix those yet.

Standardize the dynamic handler functions to two basic types,
one that accepts a PDU (recv) and one that does not (send).

Also create several dispatch table types, one based on
file directive code, one based on Tx sub state, and one based
on Rx sub state.

Change the dispatcher functions to use these common types
and create new dispatcher functions where there was not
a separate function already (this makes the pattern consistent).

Make all "receive" helper functions accept a pointer to the
recieved PDU and actually use that pointer to read the data.  This
substantially reduces reliance on the global and fixes some
cases where a pointer was actually passed into a function, but
ignored.  This takes a significant step toward removing the
global entirely, but does not do so yet.
@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Dec 17, 2021
fsw/src/cf_cfdp.c Show resolved Hide resolved
@astrogeco astrogeco merged commit ba10b0b into nasa:main Dec 17, 2021
@astrogeco astrogeco added CCB:Approved and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Jan 5, 2022
@astrogeco
Copy link
Contributor

CCB:2022-01-05 APPROVED

@jphickey jphickey deleted the fix-111-cleanup-dispatch-tables branch January 11, 2022 19:24
@skliper skliper added this to the Draco milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function pointers should be typedef'ed
3 participants