ASU-cubesat / cfdp-rs

A rust implementation of the CCSDS File Delivery Protocol (CFDP)
MIT License
9 stars 2 forks source link

CFDP example - server+client binary applications #28

Open xpromache opened 1 year ago

xpromache commented 1 year ago

As discussed in #16, I propose I implement a CFDP example application. The application consists of a server and a command line application client performing operations via the server.

The server will be launched as:

cfdps [--socket /var/tmp/cfdp.sock] --file-store <file-store-directory> -id <entity-id> --listen [<ip>]:<port> --remote <entity_id1>:<host>:<port>:<bandwith> --remote <entity_id2>:<host>:<port>:<bandwith> .... 

(I would use the clap crate for the command line options and all options would have a short variant as well)

The command above launches a local server (daemon) for the given entity id, copying files to/from the given directory, listening to the given UDP port and with the known remote entities. Later on, if the server has more and more options we can think of a config file.

To control the server (via the local socket), one would use the cfdpc program which has a few sub-commands:

cfdpc ls [<entity-id>]:[/directory]  - list files in the entity-id directory
cfdpc cp [<entity-id1>]:[/path/to/file] [<entity-id2>]:[/path/to/file]  - copy files between entity1 and entity2
cfdpc rm  [<entity-id>]:[/path/to/file] - remove file from entity

cfdpc tx ls - list transactions in the local server
cfdp tx suspend|resume|cancel|report <transaction-id>  - suspend, resume, cancel, report (get detailed info about) a given transaction on the local server.

All these would be implemented in a sub-project next to "cfdp-core" and as usual the most difficult part is to find a name for it. @mkolopanis any ideas for a good name?

mkolopanis commented 1 year ago

This would be a nice addition. I don't think I have any good name ideas off the top of my head. We can always change it if we think of something good before your idea gets merged in!

mkolopanis commented 1 year ago

I haven't come up with any exciting ideas for names, even something as simple as "cfdp-server-rs" and "cfdp-client-rs" could work.