Cfdp rework#91
Draft
hunter-esi wants to merge 18 commits into
Draft
Conversation
… close to being finished, but I will be modifying this allong the way so it should be representative of the current implementation.
…tively simple class, and DestHandler and SrcHandler should be new classes / threads handling cfdp's in out. The current implementation tries to put them all into a cfdp user class, with no threading so they're executed immediately every time. This commit steals most of common.py from the cfdp-cli-udp example. I will be reworking it to match our needs.
…ings in a similar way to how we already do. This is being changed to only exist in the CfdpUser Class, which will have 2 instances.
…aseline for the final implementation after implementng dropped ack, proxy put, and directory request test cases.
…ce handler doesn't resend EoFs if its received a finished PDU?
…dled upstream is wrong, as there should be an EOF sent before the transaction is complete.
…pping the threads before waiting for them to join. Still need to make the netowrk threads behave better on shutdown.
…nctions to clean up cfdp unit tests.
… tests to use helper functions.
…e. Unit test seems to work, except for the fact that the VFS tries to use the local directory for both the ground and the s/c, resulting in the s/c trying to send an empty file after the ground overwrites it. Think dir operations work, need to chnage how handlers use vfs though.
A major issue is that the file that YAMCS requests is not handled well by the cachestore, and so we are left with the choices of either having the cachestore hardcoded to look for .dirlist* files or rewriting a large amount of the logic for the upstream package.
put requests finish, unless the filename is incorrect. This should instead return some kind of error or do something other than endlessly NaKing. Proxy put requests finish the first two transactions, then the proxy [put response fails. Directory Listings finish the first two transactions, but yamcs doesn't seem to like the directory listing file we send down so we need to format it differently. Like the proxy put, the response fails.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reworks cfdp to be handled by 4 queues and 2 separate threads, based on the example implementation in the cfdp package.
put_req_queuesends put requests to the source handler, being either new put requests originating on the satellite or transactions within a larger operation, e.g. the second two transactions of a proxy put request._cfdp_tm_queueis the queue of pdus that should be sent to the ground station from both the source and dest handlers._cfdp_src_queueand_cfdp_dest_queueare the queues received pdus, once they have been taken out of the uslp frame and the destination has been determined.In addition, I have modified ThirteenFish's preliminary cfdp unit test file so that it now contains unit tests for sending a file from the "ground station" to the satellite, sending the same file but with the EOF ack getting dropped, sending a proxy put request (and the corresponding 2 addition transactions), and sending a cfdp directory listing request (and the corresponding two additional transactions).
The cachestore has been modified to allow successful directory listing requests, although I do not like the current implementation as it has to hack around the oresat_file naming conventions to have the directory list file preserved between the first two transactions. CFDP is also only able to access the fwrite cache, so I think that cachestore should be rewritten to allow sub directories and also to handle this case much more cleanly.
At present, the following issues mean that this is not ready to be merged. I will not have much time to fix the in the immediate future, and so contributions by those interested to resolve them would be appreciated.