Cookiecutter template for a cFS app, to help with reducing the copy-pasta effect while creating new apps. There are just enough pieces to remember to change/fix, that it is rather challenging to do without a template. So here is a template to fill in all the major adjustments, so you can spend time developing an app instead of scratching your head over why you get weird errors.
Table of Contents
- Working app created by running the Cookiecutter.
- Optional Tables.
- Optional Library Dependency.
- Choice of various licenses.
Projects using this template have these minimal dependencies:
- Cookiecutter - just for creating the project
This template is intended to make it easy to generate all the boilerplate required for a cFS app.
First navigate to the directory where you want to add your app. The template is going to create the folder containing your app in the current directory (you should not try to create the folder ahead of the template). Next, generate the app's boilerplate:
cookiecutter gh:SterlingPeet/cookiecutter-cfs-app
There are a few fields listed at the bottom, preceeded with double underscores.
You will not be asked for these, they will be generated from other responses.
If you feel that you really need to adjust them, they can be set within the .cookiecutterrc
that is generated by the template and re-run according to the instructions in that file.
You will be asked for these fields:
Template variable | Default | Description |
---|---|---|
full_name |
"Developer Name" |
Main author of this deployment. Can be set in your |
email |
Contact email of the author. Can be set in your |
|
app_display_name |
"My Example" |
The printed name of this deployment for documentation and strings. It should be concise and convey the purpose of the deployment. |
app_readme_title |
"Core Flight System : Framework : App : My Example" |
This is how the title of the README file will appear. |
app_short_description |
"My Example app for the cFS FSW framework." |
Short description of the app's purpose. |
app_slug |
"MyExample" |
This is the string that will be used for all app-specific variable names. It is often 2 or 3 capitol letters. |
app_repo_base |
"https://github.com" |
URL for the service hosting your revision control repo, such as GitHub or GitLab. |
app_user_org |
"nasa" |
Username or Organization that the repository will belong to. |
app_repo |
"MyExample" |
The name of the repository as it will appear in the URL. |
app_url |
"https://github.com/nasa/MyExample" |
The full link to the version control repository. |
app_include_github_actions |
"yes" |
Include the standard cFS github workflows/actions. |
app_major_version |
"0" |
Major version number for the current release. |
app_minor_version |
"1" |
Minor version number for the current release. |
app_revision |
"99" |
Revision number for the current release. 99 means development. |
app_cmd_mid |
"0x1882" |
SB Message ID for incoming commands. Must be unique to the app within the mission, and in the range 0x18XX. |
app_send_hk_mid |
"0x1883" |
SB Message ID for incoming HK requests. Must be unique to the app within the mission, and in the range 0x18XX. |
app_hk_tlm_mid |
"0x0883" |
SB Message ID for outgoing HK telemetry. Must be unique to the app within the mission, and in the range 0x08XX. |
app_base_perf_id |
"91" |
Lowest ID number for performance tracking that belongs to this app. If you are not using perf, it is safe to ignore this number. |
app_table_slug |
"MyExampleAppTable" |
App table name, typically TitleCase. |
library_dep |
"no" |
Choose yes for cFS library dependency boilerplate. |
library_name |
"sample_lib" |
Name of the library. |
library_h_file |
"sample_lib.h" |
Header file in the libary containing useful function prototype. |
library_function |
"SAMPLE_LIB_Function" |
Function prototype to add into boilerplate. |
license |
"None" |
License to use. Available options:
What license to pick? https://choosealicense.com/ |
__app_filename_slug |
"my_example_app" |
You will not be prompted for this value. |
__app_slug_uc |
"MY_EXAMPLE_APP" |
You will not be prompted for this value. |
__app_baseline_version |
"v0.1.99" |
You will not be prompted for this value. |
__app_build_number |
"1" |
You will not be prompted for this value. |
You should now have a basic app that can be compiled and run.
From here there are a few more details to complete within your mission code to compile and load the app in cFE/cFS.
- If needed, Add HK [and possibly WakeUp] MID(s) to Scheduler app's table
- Add Telemetry MIDs to Telemetry Output's table
- Add Command MID to Command Ingestor's table
- Update
[mission]_defs/target.cmake
to build the app [APPLIST variable] - Add the new app to
[mission]_defs/cfe_es_startup.scr
Now you should be able to build and run cFS with this app included!
See CHANGELOG.rst.