-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #116, separate logical vs. network PDU buffers
Improves the distinction between PDU data being actively interpreted or created during the PDU receive or transmit process, and the encoded form of that data. CF formerly treated the two as the same, directly referencing the encoded form of the data. This creates many repeated translations. Furthermore, it would sometimes write a modified value back to the packet in a partially-decoded form, so it was never clear what was in a given buffer at a given time (it could be native byte order or network byte order, in the same fields). This introduces a "logical" buffer which correlates to the CFDP buffer, but is used for all in-work or temporary value storage. All values in the logical buffer are normalized to the native machine, that is they are aligned properly and always in the correct byte order for the host, so they can be used as normal values without any need for translation. When it comes time to transmit data to/from the network, a dedicated Encode/Decode function is used, to translate the entire content from its native form to the network form, or vice versa. FSW should typically not access the encoded form of data, outside of the codec routines, except under very limited circumstances with good reason (such as dynamically updating the total_length field in the base header after encode).
- Loading branch information
Showing
31 changed files
with
4,528 additions
and
1,985 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.