nasa / fprime-gds

F´ Python Ground Data System (GDS).
https://github.com/nasa/fprime
Apache License 2.0
18 stars 37 forks source link

Add option to accept comms with FSW running TCP server #137

Closed thomas-bc closed 1 year ago

thomas-bc commented 1 year ago
Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

Add a command line option to have the GDS comms adapter act as a client instead of server, thus accepting FSW acting as the TCP server. I wasn't sure what the best --option-name and help_text were... let me know if you have a better idea.

Testing/Review Recommendations

With the option, server=False is fed into the constructor here:

https://github.com/thomas-bc/fprime-gds/blob/96dd25f02f727ada49ce99160f8b198fe78bb271/src/fprime_gds/common/communication/adapters/base.py#L117-L118

thomas-bc commented 1 year ago

I have confirmed that this works with the following deployment: https://github.com/thomas-bc/sample-fprime-project/compare/main...gds-as-client

Running on a remote RaspberryPi, looks like the following

# on the RPI
./SampleDeployment -a 0.0.0.0 -p 50000
# on the ground
fprime-gds -n --ip-client --ip-address <RPI_ADDRESS> --dictionary <path/to/dict.xml>