Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest refactoring sample_app to more closely match "real" apps. #45

Closed
ejtimmon opened this issue Feb 26, 2020 · 2 comments · Fixed by #205
Closed

Suggest refactoring sample_app to more closely match "real" apps. #45

ejtimmon opened this issue Feb 26, 2020 · 2 comments · Fixed by #205
Assignees
Labels
enhancement New feature or request

Comments

@ejtimmon
Copy link

Is your feature request related to a problem? Please describe.
This ticket is not related to a problem. This is a feature request to reorganize the sample app to more closely match "real" apps (namely the GSFC open source apps). This would increase sample_app's value as a template. In addition to providing a more realistic example, the organization of functions into files has implications for unit testing.

Describe the solution you'd like

  1. Move command functions into a separate sample_app_cmds.c file.
  2. Move utility functions into a separate sample_app_utils.c file

Describe alternatives you've considered
None

Additional context
None

Requester Info
Elizabeth Timmons - NASA/GSFC

@ejtimmon ejtimmon self-assigned this Feb 26, 2020
@ejtimmon ejtimmon added the enhancement New feature or request label Feb 26, 2020
@jphickey
Copy link
Contributor

In general I concur with this idea but please see pull request #43 prior to doing any additional refactoring.

Also - its been discussed in the past to put each command into a separate .c file, to eventually pave the way for commands to be included/excluded via compile-time configuration. Not saying that it should necessarily go there now, but I do think it would be a good thing to consider.

@skliper
Copy link
Contributor

skliper commented Mar 2, 2020

I concur with eventually splitting commands into separate files for multiple reasons, I've found it beneficial in the past to organize more along the one "unit" per file model.

astrogeco added a commit that referenced this issue May 11, 2020
Fix #45, Refactor to implement command and utility functions in separate files
ejtimmon added a commit to ejtimmon/sample_app that referenced this issue May 12, 2020
astrogeco pushed a commit that referenced this issue May 13, 2020
Fix #45, Refactor to implement command and utility functions in separate files
astrogeco pushed a commit that referenced this issue May 13, 2020
Fix #45, Refactor to implement command and utility functions in separate files

Co-authored-by: ejtimmon <[email protected]>
skliper added a commit to skliper/cFS that referenced this issue May 14, 2020
@astrogeco astrogeco added the good first issue Good for newcomers label Sep 10, 2021
@skliper skliper removed the good first issue Good for newcomers label Oct 22, 2021
thnkslprpt added a commit to thnkslprpt/sample_app that referenced this issue Apr 16, 2023
dzbaker added a commit that referenced this issue Oct 30, 2023
…-separate-files

Fix #45, Move cmds and utils into separate files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants