Fix #111, make dispatch tables and functions consistent #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.